views:

71

answers:

4

I had a question with regards doing an official release of code. Its my first time using VS2008 so bear with me.

I have my header file that has the api's which grant them access to the lib. now there is a debug and a release version that is talked about.

how do i give these to my client? do i need to give them both folders or just the lib file along with the header file for that lib. The lib is ready for use directly. but i am a little confused between debug vs release.

thanks

+2  A: 

You need to give them the headers and the release version of your lib.

Tom Cabanski
A: 

Yes, all you need to provide are the .h and libs

Some companies only provide the release lib.

(You may need to provide more configurations - for example single vs multi-threaded libraries, etc. You will probably want to figure out how your users are using the lib and make sure that there are no conflicts with other libraries.)

Tim
i know a third party application will utilize this lib of mine. but i am not sure if its single or multi threaded...their app that is. they also have not mentioned anything to me about that.
A: 

To clear up your doubts in your own mind, write a mini test app that relies on a release version of your library. You can be your own customer and see what it is like.

You could even find another machine to write the app on and then copy over the headers and lib file and see if you can do a release build of the test app.

quamrana
yea i already did that. its just that i had a few warnings while doing it which i could not get rid of as i have a composite lib meaning I amusing a third party lib + my own stuff all lumped as one. its no biggy as I was able to compile and link and run it without issues but i still had those warning that might be more vs2008 requirements than anything. For example, there are some extra files created that vs2008 looks at and if does not find those files which were used to make the lib it complains that it can't find those files.
What were the warnings? Perhaps we can help.
quamrana
i get warning lnk4099 : PDB vc90.pdb not found for all the object in my third party lib which i combined with mine
Google for `LNK4099` and the MSDN page tells you about either compiling with `/z7` or removing the `/DEBUG` option from the linker to avoid having to supply the .pdb file.
quamrana
A: 

You should provide one .h file and at least 4 versions of the .lib. The important choice is C/C++, Code Generation, Runtime Library. You can't predict whether the client will use the static or the DLL version of the CRT.

You'll also want to #define _CRT_NOFORCE_MANIFEST so you don't inject the CRT version number you use in the client's manifest.

Hans Passant
in this case its a static lib. I am not sure i understand the dll versions?
@djones: not your lib, the CRT's lib. Your client is likely to compile his code with the /MD version. That will conflict badly when you compiled with /MT. And the other way around.
Hans Passant
Here's a thread that shows what goes wrong btw: http://stackoverflow.com/questions/2728649/error-lnk2005-xxx-already-defined-in-msvcrt-libmsvcr100-dllc-something-libcm/2729823#2729823
Hans Passant