<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">For some reason you have to link pq
      after everything else. It doesn't do this with sqlite or mysql.<br>
      <br>
      david@ubuntu:~/Projects/UrShop$ gcc -Werror  -pthread 
      -L/usr/local/lib -lurweb_http -lurweb /tmp/webapp.o -lpq -lm
      -lcrypto -lssl -o /home/david/Projects/UrShop/urshop.exe -g
      /home/david/Projects/UrShop/lib/sha.o<br>
      /usr/bin/ld: /usr/local/lib/liburweb.so: undefined reference to
      symbol '<a class="moz-txt-link-abbreviated" href="mailto:SHA256_Init@@OPENSSL_1.0.0">SHA256_Init@@OPENSSL_1.0.0</a>'<br>
      /usr/bin/ld: note: '<a class="moz-txt-link-abbreviated" href="mailto:SHA256_Init@@OPENSSL_1.0.0">SHA256_Init@@OPENSSL_1.0.0</a>' is defined in DSO
      /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libcrypto.so
      so try adding it to the linker command line<br>
      /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libcrypto.so:
      could not read symbols: Invalid operation<br>
      collect2: ld returned 1 exit status<br>
      <br>
      <br>
      david@ubuntu:~/Projects/UrShop$ gcc -Werror  -pthread 
      -L/usr/local/lib -lurweb_http -lurweb /tmp/webapp.o -lm -lcrypto
      -lssl -lpq -o /home/david/Projects/UrShop/urshop.exe -g
      /home/david/Projects/UrShop/lib/sha.o<br>
      <br>
      <br>
      On 10/20/2012 09:03 AM, Adam Chlipala wrote:<br>
    </div>
    <blockquote cite="mid:5082A116.2080800@csail.mit.edu" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      On 10/20/2012 08:54 AM, David Snider wrote:
      <blockquote cite="mid:50829F1B.80508@davidsnider.net" type="cite">
        <meta http-equiv="content-type" content="text/html;
          charset=ISO-8859-1">
        <pre class="lang-c prettyprint"><code><span class="pun">I'm trying to make a C FFI that returns the SHA256 of a string and this is what I get when I try to compile with my library added:

david@ubuntu:~/Projects/UrShop$ urweb urshop
/usr/bin/ld: /usr/local/lib/liburweb.so: undefined reference to symbol '<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:SHA256_Init@@OPENSSL_1.0.0">SHA256_Init@@OPENSSL_1.0.0</a>'
/usr/bin/ld: note: '<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:SHA256_Init@@OPENSSL_1.0.0">SHA256_Init@@OPENSSL_1.0.0</a>' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libcrypto.so so try adding it to the linker command line
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libcrypto.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

What step am I missing?</span></code>
  </pre>
      </blockquote>
      <br>
      Run 'urweb' with the '-debug' option and then tweak the gcc
      command
      lines it uses until they work.  Once you figure out what was
      wrong, I
      can comment on the right way to get 'urweb' itself to use
      different
      command lines.<br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Ur mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Ur@impredicative.com">Ur@impredicative.com</a>
<a class="moz-txt-link-freetext" href="http://www.impredicative.com/cgi-bin/mailman/listinfo/ur">http://www.impredicative.com/cgi-bin/mailman/listinfo/ur</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>