Solved

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

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
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.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

615 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