title: Library linker errors driving me mad
body: <p>It's me again. I'm back with an all new project and an all new problem.
  I am trying to implement something for Growl. Either using a static or shared library (both are provided). I included the necessary header and linked to the library. (2 ways actually, once through the project properties and the other through a pragma statement). However, im still receiving the following linker errors:</p>
  
  <pre><code>error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Growl::Growl(enum Growl_Protocol,char const * const,char const * const,char const * * const,int)" (__imp_??0Growl@@QAE@W4Growl_Protocol@@QBD1QAPBDH@Z)
  error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Growl::~Growl(void)" (__imp_??1Growl@@QAE@XZ)
  fatal error LNK1120: 2 unresolved externals
  </code></pre>
  
  <p>The line of code that is causing these linker errors is this line:</p>
  
  <pre><code>const char *n[2] = { "username" , "password" };
  Growl *growl = new Growl(GROWL_TCP,NULL, "Appname", (const char **const)n,2);
  </code></pre>
  
  <p>The header file is being included at the top of the file and I am linking with the following line:</p>
  
  <pre><code>#include "..\\..\\..\\libs\\Growl\\growl++.hpp"
  #pragma comment(lib, "..\\..\\..\\libs\\Growl\\libgrowl-static++.lib")
  </code></pre>
  
  <p>The header source can be found here:
  <a href="https://github.com/psinnott/gntp-send/blob/master/headers/growl%2B%2B.hpp" rel="nofollow">https://github.com/psinnott/gntp-send/blob/master/headers/growl%2B%2B.hpp</a></p>
  
  <p>I retrieved the pre-built binaries from the following page:
      <a href="https://github.com/psinnott/gntp-send/wiki/Windows" rel="nofollow">https://github.com/psinnott/gntp-send/wiki/Windows</a></p>
  
  <p>Some extra info: I do have my Project Propeties character set to use Multi-Byte Character Set, im under the assumption this shouldn't affect anything. This is also a Win32 Console application.</p>
  
  <p>Where am I going wrong?</p>
  
  <p><b>Update:</b> <br>
  Found this via google:
  <a href="http://groups.google.com/group/growl-for-windows/browse_thread/thread/6c48a62454d062f1" rel="nofollow">http://groups.google.com/group/growl-for-windows/browse_thread/thread/6c48a62454d062f1</a></p>
  
  <p>Followed the instructions:<br>
  Added the libgrowlstatic.lib (alongside libgrowlstatic++.lib)<br>
  Added the pre-processor definitions, <b>GROWL_STATIC</b> and <b>GROWL_CPP_STATIC</b></p>
  
  <p>Got lots of error including:<br></p>
  
  <pre><code>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
  LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
  fatal error LNK1169: one or more multiply defined symbols found
  </code></pre>
  
  <p>So I added the following line to Project properties, Linker, Command Line:</p>
  
  <pre><code>/NODEFAULTLIB:MSVCRTD /NODEFAULTLIB:LIBCMT 
  </code></pre>
  
  <p>Now im getting alot more errors including some of the following:</p>
  
  <pre><code>libgrowl-static.lib(tcp.obj) : error LNK2019: unresolved external symbol _atoi referenced in function _growl_tcp_parse_hostname
  libgrowl-static.lib(tcp.obj) : error LNK2019: unresolved external symbol _strchr referenced in function _growl_tcp_parse_hostname
  libgrowl-static.lib(growl-static.obj) : error LNK2019: unresolved external symbol _fseek referenced in function _growl_tcp_register
  libgrowl-static.lib(growl-static.obj) : error LNK2019: unresolved external symbol _fopen referenced in function _growl_tcp_register
  libgrowl-static.lib(growl-static.obj) : error LNK2019: unresolved external symbol _strcpy referenced in function _growl_udp_notify
  </code></pre>
  
  <p>Been at this for several hours and can't seem to figure it out. 10+ views and no replies?
  I swear im not being lazy. I looked into one of the answers provided about libraries but didn't have much luck. Nothing explained why this is acting the way it is. Please help!</p>