On 03/18/2013 07:23 PM, Daniel Patterson wrote:
The gcc command that urweb used was:
gcc -Werror -pthread /usr/local/lib/liburweb_cgi.a
/usr/local/lib/liburweb.a /tmp/webapp.o -lm -lcrypto -lssl -o
/path/to/binary.exe -g
And what I needed to get it to be linked statically is:
gcc -static -Werror -pthread /usr/local/lib/liburweb_cgi.a
/usr/local/lib/liburweb.a /tmp/webapp.o -lm -lcrypto -lssl -ldl -lz
-o /path/to/binary.exe -g
OK, I've pushed a patch that should choose this command line when the
'-static' flag is passed to 'urweb'. Does it work?
I'm a little nervous about my change, which hardcodes "-ldl -lz". I
hope all platforms' OpenSSL libraries have the same dependencies! The
Autoconf macro for OpenSSL that I pulled from somewhere doesn't seem to
be setting environment variables that I could use to do this "right."
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur