I'm using the IDE CodeBlocks and would like to use an third party library called Chilkat in my code. I can make the compiler read the header, but when i try to use some method or object from the library, the code doesn't compile.
The code:
#include <iostream>
#include <CkSpider.h>
using namespace std;
int main(){
CkSpider m;
m.Initialize("www.chilkatsoft.com");
cout<<"Works"<<endl;
return 0;
}
All errors are like:
..\libchilkat-9.5.0.a(ChilkatSocket.o):ChilkatSocket.cpp|| undefined reference to `__imp_WSAStartup'|
..\libchilkat-9.5.0.a(ChilkatSocket.o):ChilkatSocket.cpp|| undefined reference to `__imp_getsockopt'|
..\libchilkat-9.5.0.a(ChilkatSocket.o):ChilkatSocket.cpp|| undefined reference to `__imp_setsockopt'|
Beyond that, there is some instructions on how to link and compile the library on the library web page (https://www.chilkatsoft.com/downloads_mingw.asp#getStarted), but i don't know where or how to use these parameters:
The -Wl,--enable-auto-import options may be required when linking. Also, link with libcrypt32.a, libws2_32.a, and libdnsapi.a as shown below:
g++ -Wl,--enable-auto-import linkSample.cpp -o"linkSample.exe" -L. -lchilkat-9.5.0
-L/MinGW/lib -lcrypt32 -lws2_32 -ldnsapi
How and where i use this parameters so i can link and compile this library on CodeBlocks?
PS: Sorry for any english mistake