Next: LNK2001
From: Sukender on
Hi!

I've got an unresolved symbol : __imp___CrtDbgReportW
But I never use _CrtDbgReport... :-/

Here is my config :
- VC8 Express beta 2
- Compiling in debug mode
- Using /MDd (Multithreaded Debug DLL)
- Using RTTI (/GR)
- Project imported from VC6 and modified
- <crtdbg.h> never included directly in the project, _CrtDbgReport never
used directly in the project
- "error LNK2001: unresolved external symbol __imp___CrtDbgReportW" in evry
*.obj

Corresponding help page says that _CrtDbgReport needs "Debug versions of C
run-time libraries only.", so why do I have this unresolved symbol ?

Can anyone help ? Thanks !

Sukender
From: Mark Randall on
Its MSVC's own debugging 'breakpoint' feature which pops up the formatted
dialog box containing the error, line etc, W for unicode, hence it will be
included for practically everything you do in debug.

Check your DLL versions, changing the Debug DLL settings to something else,
then change back - failing that, try importing your entire project into a
new VS8 project.

--
- Mark Randall
http://zetech.swehli.com

"Sukender" <Sukender(a)discussions.microsoft.com> wrote in message
news:C9C5D5ED-97A0-4CBC-B9EE-D56BDE5A49BA(a)microsoft.com...
> Hi!
>
> I've got an unresolved symbol : __imp___CrtDbgReportW
> But I never use _CrtDbgReport... :-/
>
> Here is my config :
> - VC8 Express beta 2
> - Compiling in debug mode
> - Using /MDd (Multithreaded Debug DLL)
> - Using RTTI (/GR)
> - Project imported from VC6 and modified
> - <crtdbg.h> never included directly in the project, _CrtDbgReport never
> used directly in the project
> - "error LNK2001: unresolved external symbol __imp___CrtDbgReportW" in
> evry
> *.obj
>
> Corresponding help page says that _CrtDbgReport needs "Debug versions of C
> run-time libraries only.", so why do I have this unresolved symbol ?
>
> Can anyone help ? Thanks !
>
> Sukender


From: Sukender on
First, thank you for your quick answer. I started "experiments" as soon as
you answer was posted... ;)

I noticed MSVCRTD.lib was ignored in the project whereas MSVCRT was
included. Of course, MSVCRT doesn't include debug implementations ! This was
the reason for the error.
Formerly, this lib has been disabled because of random bugs appearing when
linking with libs based on MSVCRT and with others on MSVCRTD. People who
created the project then decided to move everything to the release version to
avoid bugs. But it sound strange to me : why problems should happen ? Is the
compiler not smart enough to correctly solve this ?

I'll try to move back libs to debug and see what happen... :)
Tanks again !

Sukender


"Mark Randall" wrote:

> Check your DLL versions, changing the Debug DLL settings to something else,
> then change back
From: Mark Randall on
"Sukender" wrote / typed / talked / pressed his keyboard with his nose to
put:
> Formerly, this lib has been disabled because of random bugs appearing when
> linking with libs based on MSVCRT and with others on MSVCRTD. People who
> created the project then decided to move everything to the release version
> to
> avoid bugs. But it sound strange to me : why problems should happen ? Is
> the
> compiler not smart enough to correctly solve this ?

You should, if at all possible *always* use the same CRT version because its
incredibly annoying to share things between them, but no - the compiler (&
linker) doesnt know whats debug and whats not in any such way as to try and
automatically fix it.

--
- Mark Randall
http://zetech.swehli.com


 | 
Pages: 1
Next: LNK2001