bah.libcurlssl ld.exe: cannot find -leay32

BlitzMax Forums/Brucey's Modules/bah.libcurlssl ld.exe: cannot find -leay32

Htbaa(Posted 2011) [#1]
When using bah.libcurlssl I get the following error:

D:\Projects>bmk makeapp -d -t console test.bmx
Compiling:test.bmx
flat assembler version 1.69.14 (1233141 kilobytes memory)
3 passes, 2428 bytes.
Linking:test.exe
C:\BlitzMax/bin/ld.exe: cannot find -leay32
Build Error: Failed to link D:/Projects/test.exe


Contents of the file is only a import call to bah.libcurlsll and a Print call.

The strange thing however is that when compiling from within MaxIDE or BLIde this works fine.

I've got the latest version of OpenSSL installed (1.0.0.4 -or- 1.0.0d). For it to work with MaxIDE and BLIde I had to move the .a files to C:/MingW/lib.

Installed version of gcc is: gcc (GCC) 3.4.5 (mingw special)

Am I missing something?


Brucey(Posted 2011) [#2]
The .a file should be in the module ssl/lib dir. It needs this to link to the dll.

The path is defined on line 52 of libcurlssl.bmx. :
ModuleInfo "LD_OPTS: -L%PWD%/ssl/lib"

Where %PWD% is the module location in the filesystem.

If it can't find the file in that location, linking will fail.

I've never had problems with it linking, and have never put anything into MinGW for any modules.


Htbaa(Posted 2011) [#3]
OK so I moved the .a files to C:\BlitzMax\mod\bah.mod\libcurlssl.mod\ssl\lib but I'm still getting link errors. I've also made sure my MinGW directory is clean again.

......

And it seems I also need to move the .lib files in there :-). It all works now again.


Brucey(Posted 2011) [#4]
and the file is called libeay32.a ?


Htbaa(Posted 2011) [#5]
Yes. But I had to include the .lib files for it to work.


Brucey(Posted 2011) [#6]
.lib? that's interesting. They're usually only for VS builds....


Htbaa(Posted 2011) [#7]
Windows (?) works in mysterious ways!

I've got no clue why it is, I'm just glad it works :-D.