?
Solved

library conflicts

Posted on 2000-04-06
3
Medium Priority
?
222 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
[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
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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 new code templates 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…

719 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