I
Ian Taite
Help,
I am trying to nail a linking problem, to avoid having to lose about 2
weeks work. I have a backup of my project that compiles and links OK
however changes I made sometime since then have resulted in the
solution not linking with the error below.
The solution comprises of six projects. Five are static library
projects which compile ok. The sixth is an EXE than needs to link in
the other five .lib files. In the evidence below, interface
IContentStream defines three functions namely contentStart,
contentComplete and contentEntry. In the header for IContentStream,
these three methods are declared pure virtual. CContentEntryCache is a
class that implements IContentStream. CacheManager.lib should contain
three classes: CCacheManager, CContentEntryCache and CCacheModule. I
think I have checked the obvious such as making sure the folder holding
the CacheManager.lib file is in the linker/general/additional library
directories and linker/input/additional dependencies names
CacheManager.lib. I am using unmanaged C++ in VS 2003 and I have not
found inspiration by looking at the MSDN help for LNK2001.
Any offers of help would be appreciated, here's some of the linker
output:
Compiling...
LiberatorApp.cpp
Linking...
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.
"/OUT:.\Debug/Liberator.exe" /INCREMENTAL:NO
"/LIBPATH:..\CacheManager\Debug" "/LIBPATH:..\Common\Debug"
"/LIBPATH:..\statistics\debug" "/LIBPATH:..\TransmissionManager\Debug"
"/LIBPATH:..\TransmitterCarouselManager\Debug"
"/NODEFAULTLIB:msvcrtd.lib" "/NODEFAULTLIB:msvcprtd.lib"
"/DELAYLOAD:OleAcc.dll" /DEBUG "/PDB:.\Debug/Liberator.pdb"
/SUBSYSTEM:WINDOWS /MACHINE:X86 ws2_32.lib Common.lib
StatisticsManager.lib TransmissionManager.lib
TransmitterCarouselManager.lib CacheManager.lib DelayImp.lib
"\Ti2000\Liberator Wont Link\Statistics\Debug\StatisticsManager.lib"
"\Ti2000\Liberator Wont
Link\TransmitterCarouselManager\Debug\TransmitterCarouselManager.lib"
"\Ti2000\Liberator Wont Link\Common\Debug\common.lib"
"\Ti2000\Liberator Wont Link\CacheManager\Debug\CacheManager.lib"
"\Ti2000\Liberator Wont
Link\TransmissionManager\Debug\TransmissionManager.lib" DelayImp.lib
".\Debug\Liberator.obj"
".\Debug\LiberatorApp.obj"
".\Debug\LiberatorAppKeys.obj"
".\Debug\LiberatorEventHandler.obj"
".\Debug\LiberatorInfo.obj"
".\Debug\StdAfx.obj"
".\Debug\Liberator.res"
LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to
'/INCREMENTAL:NO' specification
CacheManager.lib(CContentEntryCache.obj) : error LNK2001: unresolved
external symbol "public: virtual int __thiscall
CContentEntryCache::contentEntry(class CCyclicContent *)"
(?contentEntry@CContentEntryCache@@UAEHPAVCCyclicContent@@@Z)
CacheManager.lib(CContentEntryCache.obj) : error LNK2001: unresolved
external symbol "public: virtual int __thiscall
CContentEntryCache::contentComplete(void)"
(?contentComplete@CContentEntryCache@@UAEHXZ)
CacheManager.lib(CContentEntryCache.obj) : error LNK2001: unresolved
external symbol "public: virtual int __thiscall
CContentEntryCache::contentStart(class ATL::COleDateTime,int)"
(?contentStart@CContentEntryCache@@UAEHVCOleDateTime@ATL@@H@Z)
..\Debug/Liberator.exe : fatal error LNK1120: 3 unresolved externals
I am trying to nail a linking problem, to avoid having to lose about 2
weeks work. I have a backup of my project that compiles and links OK
however changes I made sometime since then have resulted in the
solution not linking with the error below.
The solution comprises of six projects. Five are static library
projects which compile ok. The sixth is an EXE than needs to link in
the other five .lib files. In the evidence below, interface
IContentStream defines three functions namely contentStart,
contentComplete and contentEntry. In the header for IContentStream,
these three methods are declared pure virtual. CContentEntryCache is a
class that implements IContentStream. CacheManager.lib should contain
three classes: CCacheManager, CContentEntryCache and CCacheModule. I
think I have checked the obvious such as making sure the folder holding
the CacheManager.lib file is in the linker/general/additional library
directories and linker/input/additional dependencies names
CacheManager.lib. I am using unmanaged C++ in VS 2003 and I have not
found inspiration by looking at the MSDN help for LNK2001.
Any offers of help would be appreciated, here's some of the linker
output:
Compiling...
LiberatorApp.cpp
Linking...
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.
"/OUT:.\Debug/Liberator.exe" /INCREMENTAL:NO
"/LIBPATH:..\CacheManager\Debug" "/LIBPATH:..\Common\Debug"
"/LIBPATH:..\statistics\debug" "/LIBPATH:..\TransmissionManager\Debug"
"/LIBPATH:..\TransmitterCarouselManager\Debug"
"/NODEFAULTLIB:msvcrtd.lib" "/NODEFAULTLIB:msvcprtd.lib"
"/DELAYLOAD:OleAcc.dll" /DEBUG "/PDB:.\Debug/Liberator.pdb"
/SUBSYSTEM:WINDOWS /MACHINE:X86 ws2_32.lib Common.lib
StatisticsManager.lib TransmissionManager.lib
TransmitterCarouselManager.lib CacheManager.lib DelayImp.lib
"\Ti2000\Liberator Wont Link\Statistics\Debug\StatisticsManager.lib"
"\Ti2000\Liberator Wont
Link\TransmitterCarouselManager\Debug\TransmitterCarouselManager.lib"
"\Ti2000\Liberator Wont Link\Common\Debug\common.lib"
"\Ti2000\Liberator Wont Link\CacheManager\Debug\CacheManager.lib"
"\Ti2000\Liberator Wont
Link\TransmissionManager\Debug\TransmissionManager.lib" DelayImp.lib
".\Debug\Liberator.obj"
".\Debug\LiberatorApp.obj"
".\Debug\LiberatorAppKeys.obj"
".\Debug\LiberatorEventHandler.obj"
".\Debug\LiberatorInfo.obj"
".\Debug\StdAfx.obj"
".\Debug\Liberator.res"
LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to
'/INCREMENTAL:NO' specification
CacheManager.lib(CContentEntryCache.obj) : error LNK2001: unresolved
external symbol "public: virtual int __thiscall
CContentEntryCache::contentEntry(class CCyclicContent *)"
(?contentEntry@CContentEntryCache@@UAEHPAVCCyclicContent@@@Z)
CacheManager.lib(CContentEntryCache.obj) : error LNK2001: unresolved
external symbol "public: virtual int __thiscall
CContentEntryCache::contentComplete(void)"
(?contentComplete@CContentEntryCache@@UAEHXZ)
CacheManager.lib(CContentEntryCache.obj) : error LNK2001: unresolved
external symbol "public: virtual int __thiscall
CContentEntryCache::contentStart(class ATL::COleDateTime,int)"
(?contentStart@CContentEntryCache@@UAEHVCOleDateTime@ATL@@H@Z)
..\Debug/Liberator.exe : fatal error LNK1120: 3 unresolved externals