Problems with ld.exe under Windows

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with ld.exe under Windows

enricot

Hello there,

 

I have installed mingw 5.1.4 on my windows xp machine and need to use some ssl libraries. I installed openssl for windows and followed the setup instructions (copied the openssl folder with the header files to the mingw/include folder etc).

 

However when using “ld.exe –lssl” in a command prompt I get “ld.exe: cannot find –lssl”

 

Now I am fairly new at this, to my understanding this means its trying to find a library called ssl but cant find it in any of the directories it searches by default. running “ld.exe –verbose –lssl” returns:

 

==================================================

attempt to open c:\mingw32\bin\../mingw32/lib/libssl.dll.a failed

attempt to open c:\mingw32\bin\../mingw32/lib/ssl.dll.a failed

attempt to open c:\mingw32\bin\../mingw32/lib/libssl.a failed

attempt to open c:\mingw32\bin\../mingw32/lib/ssl.lib failed

attempt to open c:\mingw32\bin\../mingw32/lib/libssl.dll failed

attempt to open c:\mingw32\bin\../mingw32/lib/ssl.dll failed

attempt to open c:\mingw32\bin\../mingw32/lib\libssl.a failed

attempt to open /mingw/mingw32/lib/libssl.dll.a failed

attempt to open /mingw/mingw32/lib/ssl.dll.a failed

attempt to open /mingw/mingw32/lib/libssl.a failed

attempt to open /mingw/mingw32/lib/ssl.lib failed

attempt to open /mingw/mingw32/lib/libssl.dll failed

attempt to open /mingw/mingw32/lib/ssl.dll failed

attempt to open /mingw/mingw32/lib\libssl.a failed

attempt to open /mingw/lib/libssl.dll.a failed

attempt to open /mingw/lib/ssl.dll.a failed

attempt to open /mingw/lib/libssl.a failed

attempt to open /mingw/lib/ssl.lib failed

attempt to open /mingw/lib/libssl.dll failed

attempt to open /mingw/lib/ssl.dll failed

attempt to open /mingw/lib\libssl.a failed

attempt to open /usr/local/lib/libssl.dll.a failed

attempt to open /usr/local/lib/ssl.dll.a failed

attempt to open /usr/local/lib/libssl.a failed

attempt to open /usr/local/lib/ssl.lib failed

attempt to open /usr/local/lib/libssl.dll failed

attempt to open /usr/local/lib/ssl.dll failed

attempt to open /usr/local/lib\libssl.a failed

attempt to open /lib/libssl.dll.a failed

attempt to open /lib/ssl.dll.a failed

attempt to open /lib/libssl.a failed

attempt to open /lib/ssl.lib failed

attempt to open /lib/libssl.dll failed

attempt to open /lib/ssl.dll failed

attempt to open /lib\libssl.a failed

attempt to open /usr/lib/libssl.dll.a failed

attempt to open /usr/lib/ssl.dll.a failed

attempt to open /usr/lib/libssl.a failed

attempt to open /usr/lib/ssl.lib failed

attempt to open /usr/lib/libssl.dll failed

attempt to open /usr/lib/ssl.dll failed

attempt to open /usr/lib\libssl.a failed

attempt to open c:\mingw32\bin\../mingw32/lib/libssl.dll.a failed

attempt to open c:\mingw32\bin\../mingw32/lib/ssl.dll.a failed

attempt to open c:\mingw32\bin\../mingw32/lib/libssl.a failed

attempt to open c:\mingw32\bin\../mingw32/lib/ssl.lib failed

attempt to open c:\mingw32\bin\../mingw32/lib/libssl.dll failed

attempt to open c:\mingw32\bin\../mingw32/lib/ssl.dll failed

attempt to open c:\mingw32\bin\../mingw32/lib\ssl.lib failed

attempt to open /mingw/mingw32/lib/libssl.dll.a failed

attempt to open /mingw/mingw32/lib/ssl.dll.a failed

attempt to open /mingw/mingw32/lib/libssl.a failed

attempt to open /mingw/mingw32/lib/ssl.lib failed

attempt to open /mingw/mingw32/lib/libssl.dll failed

attempt to open /mingw/mingw32/lib/ssl.dll failed

attempt to open /mingw/mingw32/lib\ssl.lib failed

attempt to open /mingw/lib/libssl.dll.a failed

attempt to open /mingw/lib/ssl.dll.a failed

attempt to open /mingw/lib/libssl.a failed

attempt to open /mingw/lib/ssl.lib failed

attempt to open /mingw/lib/libssl.dll failed

attempt to open /mingw/lib/ssl.dll failed

attempt to open /mingw/lib\ssl.lib failed

attempt to open /usr/local/lib/libssl.dll.a failed

attempt to open /usr/local/lib/ssl.dll.a failed

attempt to open /usr/local/lib/libssl.a failed

attempt to open /usr/local/lib/ssl.lib failed

attempt to open /usr/local/lib/libssl.dll failed

attempt to open /usr/local/lib/ssl.dll failed

attempt to open /usr/local/lib\ssl.lib failed

attempt to open /lib/libssl.dll.a failed

attempt to open /lib/ssl.dll.a failed

attempt to open /lib/libssl.a failed

attempt to open /lib/ssl.lib failed

attempt to open /lib/libssl.dll failed

attempt to open /lib/ssl.dll failed

attempt to open /lib\ssl.lib failed

attempt to open /usr/lib/libssl.dll.a failed

attempt to open /usr/lib/ssl.dll.a failed

attempt to open /usr/lib/libssl.a failed

attempt to open /usr/lib/ssl.lib failed

attempt to open /usr/lib/libssl.dll failed

attempt to open /usr/lib/ssl.dll failed

attempt to open /usr/lib\ssl.lib failed

ld.exe: cannot find –lssl

 

is it looking for ssl.h, which came with my openssl installation? If yes how to I add it to above list? I might be completely wrong with my deductions of course, im just trying to get it past cannot find –lssl.


Any help appreciated.

 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Problems with ld.exe under Windows

Brian Dessent
[This is a resend.  Apparently SF.net ate some email.]

> Enrico Teterra wrote:

> is it looking for ssl.h, which came with my openssl installation? If
> yes how to I add it to above list? I might be completely wrong with my
> deductions of course, im just trying to get it past cannot find –lssl.

No, it's looking for a library not a header.  They are two separate
things: compilers look for headers and linkers look for libraries.  You
didn't actually install the openssl library, you just copied some
headers.  You need to understand the difference.

A header contains function prototypes and definitions of types and
macros and so on, but it does not[1] contain any actual code, which is
in the library. To correctly install openssl you need to configure and
build the library, not just copy headers.

Brian

[1] Some headers can contain implementations of inline functions, and in
the case of C++ templates can actually contain the majority of the
code.  But that's not the case here.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Problems with ld.exe under Windows

Greg Chicares
On 2008-09-20 09:31Z, Brian Dessent wrote:
> [This is a resend.  Apparently SF.net ate some email.]

Looks like they ate my 2008-09-19T12:17Z reply, too.
It never got echoed back, and isn't archived here:
  http://thread.gmane.org/gmane.comp.gnu.mingw.user/27653
[It said nothing that Brian hasn't already said.]

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users