Overview
Features
Download
Documentation
Community
Add-Ons & Services

LNK2005 Poco::AtomicCounter symbols multiply defined

Please post support and help requests here.

LNK2005 Poco::AtomicCounter symbols multiply defined

Postby dbarzo » 02 May 2013, 15:58

Hi,
i'm sorry if the question is trivial but I cannot figure out!
I build my DLL which is linked to POCO debug shared 1.4.6 and I get the following linker error:

Code: Select all
1>PocoFoundationd.lib(PocoFoundationd.dll) : error LNK2005: "public: int __thiscall Poco::AtomicCounter::operator++(void)" (??EAtomicCounter@Poco@@QAEHXZ) already defined in EuroSvrMessages.obj
1>PocoFoundationd.lib(PocoFoundationd.dll) : error LNK2005: "public: int __thiscall Poco::AtomicCounter::operator--(void)" (??FAtomicCounter@Poco@@QAEHXZ) already defined in EuroSvrMessages.obj


The only file EuroSvrMessages.h includes is "Poco/SharedPtr.h"
The linker path is:
Code: Select all
/OUT:"D:\src\SDK\projects\win32\VS2010\..\..\..\bin\dynamic\SDKd.dll"
/NOLOGO
/LIBPATH:"D:\lib\boost_1_53_0\stage\lib"
/LIBPATH:"D:\src\SDK\lib"
/LIBPATH:"D:\lib\poco-1.4.6\lib"
/DLL "libprotobufd.lib"
    "PocoUtild.lib"
    "PocoNetd.lib"
    "PocoXMLd.lib"
    "PocoFoundationd.lib"
    "kernel32.lib" "user32.lib" "gdi32.lib"
    "winspool.lib" "comdlg32.lib" "advapi32.lib"
    "shell32.lib" "ole32.lib" "oleaut32.lib"
    "uuid.lib" "odbc32.lib" "odbccp32.lib"
/MANIFEST
/ManifestFile:"Debug_Dyn\SDKd.dll.intermediate.manifest"
/ALLOWISOLATION
/MANIFESTUAC:"level='asInvoker' uiAccess='false'"
/DEBUG
/PDB:"D:\src\SDK\bin\dynamic\SDKd.pdb"
/MAP":D:\src\SDK\bin\dynamic\SDKd.map"
/PGD:"D:\src\SDK\bin\dynamic\SDKd.pgd"
/TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE


What can cause the problem?

BR,
Daniele
dbarzo
 
Posts: 38
Joined: 14 Jan 2013, 17:15
Location: Italy

Re: LNK2005 Poco::AtomicCounter symbols multiply defined

Postby dbarzo » 03 May 2013, 09:25

I'm sorry, it was my fault...
..wrong #defines with multiply file inclusion.

BR,
Daniele.
dbarzo
 
Posts: 38
Joined: 14 Jan 2013, 17:15
Location: Italy


Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests