Attempt 1, Vanilla Link to Library
I\'m trying to use a patched version of OpenSSL (so DTLS is easier to use). OpenSSL is in
/usr/lo
Your compilation command appears to work on OSX but is actually compiling and linking with the system-provided OpenSSL rather than the version you wanted. It fails outright on Ubuntu because you don't have the headers and development library links for the system OpenSSL installed.
This is because you have the search path options mixed up, and you need two of them. To tell GCC where headers are you use -I. To tell it where object-code libraries are you use -L. The compilation command you need, ON BOTH SYSTEMS, is something like this:
$ gcc -I /usr/local/openssl-1.0.1c/include -L /usr/local/openssl-1.0.1c/lib \
-o server server.c -lssl -lcrypto