Code::Blocks

User forums => Using Code::Blocks => Topic started by: SeanW on May 22, 2010, 02:08:19 am

Title: Trouble linking ws2_32.lib
Post by: SeanW on May 22, 2010, 02:08:19 am
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