<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: compile C program static, mysql in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/compile-c-program-static-mysql/m-p/5015569#M96664</link>
    <description>Great!!!&lt;BR /&gt;Now it works fine.&lt;BR /&gt;&lt;BR /&gt;Now I understand also the difference between static and dynamic libraries. I always thought, that I have to make them static to get an portable binary but it's all about archives. xD&lt;BR /&gt;&lt;BR /&gt;Matthias Pohling</description>
    <pubDate>Fri, 24 Nov 2006 04:18:23 GMT</pubDate>
    <dc:creator>Pohling</dc:creator>
    <dc:date>2006-11-24T04:18:23Z</dc:date>
    <item>
      <title>compile C program static, mysql</title>
      <link>https://community.hpe.com/t5/operating-system-linux/compile-c-program-static-mysql/m-p/5015567#M96662</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I'm writing a MySql Client for HPUX 11.11. &lt;BR /&gt;When I compile it dynamicly it all works fine.&lt;BR /&gt;But I need to compile it static because I want to use the same binaries on different systems without installing the mysql-API.&lt;BR /&gt;So I tried to compile it this way:&lt;BR /&gt;&lt;BR /&gt;cc -noshared mysql-statement-send.c -o outputBinaary -I'/opt/mysql/include/mysql'  -L'/opt/mysql/lib/mysql' -lmysqlclient -lcrypt -lnsl -lm&lt;BR /&gt;&lt;BR /&gt;This is the errormessage I get:&lt;BR /&gt;/usr/ccs/bin/ld: Unsatisfied symbols:&lt;BR /&gt;   shl_load (code)&lt;BR /&gt;   shl_findsym (code)&lt;BR /&gt;&lt;BR /&gt;How can I avoid this problem?&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Matthias</description>
      <pubDate>Thu, 23 Nov 2006 10:45:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/compile-c-program-static-mysql/m-p/5015567#M96662</guid>
      <dc:creator>Pohling</dc:creator>
      <dc:date>2006-11-23T10:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: compile C program static, mysql</title>
      <link>https://community.hpe.com/t5/operating-system-linux/compile-c-program-static-mysql/m-p/5015568#M96663</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;to create a runnable executable on another system without a mySQL-API installation (does this make sense?), there is no need to link a fully archived version. Just use the shared version of the mysql library and use the default (shared libs) for the rest of the libraries, e.g.:&lt;BR /&gt;&lt;BR /&gt;cc mysql-statement-send.c -o outputBinaary -I'/opt/mysql/include/mysql' -L'/opt/mysql/lib/mysql' -Wl,-a,archive -lmysqlclient -Wl,-a,default -lcrypt -lnsl -lm&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;BR /&gt;PS: Untested</description>
      <pubDate>Thu, 23 Nov 2006 17:11:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/compile-c-program-static-mysql/m-p/5015568#M96663</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-11-23T17:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: compile C program static, mysql</title>
      <link>https://community.hpe.com/t5/operating-system-linux/compile-c-program-static-mysql/m-p/5015569#M96664</link>
      <description>Great!!!&lt;BR /&gt;Now it works fine.&lt;BR /&gt;&lt;BR /&gt;Now I understand also the difference between static and dynamic libraries. I always thought, that I have to make them static to get an portable binary but it's all about archives. xD&lt;BR /&gt;&lt;BR /&gt;Matthias Pohling</description>
      <pubDate>Fri, 24 Nov 2006 04:18:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/compile-c-program-static-mysql/m-p/5015569#M96664</guid>
      <dc:creator>Pohling</dc:creator>
      <dc:date>2006-11-24T04:18:23Z</dc:date>
    </item>
  </channel>
</rss>

