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

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.
mark_21Asked:
Who is Participating?
 
fasterConnect With a Mentor Commented:
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
 
nietodCommented:
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
All Courses

From novice to tech pro — start learning today.