2

I have trouble using the OpenSSL library with dmd+tango bundle on Ubuntu 10.04. I have compilled OpenSSL 1.0.0d. I've got files:

  • /usr/local/ssl/lib/libssl.a
  • /usr/local/ssl/lib/libcrypto.a

So, I'm using them like this:

$ dmd myfile.d -L/usr/local/ssl/lib -L-lssl -L-lcrypto

And the error is:

/usr/bin/ld: /usr/local/ssl/lib: No such file: File format not recognized
collect2: ld returned 1 exit status
--- errorlevel 1

I have tried this also with OpenSSL 0.9.8r. I have no idea :/

I can generate ssl certificates, so I assume the OpenSSL works correct.

Please help me.

2 Answers2

3

I believe that second argument should be -L-L/usr/local/ssl/lib (-L once to tell the compiler to pass the rest to the linker, and again for the ld -L option which adds a directory to the library search path).

Vladimir Panteleev
  • 24,651
  • 6
  • 70
  • 114
0

Thank You CyberShadow for your reply. You're right with -L-L params.

In my case it should be this way:

$ dmd myfile.d -L-L/usr/local/ssl/lib -L-lssl -L-lcrypto -L-ldl