Solved

library conflicts

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

708 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

17 Experts available now in Live!

Get 1:1 Help Now