activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Lentink <ja...@lentink.net>
Subject Re: Compiling C++
Date Thu, 05 Mar 2009 12:45:16 GMT
Tnx

The final working comand is:
g++ -W -Wall -DDARWIN -I/opt/local/include/apr-1 -I/usr/include/apr-1 - 
I. -I/opt/local/include/apr-1 -I/usr/include/apr-1 -I/usr/local/ 
include/activemq-cpp-2.2.4/ -L/usr/local/lib -L/usr/lib main.cpp - 
lpthread -laprutil-1 -lsqlite3 -lexpat -liconv  -o test /usr/local/lib/ 
libactivemq-cpp.a /opt/local/lib/libapr-1.a


On Mar 5, 2009, at 13:40 41, Timothy Bish wrote:

> On Thu, 2009-03-05 at 13:21 +0100, Jason Lentink wrote:
>> Oke like this?
>>
>> g++ -W -Wall -DDARWIN -I/opt/local/include/apr-1 -I/usr/include/ 
>> apr-1 -
>> I. -I/opt/local/include/apr-1 -I/usr/include/apr-1 -I/usr/local/
>> include/activemq-cpp-2.2.4/ -L/usr/local/lib -L/usr/lib main.cpp -
>> lpthread -laprutil-1 -lsqlite3 -lexpat -liconv  -o test /usr/local/ 
>> lib/
>> libactivemq-cpp.la
>>
>> When i try that i get a additional error which says: ld warning: in /
>> usr/local/lib/libactivemq-cpp.la, file is not of required  
>> architecture
>> this strikes me strange because i compiled it from source.
>>
>
> An la file is a libtool file, if you aren't using libtool then you  
> need
> to use the static or shared lib, .a or .so
>
>
>
>>
>>
>> On Mar 5, 2009, at 13:10 50, Timothy Bish wrote:
>>
>>> On Thu, 2009-03-05 at 11:35 +0100, Jason Lentink wrote:
>>>> Hi All,
>>>>
>>>> I try to compile a simple producer my self outside the example dir
>>>> but
>>>> for some reason it's now working.
>>>> I properly do something wrong.
>>>>
>>>> The command I run is:
>>>> g++ -I/opt/local/include/apr-1 -I/usr/include/apr-1 -I. -I/opt/ 
>>>> local/
>>>> include/apr-1 -I/usr/include/apr-1 -I/usr/local/include/activemq-
>>>> cpp-2.2.4/ -L/usr/local/lib -L/usr/lib main.cpp -lpthread -
>>>> laprutil-1 -
>>>> lsqlite3 -lexpat -liconv -o test
>>>>
>>>> The error that i get is:
>>>> Undefined symbols:
>>>>  "decaf::lang::Thread::getId()", referenced from:
>>>>      SimpleProducer::run()      in ccVVQAI1.o
>>>>  "decaf::lang::Integer::toString(int)", referenced from:
>>>>      SimpleProducer::run()      in ccVVQAI1.o
>>>>
>>>> "activemq
>>>> ::core
>>>> ::ActiveMQConnectionFactory
>>>> ::ActiveMQConnectionFactory(std::basic_string<char,
>>>> std::char_traits<char>, std::allocator<char> > const&,
>>>> std::basic_string<char, std::char_traits<char>,
>>>> std::allocator<char> >
>>>> const&, std::basic_string<char, std::char_traits<char>,
>>>> std::allocator<char> > const&)", referenced from:
>>>>      SimpleProducer::run()      in ccVVQAI1.o
>>>>  "typeinfo for decaf::lang::Exception", referenced from:
>>>>      typeinfo for decaf::lang::exceptions::NumberFormatExceptionin
>>>> ccVVQAI1.o
>>>>  "decaf::lang::Integer::parseInt(std::basic_string<char,
>>>> std::char_traits<char>, std::allocator<char> > const&)",
referenced
>>>> from:
>>>>      _main in ccVVQAI1.o
>>>> ld: symbol(s) not found
>>>> collect2: ld returned 1 exit status
>>>>
>>>> the library is install in /usr/local/
>>>>
>>>> tnx
>>>
>>> I don't see the activemq-cpp lib on your link line, might want to  
>>> add
>>> that and see if it fixes the issue.
>>>
>>> Regards
>>> Tim.
>>>
>>>
>>>
>>> -- 
>>> Tim Bish
>>> http://fusesource.com
>>> http://timbish.blogspot.com/
>>>
>>>
>>>
>>
> -- 
> Tim Bish
> http://fusesource.com
> http://timbish.blogspot.com/
>
>
>


Mime
View raw message