By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,435 Members | 1,485 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,435 IT Pros & Developers. It's quick & easy.

linker error in building DLL

P: 86
while building dll file i am getting an error....

[Linker error] undefined reference to `WinMain@16'

now i know __declspec(dllexport) is microsoft specific keyword, is it that for this reason it is trying to link WinMain()...

moreover once i encountered using BOOL APIENTRY DllMain() ..now that is for windows dll....but what if i want generic one....
May 28 '07 #1
Share this Question
Share on Google+
2 Replies


weaknessforcats
Expert Mod 5K+
P: 9,197
You have to decide whether to build a dll or a Windows program.

A dll does pot have a WinMain().

How are you building the dll??
May 28 '07 #2

P: 86
You have to decide whether to build a dll or a Windows program.

A dll does pot have a WinMain().

How are you building the dll??
ok sorry i figured out my problem....i dd some extensive research on dll and specially on WIN32 DLL's.....actually am using BOOL APIENTRY DllMain().....my problem is that in project options i forgot to check WIN32 DLL instead to WIN32 console....so my linker is repeatedly trying to link WinMain()....and hence such stupid hindrance....

neways can u say why are we using APIENTRY instead of WINAPI as function qualifier.......
May 28 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.