|
Roborealm API robot guy from India [3 posts] |
15 year
|
Hi,I have tried running the roborealm API C++ example in DevCPP but I was getting liker errors.Not able to solve it.Please suggest.Like the one below along with many others (is it that I have to use only VC++ and not DevCpp
main.cpp: undefined reference to `closesocket@4'
|
|
|
Anonymous |
15 year
|
if your using msvc do this after the includes
#pragma comment(lib,"ws2_32.a");
|
|
|
Anonymous |
15 year
|
I do it this way:
goto Project menu and Click project options. Then click the parameters tab. Click the add library or object button. Find your dev-cpp\lib directory and find Dev-Cpp/lib/libws2_32.a press ok twice. It should work.
In my projects I have windows.h included above winsock2.h
If you use winsock2.h you may need to add the libwsock32.a library (located in Dev-Cpp/lib/) to the project through "Project Options->Parameters->Add library"
|
|