LNK4243 with native-code DLL?

G

Guest

Hello,

I am currently converting a series of ATL COM DLLs that have previously been
built with VC++ 6 to VC++ .Net (7.1? using VS.Net 2003). In any case, I am
encountering the linker error:

"""
Objects warning LNK4243: DLL containing objects compiled with /clr is not
linked with /NOENTRY; image may not run correctly
"""

I understand from the variety of KB entries, MS articles, and newsgroup
postings on this error that it occurs when compiling a mixed-mode (native +
MSIL code) DLL that contains entry points for static initialization of
objects, etc.

However, the project on which I am compiling this does not -- to my
knowledge -- use any managed code at all; in fact, I received this error
immediately after converting the project from VC++ 6 format.

I have scoured the project options and it does not seem to be compiling with
the /clr switch. The "Use Managed Extension" in the project properties is set
to "No". And being relatively new to VS.Net, I don't know where else to look.

Any suggestions for how I can ensure / convince that the compiler & linker
know that this is a native-code-only DLL would be very much appreciated.

thanks,
Lee
 
G

Guest

Lee F said:
Hello,

I am currently converting a series of ATL COM DLLs that have previously been
built with VC++ 6 to VC++ .Net (7.1? using VS.Net 2003). In any case, I am
encountering the linker error:

"""
Objects warning LNK4243: DLL containing objects compiled with /clr is not
linked with /NOENTRY; image may not run correctly
"""
[snip]

I figured it out. The project in question had an XML Schema document (.xsd
file) as a resource; when the project was converted to VC7 format, it assumed
that I wanted to build this file with XML Data Proxy Generator, thereby
bringing managed code into play. When I politely told the comiler to leave
this file around and only include it as a resource, the problem went away.

thanks,
Lee
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top