Solved

mfc linking

Posted on 2002-03-09
2
481 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 50 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

705 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