Re: error LNK2019: unresolved external symbol
- From: "Holger Grund" <holger.grund@xxxxxxxxxxxxxxx>
- Date: Fri, 28 Jul 2006 11:57:05 +0200
"lalo" <helene.ayari@xxxxxxxxx> wrote
Here are some more information about my system:I take it that is or includes Visual C++ 2005.
I am using the microsoft visual basic express.
I installed the microsoft sdk for my platform (windows xp pack 2)Excellent. But you should need that for using Windows specific
functionality only. The <string> header is part of the C++.
I can find files like <string> either in the folder:That's because the Platform SDK includes the full C++
toolchain. When you build from within the IDE it uses
the headers from its own installation (Visual Studio, that is).
You could change these settings in Tool->Options->Project
->Directories, but you should _not_ do so in your case.
I copied for you the error when building a .exe because there were noYes, my bad. I misread your explanation. You need to understand
error when building a .lib
what happens when building a library (.lib) or a fully linked image
(.exe or .dll).
A library is effectively a collection of object files (you can think of
it as a TAR file with symbol table). So when you build a .lib then
linker does not kick in at all.
When you build an image (.exe or .dll) the linker recursively
resolves references from your object files and select object files
from your libraries to satisfy these references.
I can find for exemple on my computer the file in <iostream>You should use the standard setting (Visual Studio). But it probably
C:\Program Files\Microsoft Visual Studio 8\VC\include
and in
C:\Program Files\Microsoft SDK\Include\crt
and then choose in which folder the compiler should look for.
The error messages copied here are the ones using the microsoft sdk
folder.
doesn't make a difference. Anyway you should always use the
binaries, libraries and headers from a single toolchain (either
use the PSDK compiler and headers or use Visual Studio
compiler and headers)
I compiled ipl98_visualc.lib with the very same compiler (but notAll of your contributing libraries and object files should be built
cameras_ipl98.lib).
with the same compiler version and settings.
However, the error message suggests otherwise.
What it says is:
The linker selects complex_image.obj from ipl98_visualc.lib to
satisfy some other reference. complex_image.cpp (or whatever
source file was used to build complex_image.obj) references
std::operator<< <>( std::ostream&, const char*)
(That's required if you do something like std::cout << "snoopy")
which was declared as __declspec(dllimport).
That really suggest that it was not built with correct header files
because this operator is never imported in Visual C++ 2005
but is always inline regardless of the runtime library linkage
model.
So the question is: how do you build complex_image.obj?
-hg
.
- References:
- error LNK2019: unresolved external symbol
- From: lalo
- Re: error LNK2019: unresolved external symbol
- From: Holger Grund
- Re: error LNK2019: unresolved external symbol
- From: lalo
- error LNK2019: unresolved external symbol
- Prev by Date: Re: Want to know more on Microsoft Office's Wizards
- Next by Date: Re: Linking error Error return code-'0x458'
- Previous by thread: Re: error LNK2019: unresolved external symbol
- Next by thread: Re: error LNK2019: unresolved external symbol
- Index(es):
Relevant Pages
|