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:
- /us开发者_StackOverflowr/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.
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).
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
精彩评论