I know that I can do this in a *.h file:
#ifdef _DEBUG
#pragma comment(lib, "libtiffd.lib")
#else
#pragma comment(lib, "libtiff.lib")
#endif
But I want a way that I can do something such as this:
#ifdef V2.4.6
#ifdef _DEBUG
#pragma comment(lib, "opencv_calib3d246d.lib")
#else
#pragma comment(lib, "opencv_calib3d246.lib")
#endif
#else
#ifdef _DEBUG
#pragma comment(lib, "opencv_calib3d249d.lib")
#else
#pragma comment(lib, "opencv_calib3d249.lib")
#endif
#endif
and V2.4.6 be an environment variable. Can I do this?
I don't want to define V2.4.6 inside Visual Studio or code as it would be different on different systems.
PreprocessorDefinitions
with something like<PreprocessorDefinitions>VERSION=$(whatever);%(PreprocessorDefinitions)</PreprocessorDefinitions>
. – Lubeck