Linkage problem with dylib
Linkage problem with dylib
- Subject: Linkage problem with dylib
- From: Paul Beckingham <email@hidden>
- Date: Tue, 14 Jun 2005 21:36:06 -0400
I am running 10.4.1, and having a problem linking to libssl.dylib. Here is my code:
// sample.cpp using namespace std; #include <openssl/sha.h>
int main (int, char**) { char md [21] = {0}; SHA1 ((unsigned char *)"This is a test", 14, (unsigned char*) md); return 0; }
Here is my makefile:
# sample.make .cpp.o: g++ -c -g $<
../bin/sample: $(PROJECT) sample.o g++ sample.o -lssl -o sample
And here is the result:
% make -f sample.make g++ sample.o -lssl -o sample /usr/bin/ld: Undefined symbols: _SHA1 collect2: ld returned 1 exit status make: *** [../bin/sample] Error 1
Could someone tell me why I cannot link to /usr/lib/libssl.dylib (itself a symlink to libssl.0.9.7.dylib)?
Much appreciated. Paul. |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden