Re: How to debug Link errors of static LIB in eVC?
- From: "Helge Kruse" <Helge.Kruse-nospam@xxxxxxx>
- Date: Sun, 12 Oct 2008 09:40:33 +0200
"CEasker" <CEasker@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:2A550D7A-9D4A-4B6A-9E87-20B70DD82A6A@xxxxxxxxxxxxxxxx
The platform of my device is CE4.2,I check CE 4.2 winreg.h,the codePlease keep in mind that there can be multiple SDKs installed.
#ifdef __cplusplus
extern "C" {
#endif
can also be found.
I am sure that correct version of winreg.h is in theOk, but your compiler finds somehow the C++ prototype of the function and generates the decorated name for the unresolved external. You should investigate, how the compiler finds this prototype. I see two approaches. First I would change the C++ compiler settings so that the preprocessor output is saved: "Generate Preprocessed header" ... or so (*).
directory of the header file which I had set.
This will cause a win32.i file to be save. This is the input file that the C++ compiler really gets. Here you can see, how the #ifdefs and #defines have worked. It's a large file but you should find it. Additionally you can check if the eVC++ 4.0 allows to show the included header files. It's possible with VS2005 but I am not sure with the older compiler. Here you can verfy what files are really included and get a list of suspected files. This may give you a hint.
(*) You will only be able to generate the real OBJ output if you disable this setting. ;-)
In addtion, can you give me a explaination for the error as below
ptlibce.lib(win32.obj) : error LNK2001: unresolved external symbol
Do you mean this?
ptlibce.lib(win32.obj) : error LNK2001: unresolved external symbol "class
PPlugin_PSoundChannel_WAVFile_Registration
PPlugin_PSoundChannel_WAVFile_Registration_Instance"
(?PPlugin_PSoundChannel_WAVFile_Registration_Instance@@3VPPlugin_PSoundChannel_
WAVFile_Registration@@A)
The linker is missing a function (C++ decorated) PPlugin_PSoundChannel_WAVFile_Registration_Instance that returns a PPlugin_PSoundChannel_WAVFile_Registration class object. Check what (import-)library defines this symbol and add it to the linker input. If you have enough paranoia you can check with "dumpbin /symbols" or "dumpbin /exports" if the symbol is really exported. Since the function returns a class object I dont suspect a wrong prototype.
Best regards
Helge
.
- Follow-Ups:
- Re: How to debug Link errors of static LIB in eVC?
- From: CEasker
- Re: How to debug Link errors of static LIB in eVC?
- References:
- How to debug Link errors of static LIB in eVC?
- From: CEasker
- Re: How to debug Link errors of static LIB in eVC?
- From: Helge Kruse
- Re: How to debug Link errors of static LIB in eVC?
- From: CEasker
- How to debug Link errors of static LIB in eVC?
- Prev by Date: Not a Valid WIN32.exe
- Next by Date: Re: fatal error C1083
- Previous by thread: Re: How to debug Link errors of static LIB in eVC?
- Next by thread: Re: How to debug Link errors of static LIB in eVC?
- Index(es):
Relevant Pages
|