You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by mercuric <si...@haw-hamburg.de> on 2012/11/29 10:22:35 UTC

Simply getting ActiveMQ CPP work on VS2010

Hi, 
First of all I have to say sorry for this newbie question but its my first
project in c++ and im so frustrated…
Im simply want to get a connection between activemq and my C++ project
written in C++ on Visual Studio Express 2010.

1. I copied the Source of the ‘SimpleProducer.cpp’
2. Added Paths to: Property Pages/‘C/C++’/Gerneral/’Additional
IncludeDirectories’:
  a.	../activemq-cpp-library-3.4.5/src/main   (from  here
<https://activemq.apache.org/cms/activemq-cpp-345-release.html>  )
  b.	../apr-util-1.5.1		(from here <https://apr.apache.org/download.cgi>  )
  c.	../apr-1.4.6		(from  here <https://apr.apache.org/download.cgi>  )

But if I try to run this project I’m getting the follow error messages
(sorry, its in german):


1>------ Erstellen gestartet: Projekt: TestMQBroker, Konfiguration: Debug
Win32 ------
1>SimpleProducer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes
Symbol ""public: static void __cdecl
activemq::library::ActiveMQCPP::shutdownLibrary(void)"
(?shutdownLibrary@ActiveMQCPP@library@activemq@@SAXXZ)" in Funktion "_main".
1>SimpleProducer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes
Symbol ""public: static void __cdecl
activemq::library::ActiveMQCPP::initializeLibrary(void)"
(?initializeLibrary@ActiveMQCPP@library@activemq@@SAXXZ)" in Funktion
"_main".
1>SimpleProducer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes
Symbol ""public: static class std::basic_string<char,struct
std::char_traits&lt;char>,class std::allocator<char> > __cdecl
decaf::lang::Long::toString(__int64)"
(?toString@Long@lang@decaf@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_J@Z)"
in Funktion "__catch$?run@SimpleProducer@@UAEXXZ$0".
1>SimpleProducer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes
Symbol ""public: static __int64 __cdecl decaf::lang::Thread::getId(void)"
(?getId@Thread@lang@decaf@@SA_JXZ)" in Funktion
"__catch$?run@SimpleProducer@@UAEXXZ$0".
1>SimpleProducer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes
Symbol ""public: __thiscall cms::CMSException::CMSException(class
cms::CMSException const &)" (??0CMSException@cms@@QAE@ABV01@@Z)" in Funktion
"__catch$?run@SimpleProducer@@UAEXXZ$0".
1>SimpleProducer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes
Symbol ""public: __thiscall
activemq::core::ActiveMQConnectionFactory::ActiveMQConnectionFactory(class
std::basic_string<char,struct std::char_traits&lt;char>,class
std::allocator<char> > const &,class std::basic_string<char,struct
std::char_traits&lt;char>,class std::allocator<char> > const &,class
std::basic_string<char,structstd::char_traits&lt;char>,class
std::allocator<char> > const &)"
(??0ActiveMQConnectionFactory@core@activemq@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00@Z)"
in Funktion ""public: virtual void __thiscall SimpleProducer::run(void)"
(?run@SimpleProducer@@UAEXXZ)".
1>SimpleProducer.obj : error LNK2001: Nicht aufgelöstes externes Symbol
""public: virtual __thiscall cms::CMSException::~CMSException(void)"
(??1CMSException@cms@@UAE@XZ)".
1>C:\Users\mercuric\Documents\Visual Studio
2010\Projects\TestMQBroker\Debug\TestMQBroker.exe : fatal error LNK1120: 7
nicht aufgelöste externe Verweise.
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen
==========

What’s going wrong in here?!




--
View this message in context: http://activemq.2283324.n4.nabble.com/Simply-getting-ActiveMQ-CPP-work-on-VS2010-tp4659928.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Simply getting ActiveMQ CPP work on VS2010

Posted by Timothy Bish <ta...@gmail.com>.
On Sun, 2012-12-02 at 07:39 -0800, mercuric wrote: 
> Hi,
> can u maybe give me some more informations what i should check?
> Some more informations:
> - Windows 7 Prof, SP1, 32Bit
> - Microsoft Cisual C++ 2010 (10.30319.1)
> - MS Win SDK for Win7 (7.1)
> > IncludeDirectories:
> >   a. ../activemq-cpp-library-3.4.5/src/main   (from  here
> > <https://activemq.apache.org/cms/activemq-cpp-345-release.html>  )
> >   b. ../apr-util-1.5.1 (from here <https://apr.apache.org/download.cgi>  )
> >   c. ../apr-1.4.6 (from  here <https://apr.apache.org/download.cgi>  )
> 
> Thank you!
> 
> 

In your project settings under linker you need to configure the input
libraries that are required in order to resolve all your dependencies.
For example the the activemq example app pulls in: ws2_32.lib
libapr-1.lib libaprutil-1.lib and libactivemqcppd.lib in the debug
configuration. 

> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Simply-getting-ActiveMQ-CPP-work-on-VS2010-tp4659928p4660070.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com 
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


Re: Simply getting ActiveMQ CPP work on VS2010

Posted by mercuric <si...@haw-hamburg.de>.
Hi,
can u maybe give me some more informations what i should check?
Some more informations:
- Windows 7 Prof, SP1, 32Bit
- Microsoft Cisual C++ 2010 (10.30319.1)
- MS Win SDK for Win7 (7.1)
> IncludeDirectories:
>   a. ../activemq-cpp-library-3.4.5/src/main   (from  here
> <https://activemq.apache.org/cms/activemq-cpp-345-release.html>  )
>   b. ../apr-util-1.5.1 (from here <https://apr.apache.org/download.cgi>  )
>   c. ../apr-1.4.6 (from  here <https://apr.apache.org/download.cgi>  )

Thank you!



--
View this message in context: http://activemq.2283324.n4.nabble.com/Simply-getting-ActiveMQ-CPP-work-on-VS2010-tp4659928p4660070.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Simply getting ActiveMQ CPP work on VS2010

Posted by Timothy Bish <ta...@gmail.com>.
On Thu, 2012-11-29 at 01:22 -0800, mercuric wrote: 
> Hi, 
> First of all I have to say sorry for this newbie question but its my first
> project in c++ and im so frustrated…
> Im simply want to get a connection between activemq and my C++ project
> written in C++ on Visual Studio Express 2010.
> 
> 1. I copied the Source of the ‘SimpleProducer.cpp’
> 2. Added Paths to: Property Pages/‘C/C++’/Gerneral/’Additional
> IncludeDirectories’:
>   a.	../activemq-cpp-library-3.4.5/src/main   (from  here
> <https://activemq.apache.org/cms/activemq-cpp-345-release.html>  )
>   b.	../apr-util-1.5.1		(from here <https://apr.apache.org/download.cgi>  )
>   c.	../apr-1.4.6		(from  here <https://apr.apache.org/download.cgi>  )
> 
> But if I try to run this project I’m getting the follow error messages
> (sorry, its in german):
> 

Looks as though you haven't linked in the actual libraries, I'd
recommend you take a look at the provided dev studio files to see how
they are configured. 

> 
> 1>------ Erstellen gestartet: Projekt: TestMQBroker, Konfiguration: Debug
> Win32 ------
> 1>SimpleProducer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes
> Symbol ""public: static void __cdecl
> activemq::library::ActiveMQCPP::shutdownLibrary(void)"
> (?shutdownLibrary@ActiveMQCPP@library@activemq@@SAXXZ)" in Funktion "_main".
> 1>SimpleProducer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes
> Symbol ""public: static void __cdecl
> activemq::library::ActiveMQCPP::initializeLibrary(void)"
> (?initializeLibrary@ActiveMQCPP@library@activemq@@SAXXZ)" in Funktion
> "_main".
> 1>SimpleProducer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes
> Symbol ""public: static class std::basic_string<char,struct
> std::char_traits&lt;char>,class std::allocator<char> > __cdecl
> decaf::lang::Long::toString(__int64)"
> (?toString@Long@lang@decaf@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_J@Z)"
> in Funktion "__catch$?run@SimpleProducer@@UAEXXZ$0".
> 1>SimpleProducer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes
> Symbol ""public: static __int64 __cdecl decaf::lang::Thread::getId(void)"
> (?getId@Thread@lang@decaf@@SA_JXZ)" in Funktion
> "__catch$?run@SimpleProducer@@UAEXXZ$0".
> 1>SimpleProducer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes
> Symbol ""public: __thiscall cms::CMSException::CMSException(class
> cms::CMSException const &)" (??0CMSException@cms@@QAE@ABV01@@Z)" in Funktion
> "__catch$?run@SimpleProducer@@UAEXXZ$0".
> 1>SimpleProducer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes
> Symbol ""public: __thiscall
> activemq::core::ActiveMQConnectionFactory::ActiveMQConnectionFactory(class
> std::basic_string<char,struct std::char_traits&lt;char>,class
> std::allocator<char> > const &,class std::basic_string<char,struct
> std::char_traits&lt;char>,class std::allocator<char> > const &,class
> std::basic_string<char,structstd::char_traits&lt;char>,class
> std::allocator<char> > const &)"
> (??0ActiveMQConnectionFactory@core@activemq@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00@Z)"
> in Funktion ""public: virtual void __thiscall SimpleProducer::run(void)"
> (?run@SimpleProducer@@UAEXXZ)".
> 1>SimpleProducer.obj : error LNK2001: Nicht aufgelöstes externes Symbol
> ""public: virtual __thiscall cms::CMSException::~CMSException(void)"
> (??1CMSException@cms@@UAE@XZ)".
> 1>C:\Users\mercuric\Documents\Visual Studio
> 2010\Projects\TestMQBroker\Debug\TestMQBroker.exe : fatal error LNK1120: 7
> nicht aufgelöste externe Verweise.
> ========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen
> ==========
> 
> What’s going wrong in here?!
> 
> 
> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Simply-getting-ActiveMQ-CPP-work-on-VS2010-tp4659928.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com 
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/