Domanda

I have a rather large c/c++ CGI project which references several external libraries (OpenSSL, FastCGI, Boost, etc). I verified that every single library is built with /MT like our main executable project. However, when including certain headers (for example, the FastCGI header), I get hundreds of linker errors like these:

Error 226 error LNK1169: one or more multiply defined symbols found

Error 121 error LNK2005: "protected: __thiscall std::basic_ios >::basic_ios >(void)" (??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ) already defined in libfcgi.lib(libfcgi.dll) libcpmt.lib(cout.obj)

Error 208 error LNK2005: "protected: __thiscall std::basic_ios >::basic_ios >(void)" (??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ) already defined in libfcgi.lib(libfcgi.dll) * CIL library ( CIL module *)

I looked at libfcgi again and verified /MT and recompiled to no avail. I'm at a loss... where are these library conflicts coming from? What's a good way to resolve linker errors such as these? (Visual Studio 2012)

È stato utile?

Soluzione

Compiling FastCGI as a static library fixed the problem.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top