User forums > Using Code::Blocks

Trouble linking ws2_32.lib

(1/1)

SeanW:
Hello,

     I am trying to write an application utilizing winsock, but in order to use the winsock API, I need to link to the ws2_32.lib library. So in Projects->Build Options, I go to the linker settings and under "Link libraries:", I add the path C:\CodeBlocks\MinGW\lib\libws2_32.a. Under "Selected compiler", I have it set to GNU GCC Compiler.  However, when I rebuild the project, I get the only error message:

ld.exe||cannot find -lws2_32.lib|
||=== Build finished: 1 errors, 0 warnings ===|

What am I doing wrong?

Thanks

Navigation

[0] Message Index

Go to full version