Linking error when compile a test application with gnet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I appreciate if someone can help me with my linking error:

In my "c++" options , i already have ' -L/usr/local/lib -lgnet-2.0'.

I get a number of '7: undefined reference to `gnet_conn_readline'' errors.

Can you please tell me why the linking fails?  I have the 'gnet.h'
include in my .cpp and I apparently compile fine.


c++   -fno-rtti -fno-exceptions -Wall -Wpointer-arith
-Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy
-Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof
-Wno-long-long -pedantic -fno-strict-aliasing -fshort-wchar -pthread
-pipe  -DDEBUG -D_DEBUG -DDEBUG_scheung -DTRACING -g -fno-inline -Os
-freorder-blocks -fno-reorder-functions -finline-limit=50
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/freetype2 -I/usr/include/libpng12
-I/usr/include/pixman-1 -I/usr/include/gtk-unix-print-2.0   -o
TestGNet TestGNet.o   -lpthread
-Wl,-rpath-link,/media/sdb3/src/tracemonkey/src/firefox-objdir/dist/bin
-Wl,-rpath-link,/lib  -L../../../../dist/bin -L../../../../dist/lib
-lX11   /media/sdb3/src/tracemonkey/src/firefox-objdir/dist/lib/libxpcomglue.a
-lasound -ldl -lm  -L/usr/local/lib -lgnet-2.0 -lgtk-x11-2.0 -latk-1.0
-lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0
-lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
TestGNet.o: In function `main':
/media/sdb3/src/tests/TestGNet.cpp:304: undefined reference to `gnet_conn_new'
/media/sdb3/src/tests/TestGNet.cpp:310: undefined reference to
`gnet_conn_connect'
/media/sdb3/src/tests/TestGNet.cpp:312: undefined reference to
`gnet_conn_set_watch_error'
/media/sdb3/src/tests/TestGNet.cpp:314: undefined reference to
`gnet_conn_timeout'
TestGNet.o: In function `ob_sig_int':
/media/sdb3/src/tests/TestGNet.cpp:1380: undefined reference to
`gnet_conn_write'
/media/sdb3/src/tests/TestGNet.cpp:1382: undefined reference to
`gnet_conn_readline'
TestGNet.o: In function `ob_conn_func':
/media/sdb3/src/tests/TestGNet.cpp:1307: undefined reference to
`gnet_conn_readline'
/media/sdb3/src/tests/TestGNet.cpp:1344: undefined reference to
`gnet_conn_delete'
/media/sdb3/src/tests/TestGNet.cpp:1212: undefined reference to
`gnet_conn_timeout'
/media/sdb3/src/tests/TestGNet.cpp:1227: undefined reference to
`gnet_conn_write'
/media/sdb3/src/tests/TestGNet.cpp:1229: undefined reference to
`gnet_conn_readline'
/media/sdb3/src/tests/TestGNet.cpp:1315: undefined reference to
`gnet_conn_delete'
/media/sdb3/src/tests/TestGNet.cpp:1330: undefined reference to
`gnet_conn_delete'
/media/sdb3/src/tests/TestGNet.cpp:1251: undefined reference to
`gnet_conn_delete'
/usr/bin/ld: TestGNet: hidden symbol `gnet_conn_connect' isn't defined
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
gmake[5]: *** [TestGNet] Error 1

Thank you for any help.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux