0

Im using eclipse and mingw32. My problem is when I add -static flag to linker options, i receive this error message:mingw32/bin/ld.exe: cannot find -llibcurl

Without -static flag, it combines fine and works. I compiled libcurl using mingw32. Then I copied header files to mingw include folder, and files from libcurl lib folder to mingw lib folder. I'm doing something wrong, but I dont know what.

John
  • 1

1 Answers1

0

-static means "Do not link against shared libraries." When you do not use this options linker links the binary with shared version (libcurl.so on linux/libcurl.dll on windows). Probably you do not have static version of the libcurl on your development enviroment or you do not give the right path of the file (libcurl.lib).

OziMan
  • 3
  • 4
  • I have libcurl.a file in lib folder, i think its same thing? And yes, i want make exe work without depencies and that why i use -static. – John Aug 28 '13 at 13:40
  • you might try to change the extension of that file to lib and try again. As far as I know .lib is used for static libs. – OziMan Aug 28 '13 at 13:52
  • I tried it, but it gave another:libcurl.lib(easy.o):(.text+0x1b5): undefined reference to `WSACleanup@0' – John Aug 28 '13 at 14:30
  • This might help http://stackoverflow.com/questions/2033608/mingw-linker-error-winsock you may also need the static version of winsock library or did you link it? – OziMan Aug 29 '13 at 10:59