Re: [gnet-devel] GNet, compile errors.
- From: Tim-Philipp Müller <t i m zen co uk>
- To: gnet-devel-list gnome org
- Cc: Piotr Mackiewicz <pietrzuch gmail com>
- Subject: Re: [gnet-devel] GNet, compile errors.
- Date: Tue, 07 Oct 2008 21:34:56 +0100
On Sat, 2008-10-04 at 20:15 +0200, Piotr Mackiewicz wrote:
Hi,
> I installed GNet library and i'm using Code::Blocks. I have got errors
> in compile my programs from examples. Help me in use GNet, please.
> (snip)
> ERRORS:
>
> -------------- Build: Release in schat ---------------
>
> Compiling: main.cpp
> In file included from ../../MinGW/include/GNet_source/gnet.h:26,
> from
> C:\CodeBlocks\cwiczenia_rozne_smieci\client_gnet\main.cpp:7:
> ../../MinGW/include/GNet_source/gnetconfig.h:16:26: warning: no
> newline at end of file
> Linking console executable: bin\Release\schat.exe
> obj\Release\main.o:main.cpp:(.text+0x20): undefined reference to `_gnet_init'
> obj\Release\main.o:main.cpp:(.text+0x2b): undefined reference to
> `_gnet_udp_socket_new'
> obj\Release\main.o:main.cpp:(.text+0x42): undefined reference to
> `_gnet_inetaddr_new'
> obj\Release\main.o:main.cpp:(.text+0x6d): undefined reference to
> `_gnet_udp_socket_receive'
> obj\Release\main.o:main.cpp:(.text+0xb3): undefined reference to
> `_gnet_inetaddr_delete'
> obj\Release\main.o:main.cpp:(.text+0xbb): undefined reference to
> `_gnet_udp_socket_delete'
> obj\Release\main.o:main.cpp:(.text+0xde): undefined reference to
> `_gnet_inetaddr_delete'
> obj\Release\main.o:main.cpp:(.text+0xe6): undefined reference to
> `_gnet_udp_socket_delete'
> collect2: ld returned 1 exit status
> Process terminated with status 1 (0 minutes, 6 seconds)
> 8 errors, 1 warnings
This looks like a problem when linking. It would probably be useful if
you could make your IDE show the exact commands with all arguments it
uses to compile/link the code (I'm sure there's a way to make it show
those).
Not really sure who/what adds those underscores to the symbols. Maybe
you're compiling with mingw32-gcc and linking with mingw32-g++ or vice
versa (instead of using the same for both compiling and linking)? (Just
wildy guessing though, I haven't used mingw32 or done any development on
windows in years). Also, just to make sure: are you linking against
libgnet-2.0.so at all?
Cheers
-Tim
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]