LNK2001 link errors

A

Angus

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@std@@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?
 
J

Jacek Dziedzic

Angus said:
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@std@@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.
 
M

Michael Ashton

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@std@@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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top