2

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

user309312
  • 45
  • 1
  • 4

4 Answers4

2

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

Tom Cabanski
  • 7,828
  • 2
  • 22
  • 25
1

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
  • 922,412
  • 146
  • 1,693
  • 2,536
  • in this case its a static lib. I am not sure i understand the dll versions? – user309312 Apr 28 '10 at 14:59
  • @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 Apr 28 '10 at 15:03
  • 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 Apr 28 '10 at 15:03
0

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
  • 20,184
  • 24
  • 117
  • 214
  • 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. – user309312 Apr 26 '10 at 21:50
0

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
  • 37,849
  • 12
  • 53
  • 71
  • 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. – user309312 Apr 26 '10 at 21:51
  • What were the warnings? Perhaps we can help. – quamrana Apr 26 '10 at 21:56
  • i get warning lnk4099 : PDB vc90.pdb not found for all the object in my third party lib which i combined with mine – user309312 Apr 26 '10 at 22:01
  • 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 Apr 26 '10 at 22:11