[openamq-dev] client application link problem

blog blog at yankeeboysoftware.com
Mon Dec 10 12:39:19 CET 2007


OK, I have mode some progress here:

I worked through the dependencies one by one. adding each library to the
link line when the symbol was first requested.  I end up with this link
line:

g++ -O0 -g3 -o amq_test amq_test.o -L/home/jack/open_source/OpenAMQ/lib/
-lamq_wireapi -lamq_common -lsmt -licl -lipr -lapr -lasl -laprutil
-lpcre -lpthread


The application runs.

My next issue is a troubling compile time warning:


g++ -DHAVE_CONFIG_H -I. -I.. -I/home/jack/my_work/amq_test/src
-I/home/jack/open_source/OpenAMQ/include/ -O0 -g3 -MT amq_test.o -MD -MP
-MF .deps/amq_test.Tpo -c -o
amq_test.o /home/jack/my_work/amq_test/src/amq_test.cpp
In file included from /home/jack/my_work/amq_test/src/amq_test.cpp:31:
/home/jack/open_source/OpenAMQ/include/base.h:175:1: warning:
"__NO_CTYPE" redefined
In file included
from /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c
++/4.1.2/i386-redhat-linux/bits/c++config.h:35,
from /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c
++/4.1.2/iostream:43,
from /home/jack/my_work/amq_test/src/amq_test.cpp:26:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c
++/4.1.2/i386-redhat-linux/bits/os_defines.h:37:1: warning: this is the
location of the previous definition
mv -f .deps/amq_test.Tpo .deps/amq_test.Po
/bin/sh ../libtool --tag=CXX --mode=link g++ -O0 -g3
-L/home/jack/open_source/OpenAMQ/lib/ -o amq_test amq_test.o
-lamq_wireapi -lamq_common -lsmt -licl -lapr -lipr -lapr -lasl -laprutil
-lpcre -lpthread 
In file included from /home/jack/my_work/amq_test/src/amq_test.cpp:32:
/home/jack/open_source/OpenAMQ/include/base.h:175:1: warning:
"__NO_CTYPE" redefined
In file included
from /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c
++/4.1.2/i386-redhat-linux/bits/c++config.h:36,
from /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c
++/4.1.2/iostream:44,
from /home/jack/my_work/amq_test/src/amq_test.cpp:27:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c
++/4.1.2/i386-redhat-linux/bits/os_defines.h:37:1: warning: this is the
location of the previous definition


On Mon, 2007-12-10 at 09:03 +0000, blog wrote:
> I am trying to write a trivial client application under Fedora 7 linux.
> 
> I am experiencing some strange results when I try to link the OpenAMQ
> libraries.  In this case my client is a C++ source file named
> amq_test.cpp.
> 
> Here is the link line output.
> 
> /bin/sh ../libtool --tag=CXX --mode=link g++ -O0 -g3
> -L/home/jack/open_source/OpenAMQ/lib -o amq_test amq_test.o -lamq_common
> -lamq_operate -lamq_server -lamq_wireapi -lgsl -lapr -laprutil -lasl
> -lgsl3 -licl -lipr -lpcre -lsfl -lsmt -lsmt3 -lzip 
> 
> g++ -O0 -g3 -o amq_test amq_test.o -L/home/jack/open_source/OpenAMQ/lib
> -lamq_common -lamq_operate -lamq_server -lamq_wireapi /usr/lib/libgsl.so
> -lapr -laprutil -lasl -lgsl3 -licl -lipr -lpcre -lsfl -lsmt -lsmt3 -lzip
> 
> g++: /usr/lib/libgsl.so: No such file or directory
> 
> Any idea why -lgsl.a is being magically converted to /usr/lib/libgsl.so
> (which does not exist) ?  Is this a known issue, if so do I work around
> it ?
> 
> Thanks,
> Jack
> 
> _______________________________________________
> openamq-dev mailing list
> openamq-dev at lists.openamq.org
> http://lists.openamq.org/mailman/listinfo/openamq-dev



More information about the openamq-dev mailing list