Re: Going From MFC to .NET



Please explain what you mean by "open this project using .NET". Do you mean you have
tried to compile this project to use the Common Runtime Library, or do you mean that you
used to have a VS6 project which you have now moved to VS.NET? (Note that VS.NET may or
may not have anything to do with the .NET technology, so you have to be very precise in
stating your problem).

There is a possibility that your msgimg32.lib file actually has been corrupted (repeating
the same error message three times doesn't convey anything useful). An example of the
source code that is trigger the exception code errors might be useful. THere is also the
possibility that you have put explicit paths in your link, so the new code is trying to
link with an old library which doesn't contain the symbols you use. Without knowing what
the parameters are for your build step, it is impossible to guess what is wrong.
joe

On 26 Jul 2006 13:56:42 -0700, "Medical-Fix" <mgi5001@xxxxxxxxxxxx> wrote:

I hope someone can help me on this!
here is what's happening:
Big project created on MFC C++ with extensive GUI etc...
I tryed to open this project using .NET
and everything is fine from GUI to project settings etc...
Now the problem is that when I try to compile a debug or release vr.
the project gives the following error after successfully compiling all
of the other codes:

//**THIS IS JUST PART OF THE OUTPUT**//

Linking...
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\msimg32.lib : warning LNK4003: invalid library
format; library ignored
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\msimg32.lib : warning LNK4003: invalid library
format; library ignored
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\msimg32.lib : warning LNK4003: invalid library
format; library ignored
LogFile.obj : error LNK2001: unresolved external symbol "unsigned long
__cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
Option_DCT_Settings.obj : error LNK2019: unresolved external symbol
"unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
referenced in function "bool __cdecl
ATL::_ATL_SAFE_ALLOCA_IMPL::_AtlVerifyStackAvailable(unsigned long)"
(?_AtlVerifyStackAvailable@_ATL_SAFE_ALLOCA_IMPL@ATL@@YA_NK@Z)
HardDriveTest.obj : error LNK2001: unresolved external symbol "unsigned
long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
common.obj : error LNK2001: unresolved external symbol "unsigned long
__cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
globals.obj : error LNK2019: unresolved external symbol "unsigned long
__cdecl _exception_code(void)" (?_exception_code@@YAKXZ) referenced in
function "unsigned long __stdcall
ATL::GetEnvironmentVariableWFake(unsigned short const *,unsigned short
*,unsigned long)" (?GetEnvironmentVariableWFake@ATL@@YGKPBGPAGK@Z)
ThreadSafe.obj : error LNK2001: unresolved external symbol "unsigned
long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ)
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Typo in fs/smbfs/file.c
    ... I recently compiled 2.6.6 and got a gcc warning: ... fs/smbfs/file.c:274: warning: unknown conversion type character `z' in format ... compile went cleanly. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • ndis.lib linking problem.
    ... Searching libraries ... Searching C:\Program Files\Microsoft Visual Studio 8\SmartDevices ... asyncmac.obj: error LNK2019: unresolved external symbol ...
    (microsoft.public.windowsce.embedded.vc)
  • ndis.lib linking problem.
    ... Searching libraries ... Searching C:\Program Files\Microsoft Visual Studio 8\SmartDevices ... asyncmac.obj: error LNK2019: unresolved external symbol ...
    (microsoft.public.windowsce.app.development)
  • Re: Dont want Intermediate language
    ... complie my code using this.. ... just compile it as a Win32 application and it won't be ... main.obj: error LNK2019: unresolved external symbol ... I do have the platfor SDK installed.. ...
    (microsoft.public.vc.language)
  • Re: Compiling CERDISP.exe
    ... At his point I get linking errors. ... directory for files to compile. ... cerdisp.obj: error LNK2019: unresolved external symbol GetMessageW ... DispatchMessageW referenced in function WinMain ...
    (microsoft.public.windowsce.platbuilder)