title: libmysqlclient.a is nowhere to be found
body: <p>On an Amazon EC2 (<code>uname -r</code> gives "3.4.37-40.44.amzn1.x86_64", which I hear is based on Cent OS) I tried installing:</p>
  
  <pre><code>yum install mysql
  yum install mysql-devel
  </code></pre>
  
  <p>And even</p>
  
  <pre><code>yum install mysql-libs
  </code></pre>
  
  <p>(Due to <a href="http://opensips-open-sip-server.1449251.n2.nabble.com/libmysqlclient-dev-for-CentOS-td7580351.html" rel="noreferrer">this thread</a>.)</p>
  
  <p>I'm trying to compile a program and link the MySQL libraries to it.  This works <strong>fine</strong> on my Mac, (but the Mac <em>has</em> <code>libmysqlclient.a</code>).  <code>libmysqlclient.a</code> is absolutely nowhere to be found on this machine.  All it has is <code>libmysqlclient.so</code>, and many versions of it too.</p>
  
  <pre><code>$ sudo find / -name libmysqlclient*
  </code></pre>
  
  <p>Gives</p>
  
  <pre><code>/usr/lib64/mysql/libmysqlclient_r.so
  /usr/lib64/mysql/libmysqlclient.so
  /usr/lib64/mysql/libmysqlclient.so.18
  /usr/lib64/mysql/libmysqlclient.so.18.0.0
  /etc/alternatives/libmysqlclient
  /etc/alternatives/libmysqlclient_r
  </code></pre>
  
  <p>And</p>
  
  <pre><code>ls -l /usr/lib64/mysql
  </code></pre>
  
  <p>Gives</p>
  
  <pre><code>lrwxrwxrwx 1 root root      34 Apr 11 19:21 libmysqlclient_r.so -&gt; /etc/alternatives/libmysqlclient_r
  lrwxrwxrwx 1 root root      32 Apr 11 19:21 libmysqlclient.so -&gt; /etc/alternatives/libmysqlclient
  lrwxrwxrwx 1 root root      24 Apr 11 18:24 libmysqlclient.so.18 -&gt; libmysqlclient.so.18.0.0
  -rwxr-xr-x 1 root root 2983360 Mar 14 10:09 libmysqlclient.so.18.0.0
  -rwxr-xr-x 1 root root   11892 Mar 14 09:12 mysqlbug
  -rwxr-xr-x 1 root root    7092 Mar 14 10:08 mysql_config
  </code></pre>
  
  <p>So the only real file is <code>libmysqlclient.so.18.0.0</code>.</p>
  
  <p>The compiler command:</p>
  
  <pre><code>g++ main.cpp -L/usr/lib64/mysql -lmysqlclient.so.18.0.0
  </code></pre>
  
  <p>Fails with</p>
  
  <pre><code>/usr/bin/ld: cannot find -lmysqlclient.so.18.0.0
  collect2: ld returned 1 exit status
  </code></pre>
  
  <p>So somebody is lying or I got completely ripped off at the YUM repo and was not given my <code>libmysqlclient.a</code> like I was supposed to.</p>
  
  <p>(I avoided using the many symlinks on the system so I could eliminate possible issues).</p>