How to link ws2_32.lib in CLion?

Answered

I learned that liking ws2_32.lib is needed when I use winsock2.h. 
However, I don't know how to link ws2_32.lib library in CLion. 
Help me plz...

0
1 comment

You need to link an executable to the ws2_32.lib library using the target_link_libraries () CMake command. More about the command: https://cmake.org/cmake/help/latest/command/target_link_libraries.html. Also here is our quick CMake tutorial which might be helpful: https://www.jetbrains.com/help/clion/quick-cmake-tutorial.html#libs.

0

Please sign in to leave a comment.