两个都加当然不行了。要么Release版要么Debug版,加了两个库link会晕的,不知道Link哪个好。
#pragma comment(lib,"python23_d.lib")
应该是VC或其它编译器的用法。
#pragma link "python23_d.lib"是Borland C++编译器的用法。
二者在各自的编译环境中都代表在Link的时候Link这个库进来。
#pragma是通用的C++编译器指令,意思是不同的编译器可以用这个指令来扩展自己的编译链接指令,认识所扩展内容的,就做,不认识的,就忽略过去不做处理
C++Builder Help:
With #pragma, C++Builder can define the directives it wants without interfering with other compilers that support #pragma. If the compiler doesn't recognize directive-name, it ignores the #pragma directive without any error or warning message.
Syntax
#pragma link [path]modulename[.ext]
Description
The directive instructs the linker to link the file into an executable file.
By default, the linker searches for modulename in the local directory and any path specified by the -L option. You can use the path argument to specify a directory.
By default, the linker assumes an .obj extension.
VC Help:
The #pragma directives offer a way for each compiler to offer machine- and operating system-specific features while retaining overall compatibility with the C and C++ languages. Pragmas are machine- or operating system-specific by definition, and are usually different for every compiler.
#pragma comment( "comment-type" [, commentstring] )
lib
Places a library-search record in the object file. This comment type must be accompanied by a commentstring parameter containing the name (and possibly the path) of the library that you want the linker to search. The library name follows the default library-search records in the object file; the linker searches for this library just as if you had named it on the command line provided that the library is not specified with /nodefaultlib. You can place multiple library-search records in the same source file; each record appears in the object file in the same order in which it is encountered in the source file.
If the order of the default library and an added library is important, compiling with the /Zl switch will prevent the default library name from being placed in the object module. A second comment pragma then can be used to insert the name of the default library after the added library. The libraries listed with these pragmas will appear in the object module in the same order they are found in the source code.
http://wangzw.wordpress.com/
个性化台历、日历制作
http://shop33697570.taobao.com/
