By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,154 Members | 1,052 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,154 IT Pros & Developers. It's quick & easy.

LNK2001 link errors

P: n/a
Hello

I am using some classes from a third party and have included them in my
projecxt and am compiling and linking with them.

Everything compiles ok but I get these link errors:

I added all your files to my project and recompiled. Now everything compiles
as before but get these link errors:

Linking...
Win32Exception.obj : error LNK2001: unresolved external symbol "class
std::basic_string,class std::allocator __cdecl
JetByteTools::Win32::GetLastErrorMessage(unsigned long)"
(?GetLastErrorMessage@Win32@JetB
yteTools@@YA?AV?$basic_string@DU?$char_traits@D@st d@@V?$allocator@D@2@@std@@
K@Z)
SocketServer.obj : error LNK2001: unresolved external symbol "class
std::basic_string,class std::allocator __cdecl
JetByteTools::Win32::GetLastErrorMessage(unsigned long)"
(?GetLastErrorMessage@Win32@JetByt
eTools@@YA?AV?$basic_string@DU?$char_traits@D@std@ @V?$allocator@D@2@@std@@K@
Z)
ThreadPool.obj : error LNK2001: unresolved external symbol "class
std::basic_string,class std::allocator __cdecl
JetByteTools::Win32::GetLastErrorMessage(unsigned long)"
(?GetLastErrorMessage@Win32@JetByteT
ools@@YA?AV?$basic_string@DU?$char_traits@D@std@@V ?$allocator@D@2@@std@@K@Z)
IOBuffer.obj : error LNK2001: unresolved external symbol "void __cdecl
JetByteTools::Win32::Output(class std::basic_string,class std::allocator >
const &)" (?Output@Win32@JetByteTools@@YAXABV?$basic_string@ DU
?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
SocketServer.obj : error LNK2001: unresolved external symbol "void __cdecl
JetByteTools::Win32::Output(class std::basic_string,class std::allocator >
const &)" (?Output@Win32@JetByteTools@@YAXABV?$basic_strin
g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z )
ThreadPool.obj : error LNK2001: unresolved external symbol "void __cdecl
JetByteTools::Win32::Output(class std::basic_string,class std::allocator >
const &)" (?Output@Win32@JetByteTools@@YAXABV?$basic_string@
DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
Debug/CubaMgr.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

I have a main (sort of global .h file and in there I have #include'd the .h
file I need from the range of third party headers.

There is no external library required so I am confused as to what would
cause this problem?
Dec 16 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Angus wrote:
Hello

I am using some classes from a third party and have included them in my
projecxt and am compiling and linking with them.

Everything compiles ok but I get these link errors:

I added all your files to my project and recompiled. Now everything compiles
as before but get these link errors:

Linking...
Win32Exception.obj : error LNK2001: unresolved external symbol "class
std::basic_string,class std::allocator __cdecl
JetByteTools::Win32::GetLastErrorMessage(unsigned long)"
(?GetLastErrorMessage@Win32@JetB
yteTools@@YA?AV?$basic_string@DU?$char_traits@D@st d@@V?$allocator@D@2@@std@@
K@Z)
SocketServer.obj : error LNK2001: unresolved external symbol "class
std::basic_string,class std::allocator __cdecl
JetByteTools::Win32::GetLastErrorMessage(unsigned long)"
(?GetLastErrorMessage@Win32@JetByt
eTools@@YA?AV?$basic_string@DU?$char_traits@D@std@ @V?$allocator@D@2@@std@@K@
Z)
ThreadPool.obj : error LNK2001: unresolved external symbol "class
std::basic_string,class std::allocator __cdecl
JetByteTools::Win32::GetLastErrorMessage(unsigned long)"
(?GetLastErrorMessage@Win32@JetByteT
ools@@YA?AV?$basic_string@DU?$char_traits@D@std@@V ?$allocator@D@2@@std@@K@Z)
IOBuffer.obj : error LNK2001: unresolved external symbol "void __cdecl
JetByteTools::Win32::Output(class std::basic_string,class std::allocator >
const &)" (?Output@Win32@JetByteTools@@YAXABV?$basic_string@ DU
?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
SocketServer.obj : error LNK2001: unresolved external symbol "void __cdecl
JetByteTools::Win32::Output(class std::basic_string,class std::allocator >
const &)" (?Output@Win32@JetByteTools@@YAXABV?$basic_strin
g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z )
ThreadPool.obj : error LNK2001: unresolved external symbol "void __cdecl
JetByteTools::Win32::Output(class std::basic_string,class std::allocator >
const &)" (?Output@Win32@JetByteTools@@YAXABV?$basic_string@
DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
Debug/CubaMgr.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

I have a main (sort of global .h file and in there I have #include'd the .h
file I need from the range of third party headers.

There is no external library required so I am confused as to what would
cause this problem?
Learn how to use your linker.

I'd bet you forgot to add to your project the .cpp file that
defines the relevant symbols.

HTH,
- J.
Dec 16 '06 #2

P: n/a
On Dec 16, 11:03 am, "Angus" <nos...@gmail.comwrote:
Hello

I am using some classes from a third party and have included them in my
projecxt and am compiling and linking with them.

Everything compiles ok but I get these link errors:

I added all your files to my project and recompiled. Now everything compiles
as before but get these link errors:

Linking...
Win32Exception.obj : error LNK2001: unresolved external symbol "class
std::basic_string,class std::allocator __cdecl
JetByteTools::Win32::GetLastErrorMessage(unsigned long)"
(?GetLastErrorMessage@Win32@JetB
yteTools@@YA?AV?$basic_string@DU?$char_traits@D@st d@@V?$allocator@D@2@@std@@
K@Z)
SocketServer.obj : error LNK2001: unresolved external symbol "class
std::basic_string,class std::allocator __cdecl
JetByteTools::Win32::GetLastErrorMessage(unsigned long)"
(?GetLastErrorMessage@Win32@JetByt
eTools@@YA?AV?$basic_string@DU?$char_traits@D@std@ @V?$allocator@D@2@@std@@K@
Z)
ThreadPool.obj : error LNK2001: unresolved external symbol "class
std::basic_string,class std::allocator __cdecl
JetByteTools::Win32::GetLastErrorMessage(unsigned long)"
(?GetLastErrorMessage@Win32@JetByteT
ools@@YA?AV?$basic_string@DU?$char_traits@D@std@@V ?$allocator@D@2@@std@@K@Z)
IOBuffer.obj : error LNK2001: unresolved external symbol "void __cdecl
JetByteTools::Win32::Output(class std::basic_string,class std::allocator >
const &)" (?Output@Win32@JetByteTools@@YAXABV?$basic_string@ DU
?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
SocketServer.obj : error LNK2001: unresolved external symbol "void __cdecl
JetByteTools::Win32::Output(class std::basic_string,class std::allocator >
const &)" (?Output@Win32@JetByteTools@@YAXABV?$basic_strin
g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z )
ThreadPool.obj : error LNK2001: unresolved external symbol "void __cdecl
JetByteTools::Win32::Output(class std::basic_string,class std::allocator >
const &)" (?Output@Win32@JetByteTools@@YAXABV?$basic_string@
DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
Debug/CubaMgr.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

I have a main (sort of global .h file and in there I have #include'd the .h
file I need from the range of third party headers.

There is no external library required so I am confused as to what would
cause this problem?
Taking your word for it that no external library is needed, you may not
have included all the right headers, or (more likely) there's a
template that hasn't got instantiated.

It's hard to say more without seeing the source files in question.

--mpa

Dec 16 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.