resource-only DLL and LNK2019 error!!  
Author Message
puttocks





PostPosted: Sat Sep 10 03:49:48 CDT 2005 Top

MFC >> resource-only DLL and LNK2019 error!! Hi,
i'm developing a resource-only DLL, using /NOENTRY option the linker returns:

error LNK2019: unresolved external symbol _main referenced in function
_mainCRTStartup

Any help!?

Thanks
Ale

Visual Studio335  
 
 
Mihai





PostPosted: Sat Sep 10 03:49:48 CDT 2005 Top

MFC >> resource-only DLL and LNK2019 error!! > i'm developing a resource-only DLL, using /NOENTRY option the linker
returns:
>
> error LNK2019: unresolved external symbol _main referenced in function
> _mainCRTStartup
Are you also using /DLL (just making sure)?
Can you tell us the full command line?

--
Mihai Nita [Microsoft MVP, Windows - SDK]
------------------------------------------
Replace _year_ with _ to get the real email
 
 
Ale





PostPosted: Sat Sep 10 04:04:02 CDT 2005 Top

MFC >> resource-only DLL and LNK2019 error!! /OUT:"Debug/bwbcustom.dll" /INCREMENTAL /NOLOGO /DLL /DEF:".\bwbcustom.def"
/DELAYLOAD:"OleAcc.dll" /DEBUG /PDB:"Debug/bwbcustom.pdb" /SUBSYSTEM:WINDOWS
/NOENTRY /IMPLIB:"Debug/bwbcustom.lib" /MACHINE:X86 DelayImp.lib
DelayImp.lib

/DLL is there...

Using Shared MFC instead of static Linked i get some warings but it links
succesfull, it's not a solution in order i need to have MFC static linked...

Microsoft only says to add /NOENTRY !!

Thanks for answare and next help...
Ale

"Mihai N." wrote:

> > i'm developing a resource-only DLL, using /NOENTRY option the linker
> returns:
> >
> > error LNK2019: unresolved external symbol _main referenced in function
> > _mainCRTStartup
> Are you also using /DLL (just making sure)?
> Can you tell us the full command line?
>
> --
> Mihai Nita [Microsoft MVP, Windows - SDK]
> ------------------------------------------
> Replace _year_ with _ to get the real email
>
 
 
Jeff





PostPosted: Sat Sep 10 06:20:33 CDT 2005 Top

MFC >> resource-only DLL and LNK2019 error!! "Ale" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> /OUT:"Debug/bwbcustom.dll" /INCREMENTAL /NOLOGO /DLL
/DEF:".\bwbcustom.def"
> /DELAYLOAD:"OleAcc.dll" /DEBUG /PDB:"Debug/bwbcustom.pdb"
/SUBSYSTEM:WINDOWS
> /NOENTRY /IMPLIB:"Debug/bwbcustom.lib" /MACHINE:X86 DelayImp.lib
> DelayImp.lib
>
> /DLL is there...
>
> Using Shared MFC instead of static Linked i get some warings but it links
> succesfull, it's not a solution in order i need to have MFC static
linked...
>
> Microsoft only says to add /NOENTRY !!

I'm probably all wet, but am curious: Why do you need MFC, import libraries,
a *.pdb, and delay-loading for a resource-only dll?
--
Jeff Partch [VC++ MVP]


 
 
Ale





PostPosted: Sat Sep 10 06:36:03 CDT 2005 Top

MFC >> resource-only DLL and LNK2019 error!! I don't need MFC really, i've done a simple Win32 DLL - NO MFC - now...
I haven't thought i do not need MFC...

And i think: using a static Link to MFC with /NOENTRY options it'll never
work, it will never find the main(...)!!!

Thanks!!
Ale


"Jeff Partch [MVP]" wrote:

> "Ale" <EMail@HideDomain.com> wrote in message
> news:EMail@HideDomain.com...
> > /OUT:"Debug/bwbcustom.dll" /INCREMENTAL /NOLOGO /DLL
> /DEF:".\bwbcustom.def"
> > /DELAYLOAD:"OleAcc.dll" /DEBUG /PDB:"Debug/bwbcustom.pdb"
> /SUBSYSTEM:WINDOWS
> > /NOENTRY /IMPLIB:"Debug/bwbcustom.lib" /MACHINE:X86 DelayImp.lib
> > DelayImp.lib
> >
> > /DLL is there...
> >
> > Using Shared MFC instead of static Linked i get some warings but it links
> > succesfull, it's not a solution in order i need to have MFC static
> linked...
> >
> > Microsoft only says to add /NOENTRY !!
>
> I'm probably all wet, but am curious: Why do you need MFC, import libraries,
> a *.pdb, and delay-loading for a resource-only dll?
> --
> Jeff Partch [VC++ MVP]
>
>
>
 
 
Mihai





PostPosted: Sun Sep 11 02:57:05 CDT 2005 Top

MFC >> resource-only DLL and LNK2019 error!! > I'm probably all wet, but am curious: Why do you need MFC, import
libraries,
> a *.pdb, and delay-loading for a resource-only dll?
Exactly my thought :-)

This is all you need:
rc something.rc
link /noentry /dll something.res

This is all you really-really need.

Ok, you might want /MACHINE to eliminate a warning, maybe /nologo
You might also want /l and /c for rc (if you don't have LANGUAGE and pragma
code_page in the .rc). But you don't need to.

--
Mihai Nita [Microsoft MVP, Windows - SDK]
------------------------------------------
Replace _year_ with _ to get the real email
 
 
Ale





PostPosted: Sun Sep 11 06:13:01 CDT 2005 Top

MFC >> resource-only DLL and LNK2019 error!! Perfect!!!!! ;O)

Ale

"Mihai N." wrote:

> > I'm probably all wet, but am curious: Why do you need MFC, import
> libraries,
> > a *.pdb, and delay-loading for a resource-only dll?
> Exactly my thought :-)
>
> This is all you need:
> rc something.rc
> link /noentry /dll something.res
>
> This is all you really-really need.
>
> Ok, you might want /MACHINE to eliminate a warning, maybe /nologo
> You might also want /l and /c for rc (if you don't have LANGUAGE and pragma
> code_page in the .rc). But you don't need to.
>
> --
> Mihai Nita [Microsoft MVP, Windows - SDK]
> ------------------------------------------
> Replace _year_ with _ to get the real email
>