[Ur] Trouble getting started. Link errors.

Adam Chlipala adamc at impredicative.com
Tue Jan 3 08:31:09 EST 2012


Steve Sims wrote:
> steve at truman:~/simsnet$ gcc -Werror -lm  -pthread 
>  -L/usr/local/lib/urweb/.. -lurweb -lurweb_http   -lssl -lcrypto 
>  /usr/local/lib/liburweb.a
> /tmp/webapp.o -o /home/steve/simsnet/simsnet.exe  -g
> /usr/local/lib/liburweb.a(urweb.o): In function `uw_Basis_rand':
> /home/steve/urweb/src/c/urweb.c:3821: undefined reference to `RAND_bytes'

If I remember correctly, libraries must be referenced on the command 
line in _reverse_ dependency order, so this message is probably telling 
you that you included liburweb after libssl, while it should have been 
included before.

Another interesting test would involve running the urweb compilation 
with the '-static' flag.



More information about the Ur mailing list