User forums > Help

code::blocks not linking to *.a file

<< < (2/2)

cluelessnoob:
Getting closer. I followed these instructions:

1) Compile enet to static libraray with codeblocks:
1.1) Open the provided project
1.2) Go to Project->Properties->Build targets-> change "Type" from "dynamic library" to "static libraray" for release and debug target (on the left)
1.3) Close the dialog with ok and rebuild the project with Build->Rebuild
the new .a file should have something about 120kB

but I get errors when building a program to test (attached). I've added the winsock2.h header to the project for fun, no help.


sodev:
On GCC, static library link order does matter, you have to specify libraries in the order from dependent to independent. At least you have to move the Enet library before the platform libraries, especially before ws2_32, which is the reason for your current linker errors.

cluelessnoob:
That worked. Thanks.

Navigation

[0] Message Index

[*] Previous page

Go to full version