Solved

Error LNK2005: _DllMain@12 already defined

Posted on 2010-09-07
3
983 Views
Last Modified: 2013-12-14

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
Comment
Question by:apostrophe27
3 Comments
 
LVL 8

Expert Comment

by:Subrat (C++ windows/Linux)
Comment Utility
If ur using MFC and CRT functions, then plz have a look on following link.
http://support.microsoft.com/kb/148652
0
 
LVL 1

Expert Comment

by:sureshmunugoti
Comment Utility
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
 

Accepted Solution

by:
apostrophe27 earned 0 total points
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
notepad++ shortcuts 6 134
How to create an Eclipse project for an OPC DA interface? 4 61
selectallvieditor 6 88
Java Help 2 67
In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now