Solved

library conflicts

Posted on 2000-04-06
3
205 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 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mixing C++ & C# in Vis Studio 2013 7 141
FMX StringGrid1->Canvas->FillRect Problem 3 127
debug as  junit test 4 73
Why isn't object file created? 6 42
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

911 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

20 Experts available now in Live!

Get 1:1 Help Now