?
Solved

mfc linking

Posted on 2002-03-09
2
Medium Priority
?
488 Views
Last Modified: 2013-11-20
Hi!
i wrote a graphical library (dxmanager.lib, based on direct 3d), it works perfectly with win32 apps, but if i try to use it with an mfc app, i got these 2 links error (by the way, i've never defined a "Lockit" method in my lib).

msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in dxmanager.lib(dxmanager.obj)

msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(void)" (??0_Lockit@std@@QAE@XZ) already defined in dxmanager.lib(dxmanager.obj)


could anyone help me?
regards, Ralph
0
Comment
Question by:ralph78
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
peterchen092700 earned 200 total points
ID: 6854277
Check the VC Runtime Library settings in your LIB match those you have with the MFC App (Project/Settings/C-C++/Code Generation: Use Run-time library)

LIB's default to "Single Threaded", but MFC required either "Multi Threaded DLL" or "Multi Threaded", depending on whenther you ling statically or dynamically to the MFC DLL's

(Though you usually get more than just two error messages on this)

std::_Lockit is an STL helper class for multithreading support, which gets a "do nothing" implementation in single-thread builds.

Peter

0
 

Author Comment

by:ralph78
ID: 6914220
That's ok now!
thx, and sorry to be late ;-))

regards, Ralph
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month12 days, 22 hours left to enroll

777 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