Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 1998-05-20
2
Medium Priority
?
194 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
[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 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

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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
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 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.

715 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