Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

yachiro

macrumors newbie
Original poster
Jun 22, 2011
1
0
Hello guys,

I'm a french student in engineering school and i'm working in my company on developing a TLSclient for MAC.

But for now, I have a little problem for building my project on MACOSX (working very well on linux) and most particulary in using openssl libs.

Here's my console error I hope you could help me deal with

gcc -lpthread -o *.o /opt//local/var/macports/software/openssl97/0.9.7m_0/opt/local/lib/openssl97/lib/libssl.a /opt//local/var/macports/software/openssl97/0.9.7m_0/opt/local/lib/openssl97/lib/libcrypto.a -ldl
Undefined symbols:
"_SSL_CTX_set_info_callback", referenced from:
_MTLSServer_Setup in MTLSServer.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [mtls_server] Error 1

Thanks for your help

Kind regards

P.S : I'm french so if you have any problem understanding me feel free to tell me.
 
Don't go so deep into the MacPorts directory structure. When a port is installed, the headers are put in /opt/local/include and the library files are put in /opt/local/lib.

Compile with (for each .c file):
Code:
gcc -I/opt/local/include -c filename.c

Link with (assuming you do actually want to statically link with libssl, libcrypto and libz):
Code:
gcc -o progname -lpthread -ldl /opt/local/lib/libz.a /opt/local/lib/libssl.a /opt/local/lib/libcrypto.a *.o
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.