Why is the linker using .NET ?

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
M-.-n
Knows some wx things
Knows some wx things
Posts: 27
Joined: Wed Jan 25, 2006 5:07 pm

Why is the linker using .NET ?

Post by M-.-n » Thu Apr 13, 2006 10:59 am

Hi all,

I've got this strange thing going on when linking my app: It seems the debug build is fine but the release build needs to be linked to MSCOREE.LIB which is part of .NET. I don't really understand why there is such a difference ; the library referencing the lib is wxbase26.lib. Has any one a clue about it ? If I try to eliminate MSCOREE.LIB, I get the following:

NuVJ error LNK2001: unresolved external symbol [email protected]

We specifically don't want to have to deal with .NET component installation & the fact the debug version is not linked to those component make us think there is a way :)

Thanks for any help
Marc

User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Re: Why is the linker using .NET ?

Post by ABX » Thu Apr 13, 2006 1:40 pm

M-.-n wrote:I've got this strange thing going on when linking my app: It seems the debug build is fine but the release build needs to be linked to MSCOREE.LIB which is part of .NET.
It can be forced by other libs or some build settings. How "needs" is expressed? Is there any message? When it is shown, during build or during execution?

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2

M-.-n
Knows some wx things
Knows some wx things
Posts: 27
Joined: Wed Jan 25, 2006 5:07 pm

Re: Why is the linker using .NET ?

Post by M-.-n » Thu Apr 13, 2006 1:49 pm

ABX wrote: It can be forced by other libs or some build settings. How "needs" is expressed? Is there any message? When it is shown, during build or during execution?
ABX
I noticed it by trying to run it on a fresh machine... The debug ran fine but the release complained about missing libs. Looking through the libs loaded in the link, I found MSCOREE.lib was the culprit. I found no way to link without it; we don't really want to be depending on .NET since our app doesn't need it.

User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Re: Why is the linker using .NET ?

Post by ABX » Thu Apr 13, 2006 4:43 pm

M-.-n wrote:
ABX wrote: It can be forced by other libs or some build settings. How "needs" is expressed? Is there any message? When it is shown, during build or during execution?
ABX
I noticed it by trying to run it on a fresh machine... The debug ran fine but the release complained about missing libs. Looking through the libs loaded in the link, I found MSCOREE.lib was the culprit. I found no way to link without it; we don't really want to be depending on .NET since our app doesn't need it.
Excuse me for replying my question but: what is the error message? I don't believe it is "can't find mscoree.lib". My guess it's "can't find some.dll". Doing builds without .NET is surely possible because I make both debug and releases with other compilers without .NET (Borland, Watcom, MinGW, DMC). The need for .NET surely is forced by something else but it's hard to judge without knowing what's exact error message.

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2

cpp
I live to help wx-kind
I live to help wx-kind
Posts: 195
Joined: Wed Sep 28, 2005 9:42 pm

Post by cpp » Thu Apr 13, 2006 6:26 pm

Could you please post your command line for compiler and linker? go to project properties C++->Command Line, and Linker->Command Line and copy /pase both command lines, so we can help you out.
Hier Kommt die Sonne...

M-.-n
Knows some wx things
Knows some wx things
Posts: 27
Joined: Wed Jan 25, 2006 5:07 pm

For what it is worth...

Post by M-.-n » Tue Jun 20, 2006 10:02 am

I found what the problem was. It seems that by default, new projects created in VC have an option called 'managed extension' that is enabled. If any of the projects u link with uses them, it will need the .Net libraries.

I got fooled coz they where all off in debug but one project in release still had them checked. So nothing to do with wxWidget in the end !!

mspoerr
Experienced Solver
Experienced Solver
Posts: 50
Joined: Sat Mar 15, 2008 9:17 pm

Post by mspoerr » Wed Aug 06, 2008 2:34 pm

Hello,

I know this is an old topic, but I cannot find the "managed extension" setting in my Visual Studio 2005. Can anyone point me to the right property window please?

Thanks,
/mspoerr

M-.-n
Knows some wx things
Knows some wx things
Posts: 27
Joined: Wed Jan 25, 2006 5:07 pm

Post by M-.-n » Wed Aug 06, 2008 2:39 pm

It's in

Configuration Properties
General


look at "use managed extensions"

this is 2003 tho. it might have desapeared after.

mspoerr
Experienced Solver
Experienced Solver
Posts: 50
Joined: Sat Mar 15, 2008 9:17 pm

Post by mspoerr » Wed Aug 06, 2008 8:50 pm

thank you for your answer, but unfortunately the setting is not there int VS 2005 and 2008.

/mspoerr

Post Reply