开发者

Using OpenSSL library in D

开发者 https://www.devze.com 2023-02-19 22:02 出处:网络
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:

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:

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
0

精彩评论

暂无评论...
验证码 换一张
取 消