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

x
?
Solved

library conflicts

Posted on 2000-04-06
3
Medium Priority
?
226 Views
Last Modified: 2013-12-14
I've created an ANSI static library in VC++6.  I want to be able to use this library on all platforms so I'm using stl for things like vectors and strings.  The problem is, I've written an MFC app to call this library, and when I create a std::string from the MFC app I get a multiply defined symbol error.  How can I get over this without rewriting the library to not use stl?
0
Comment
Question by:ch52jb
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 200 total points
ID: 2690175
It sounds like you are linking your static library to the static RTL.  MFC uses the DLL version of the RTL (I believe) so link you library to the DLL RTL.  (Under the project option, C/C++ tab, code generation category).

give that a try and let me know if it works.  I'm not answerign because I'm not sure that is the problem.
0
 

Author Comment

by:ch52jb
ID: 2690391
Short, sweet answer that solved my problem in seconds.  Thank you very much.
0
 
LVL 22

Expert Comment

by:nietod
ID: 2690842
Good to know.  
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

876 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