PhantomBot
PhantomBot copied to clipboard
(info) Compiling without VS - With GCC
If you are compiling without Visual Studio/MSVC, you will have to add the linked library for WinSockets yourself; Visual Studio's compiler uses a pragma system, GCC does not.
VS: #pragma comment(lib, "ws2_32")
For myself in CodeBlocks, this means:
- Cloning a fresh repo (ensure no cmake garbage is left)
- Creating a new project and including all folders and files
- Project -> Build Options -> Linker
- Add "ws2_32" as a library; no path or .lib
For projects compiling with libraries linked in the GCC Commandline, use -L"ws2_32"
The project should now compile without "_imp." errors.