DLL export library ( .lib file)
-
I have a DLL project being developed in Visual C++ 6 . Now the project has two configurations release and debug. As part of the output a .lib is also created which is needed by the application trying to use the library. I need to distribute files related to this DLL to the end user . Now does it matter for the .lib file ( for linkage) if this is debug or release . In other words will it suffice if I provide only the release .lib file even if the debug version of the DLL is going to be used ? Does it matter if you link with debug or release .lib fi
Engineering is the effort !
-
I have a DLL project being developed in Visual C++ 6 . Now the project has two configurations release and debug. As part of the output a .lib is also created which is needed by the application trying to use the library. I need to distribute files related to this DLL to the end user . Now does it matter for the .lib file ( for linkage) if this is debug or release . In other words will it suffice if I provide only the release .lib file even if the debug version of the DLL is going to be used ? Does it matter if you link with debug or release .lib fi
Engineering is the effort !
act_x wrote:
Now does it matter for the .lib file ( for linkage) if this is debug or release .
Yes. Use the debug version of the .lib for the debug .dll, and the same goes for the release versions. Don't mix and match the two unless you want some strange errors creeping up.
Jeremy Falcon Oatmeal, It's What's for Dinner.[^]
-
I have a DLL project being developed in Visual C++ 6 . Now the project has two configurations release and debug. As part of the output a .lib is also created which is needed by the application trying to use the library. I need to distribute files related to this DLL to the end user . Now does it matter for the .lib file ( for linkage) if this is debug or release . In other words will it suffice if I provide only the release .lib file even if the debug version of the DLL is going to be used ? Does it matter if you link with debug or release .lib fi
Engineering is the effort !
Also you should get into the habit of appending (post fixing) a letter 'd' at the end of the debug lib filename to distinguish it from the release version. i.e
release name: utils.lib
debug name: utilsd.lib--- Yours Truly, The One and Only! web: devmentor.org Design, Code, Test, Debug
-
I have a DLL project being developed in Visual C++ 6 . Now the project has two configurations release and debug. As part of the output a .lib is also created which is needed by the application trying to use the library. I need to distribute files related to this DLL to the end user . Now does it matter for the .lib file ( for linkage) if this is debug or release . In other words will it suffice if I provide only the release .lib file even if the debug version of the DLL is going to be used ? Does it matter if you link with debug or release .lib fi
Engineering is the effort !
also, in the properties tab, there is a macro $(ConfigurationName) it will associate debug files for debug build and release files for release. checkout the different macros, they can help a lot with different configurations or different file paths for different configurations.
[Insert Witty Sig Here]