autolink.h

#ifndef AUTOLINK_H__
#define AUTOLINK_H__

#  define MY_STRINGIZE(X) MY_DO_STRINGIZE(X)
#  define MY_DO_STRINGIZE(X) #X

#ifdef _MSC_VER
#	ifndef MY_LIBEXTNAME
#		ifdef _DEBUG
#			define	MY_LIBEXTNAME  "d.lib"
#		else
#			define	MY_LIBEXTNAME  ".lib"
#		endif//_DEBUG
#	endif//MY_LIBEXTNAME

#	ifdef	MY_LIB_NAME
#		ifndef MY_NO_AUTO_LINK
#			pragma comment(lib, MY_STRINGIZE(MY_LIB_NAME)  MY_LIBEXTNAME)
#			pragma message("Linking to lib file: "  MY_STRINGIZE(MY_LIB_NAME) MY_LIBEXTNAME)
#		endif//_NO_AUTO_LINK
#		undef MY_LIB_NAME
#	else
#		error "undefine MY_LIB_NAME"
#	endif//MY_LIB_NAME
#else
#	undef MY_LIB_NAME
#endif//_MSC_VER

//#if !defined(MY_xxxx_SOURCE)
//# define MY_LIB_NAME  xxx
//# include "autolink.h"	
//#endif // automatic library 

#endif // AUTOLINK_H__

你可能感兴趣的:(autolink.h)