Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / October 2004

Tip: Looking for answers? Try searching our database.

linker warning

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bonj - 09 Oct 2004 15:23 GMT
Hi
I have a project that consists of an unmanaged DLL (extended stored
procedure) and a static library, which I have converted to managed, although
it has got one unmanaged function which is exported to the unmanaged.
I keep getting the linker warning 'warning - images compiled with /NOENTRY
may not run correctly'.
It doesn't seem to have any adverse effects, but what does it mean and how
do I get rid of it?
Bonj - 09 Oct 2004 20:55 GMT
LINK : warning LNK4243: DLL containing objects compiled with /clr is not
linked with /NOENTRY; image may not run correctly

This is on the DLL that is itself unmanaged, but links to a function in a
managed static library

Cheers
Igor Tandetnik - 11 Oct 2004 23:30 GMT
> LINK : warning LNK4243: DLL containing objects compiled with /clr is
> not linked with /NOENTRY; image may not run correctly

See KB Article KB814472 "PRB: Linker Warnings When You Build Managed
Extensions for C++ DLL Projects"
Signature

With best wishes,
   Igor Tandetnik

"On two occasions, I have been asked [by members of Parliament], 'Pray,
Mr. Babbage, if you put into the machine wrong figures, will the right
answers come out?' I am not able to rightly apprehend the kind of
confusion of ideas that could provoke such a question." -- Charles
Babbage

Bonj - 12 Oct 2004 10:07 GMT
That's great Igor, it solves that
However it causes:

Linking...
LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO'
specification
  Creating library Debug/xp_emb.lib and object Debug/xp_emb.exp
LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other
libs; use /NODEFAULTLIB:library
msvcrt.lib(cinitexe.obj) : warning LNK4098: defaultlib 'libcmtd.lib'
conflicts with use of other libs; use /NODEFAULTLIB:library

I followed that article and my link command line thingy is now:
/OUT:"Debug/****.dll" /NOLOGO /LIBPATH:"C:\Documents and Settings\taylorb\My
Documents\Visual Studio Projects\Apps\xp_emb\reader\Debug" /DLL
/NODEFAULTLIB:"nochkclr.obj" /INCLUDE:"__DllMainCRTStartup@12" /DEBUG
/PDB:"Debug/xp_emb.pdb" /SUBSYSTEM:WINDOWS /NOENTRY /MACHINE:X86 msvcrt.lib
opends60.lib reader.lib  kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
odbc32.lib odbccp32.lib ".\reader\Debug\reader.lib"

It is an unmanaged extended stored procedure DLL in VC7.1, and reader.lib is
a managed static library project.

Any ideas?

> > LINK : warning LNK4243: DLL containing objects compiled with /clr is
> > not linked with /NOENTRY; image may not run correctly
>
> See KB Article KB814472 "PRB: Linker Warnings When You Build Managed
> Extensions for C++ DLL Projects"
Igor Tandetnik - 12 Oct 2004 15:11 GMT
> That's great Igor, it solves that
> However it causes:
[quoted text clipped - 7 lines]
> msvcrt.lib(cinitexe.obj) : warning LNK4098: defaultlib 'libcmtd.lib'
> conflicts with use of other libs; use /NODEFAULTLIB:library

I suspect you should have only done the changes described in the article
to your Release build. Or at least in Debug build, replace msvcrt.lib
with msvcrtd.lib.

As to libcmtd.lib, make sure that you use CRT DLL. Project Properties |
C/C++ | Code Generation | Runtime Library, set to Multi-threaded DLL in
Release build and Multi-threaded Debug DLL in Debug build.
Signature

With best wishes,
   Igor Tandetnik

"On two occasions, I have been asked [by members of Parliament], 'Pray,
Mr. Babbage, if you put into the machine wrong figures, will the right
answers come out?' I am not able to rightly apprehend the kind of
confusion of ideas that could provoke such a question." -- Charles
Babbage

Bonj - 12 Oct 2004 18:07 GMT
Oh RIGHT! so the "d" is for debug!
OK, got it thanks
I'll try that

> > That's great Igor, it solves that
> > However it causes:
[quoted text clipped - 15 lines]
> C/C++ | Code Generation | Runtime Library, set to Multi-threaded DLL in
> Release build and Multi-threaded Debug DLL in Debug build.
Bonj - 12 Oct 2004 12:33 GMT
obviously the one about editandcontinue I'm not that bothered about

> > LINK : warning LNK4243: DLL containing objects compiled with /clr is
> > not linked with /NOENTRY; image may not run correctly
>
> See KB Article KB814472 "PRB: Linker Warnings When You Build Managed
> Extensions for C++ DLL Projects"

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.