2011/9/10 AL-AMEEN MUTHALIF <ameen...@rediffmail.com>

>
> I’m trying to  integrate libssh2 libraries(windows version libssh2-1.2.5)
> with Dev-C++( v4.9.9.2). The OS is Windows XP  SP3. I’m facing the
> following error when I compile the test file ssh2_exec.c (built in example)
> file.
>
> **
>
> ** **
>
> *Compiler Output:*
>
> *---------------------*
>
>   [Linker error] undefined reference to `libssh2_session_block_directions'
> ****
>
>   [Linker error] undefined reference to `select@20'****
>
>   [Linker error] undefined reference to `WSAStartup@8'****
>
>   [Linker error] undefined reference to `libssh2_init'****
>
>
It looks like you didn't specify any libraries to link against.



> LIBS =  -L"C:/Dev-Cpp/lib" -L"C:/MyApps/libssh2-1.2.5/lib"
>


Try adding the necessary libraries ("-lssh2 -lws2_32") to the end of LIBS:

LIBS =  -L"C:/Dev-Cpp/lib" -L"C:/MyApps/libssh2-1.2.5/lib" -lssh2 -lws2_32

P.S. I didn't use gcc on Win32, so I'm not sure what's the proper way of
linking against the WinSock2 (ws2_32.dll) here.
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to