Solved

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

Posted on 1998-05-20
2
190 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 150 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

828 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