Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 993
  • Last Modified:

Error LNK2005: _DllMain@12 already defined


I'm trying to add a dialog box to an existing dl that doesn't have any. When I do, I get "error LNK2005: _DllMain@12 already defined". I've read that I need to delete the existing DLLMain in my project to get rid of the error. After deleting it, I get error "LNK1149: output filename matches input filename...."

How to I get this to work?
0
apostrophe27
Asked:
apostrophe27
1 Solution
 
Subrat (C++ windows/Linux)Software EngineerCommented:
If ur using MFC and CRT functions, then plz have a look on following link.
http://support.microsoft.com/kb/148652
0
 
sureshmunugotiCommented:
To get resolve this linker error, use the #pragma comment(lib,"YourLibfile.lib")
or you need to change the out put path of you library.
0
 
apostrophe27Author Commented:
I started a new dll project, added my existing code to it, and it works now. I don't know what's different from my original project.

Thanks for trying to help me.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now