Click to See Complete Forum and Search --> : Warning LNK4243
RobertP
November 14th, 2005, 06:00 PM
Hello,
I recently compiled an assembly on VisualStudio .NET 2003. The assembly was developed on VisualStudio .NET 2002 without any problems. I now get the following warning:
LINK : warning LNK4243: DLL containing objects compiled with /clr is not linked with /NOENTRY; image may not run correctly
I have read the help pages for this, but I do not understand what is happening.
What should I do about this warning?
Will the newly compiled assembly work for users of the previous assembly?
Thanks for any help.
Bob
cilu
November 15th, 2005, 07:24 AM
Each program has an entry point. The entry point for a C++ program is main(). For a Windows based application the entry point is WinMain. For a DLL is DllMain(). Etc.
This warning tells you that a Managed C++ DLL does not have an entry point. Since it doesn't have no entry point defined, it should be compiled with the option /NOENTRY, but it isn't.
RobertP
November 15th, 2005, 11:59 AM
Thanks for your reply.
I still can't understand why this code compiled and linked without warnings in VisualStudio .NET 2002. It seems that the VS .NET 2003 has broken my code. I am now required to have a very detailed understanding of technicalities in order to make the required changes just to make a simple assembly port form VS 2002 to VS 2003.
When I make the 4 or 5 changes required, will the assembly work the same way for my clients as before?
Also, I am adding strong names to to e assemblies. Will this make usage different for previous users?
cilu
November 15th, 2005, 01:33 PM
I still can't understand why this code compiled and linked without warnings in VisualStudio .NET 2002. It seems that the VS .NET 2003 has broken my code.
Well, the two compilers are not identical. The are things that work with 2002 but may fail with 2003. The same is with the 2005 compiler.
When I make the 4 or 5 changes required, will the assembly work the same way for my clients as before?
Can't answer that since I don't know what are those 4-5 changes you need to do.
Also, I am adding strong names to to e assemblies. Will this make usage different for previous users?
Strong names are required for public assemblies (from the GAC). You can use it for private assemblies too, but that's not a requirement. Adding strong names should not affect previous versions.
RobertP
November 15th, 2005, 03:07 PM
Thank you very much for the reply. It is greatly appreciated.
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.