vc中pragma comment的使用方法
作者:cnfgg 日期:2010-07-30
在vc中,该宏放置一个注释到对象文件或者可执行文件。
我们经常用到的是#pragma comment(lib,"*.lib")这类的。例如:#pragma comment(lib,"Ws2_32.lib")表示链接Ws2_32.lib这个库。和在vc的工程设置里写上链入Ws2_32.lib的效果一样,不过这种方法写的程序别人在编译你的代码的时候就不用再设置工程settings了。
#pragma comment( comment-type [,"commentstring"] )comment-type是一个预定义的标识符,指定注释的类型,应该是compiler,exestr,lib,linker之一。commentstring是一个提供为comment-type提供附加信息的字符串,Remarks:1、compiler:放置编译器的版本或者名字到一个对象文件,该选项是被linker忽略的。2、exestr:在以后的版本将被取消。3、lib:放置一个库搜索记录到对象文件中,这个类型应该是和commentstring(指定你要Liner搜索的lib的名称和路径)这个库的名字放在Object文件的默认库搜索记录的后面,linker搜索这个这个库就像你在命令行输入这个命令一样。你可以在一个源文件中设置多个库记录,它们在object文件中的顺序和在源文件中的顺序一样。如果默认库和附加库的次序是需要区别的,使用Z编译开关是防止默认库放到object模块。4、linker:指定一个连接选项,这样就不用在命令行输入或者在开发环境中设置了。只有下面的linker选项能被传给Linker.
我们经常用到的是#pragma comment(lib,"*.lib")这类的。例如:#pragma comment(lib,"Ws2_32.lib")表示链接Ws2_32.lib这个库。和在vc的工程设置里写上链入Ws2_32.lib的效果一样,不过这种方法写的程序别人在编译你的代码的时候就不用再设置工程settings了。
#pragma comment( comment-type [,"commentstring"] )comment-type是一个预定义的标识符,指定注释的类型,应该是compiler,exestr,lib,linker之一。commentstring是一个提供为comment-type提供附加信息的字符串,Remarks:1、compiler:放置编译器的版本或者名字到一个对象文件,该选项是被linker忽略的。2、exestr:在以后的版本将被取消。3、lib:放置一个库搜索记录到对象文件中,这个类型应该是和commentstring(指定你要Liner搜索的lib的名称和路径)这个库的名字放在Object文件的默认库搜索记录的后面,linker搜索这个这个库就像你在命令行输入这个命令一样。你可以在一个源文件中设置多个库记录,它们在object文件中的顺序和在源文件中的顺序一样。如果默认库和附加库的次序是需要区别的,使用Z编译开关是防止默认库放到object模块。4、linker:指定一个连接选项,这样就不用在命令行输入或者在开发环境中设置了。只有下面的linker选项能被传给Linker.
Soccer-playing Robots from China Win 2010 RoboCup
作者:cnfgg 日期:2010-06-24
Robots from Bejing Information Science & Technology University, China, are the winners of this year's RoboCup Middle Size League.
"After one of the most interesting competitions in the history of RoboCup from 21th June to 24th June, 2010, in Singapore, the Water[team] from China on the last day of the competition succeeded in winning the world championship 2010 in an exciting game against the team of Tech United from Eindhoven (The Netherlands) with the final result of 5-4."
Soccer competition
"After one of the most interesting competitions in the history of RoboCup from 21th June to 24th June, 2010, in Singapore, the Water[team] from China on the last day of the competition succeeded in winning the world championship 2010 in an exciting game against the team of Tech United from Eindhoven (The Netherlands) with the final result of 5-4."
Soccer competition
HTML代码
