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

x
?
Solved

Creating a .LIB to work with any run-time lib

Posted on 1998-05-20
2
Medium Priority
?
196 Views
Last Modified: 2010-04-10
Hi,

I have created a small set of C++ routines, which I would like to compile into a C callable .LIB.

When I created the .LIB, I used Multithread DLL Runtime.
I tried to use it with a EXE project using the Debug Single-thread runtime,and received lots of funny link errors about unresolved externals in the run-time libs. I assume its because the .LIB is using DLL calls, and the .EXE .LIB calls.

Is it possible to create a .LIB that can be used in any project using any version of the run-times?

I would like to make the library available on my web site, so it would be nice if only one version of the library is needed for any project.

Thankx  in advance,
Mark.
0
Comment
Question by:mark_21
2 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 1164410
Your will probably be okay if you use the static multi-threaded run-time library, not the dll multithreaded run-time library.  This may result in larger code, but it should work.  
0
 
LVL 7

Accepted Solution

by:
faster earned 300 total points
ID: 1164411
You must have something else wrong, this is something quite common to do.  I have quite a lot of 3rd party libs, no matter what I choose in my project, the link is OK except that you may have a warning.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
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. …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

926 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