青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

O(1) 的小樂

Job Hunting

公告

記錄我的生活和工作。。。
<2010年9月>
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789

統計

  • 隨筆 - 182
  • 文章 - 1
  • 評論 - 41
  • 引用 - 0

留言簿(10)

隨筆分類(70)

隨筆檔案(182)

文章檔案(1)

如影隨形

搜索

  •  

最新隨筆

最新評論

閱讀排行榜

評論排行榜

pragma comment命令

算是備忘吧。。轉幾篇,寫的都差不多,還行。。

pragma comment的使用

該宏放置一個注釋到對象文件或者可執行文件。

#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.
  • /DEFAULTLIB

  • /EXPORT

  • /INCLUDE

  • /MANIFESTDEPENDENCY

  • /MERGE

  • /SECTION

(1)/DEFAULTLIB:library

/DEFAULTLIB 選項將一個 library 添加到 LINK 在解析引用時搜索的庫列表。用 /DEFAULTLIB 指定的庫在命令行上指定的庫之后和 .obj 文件中指定的默認庫之前被搜索。

忽略所有默認庫 (/NODEFAULTLIB) 選項重寫 /DEFAULTLIB:library。如果在兩者中指定了相同的 library 名稱,忽略庫 (/NODEFAULTLIB:library) 選項將重寫 /DEFAULTLIB:library

(2)/EXPORT:entryname[,@ordinal[,NONAME]][,DATA]

使用該選項,可以從程序導出函數,以便其他程序可以調用該函數。也可以導出數據。通常在 DLL 中定義導出。entryname 是調用程序要使用的函數或數據項的名稱。ordinal 在導出表中指定范圍在 1 至 65,535 的索引;如果沒有指定 ordinal,則 LINK 將分配一個。NONAME 關鍵字只將函數導出為序號,沒有 entryname

DATA 關鍵字指定導出項為數據項。客戶程序中的數據項必須用 extern __declspec(dllimport) 來聲明。
有三種導出定義的方法,按照建議的使用順序依次為:

  1. 源代碼中的 __declspec(dllexport)

  2. .def 文件中的 EXPORTS 語句

  3. LINK 命令中的 /EXPORT 規范

所有這三種方法可以用在同一個程序中。LINK 在生成包含導出的程序時還創建導入庫,除非生成中使用了 .exp 文件。
LINK 使用標識符的修飾形式。編譯器在創建 .obj 文件時修飾標識符。如果 entryname 以其未修飾的形式指定給鏈接器(與其在源代碼中一樣),則 LINK 將試圖匹配該名稱。如果無法找到唯一的匹配名稱,則 LINK 發出錯誤信息。當需要將標識符指定給鏈接器時,請使用 Dumpbin 工具獲取該標識符的修飾名形式。

(3)/INCLUDE:symbol

/INCLUDE 選項通知鏈接器將指定的符號添加到符號表。

若要指定多個符號,請在符號名稱之間鍵入逗號 (,)、分號 (;) 或空格。在命令行上,對每個符號指定一次 /INCLUDE:symbol。
鏈接器通過將包含符號定義的對象添加到程序來解析 symbol。該功能對于添包含不會鏈接到程序的庫對象非常有用。用該選項指定符號將通過 /OPT:REF 重寫該符號的移除。



我們經常用到的是#pragma   comment(lib,"*.lib")這類的。
#pragma   comment(lib,"Ws2_32.lib")表示鏈接Ws2_32.lib這個庫。  
和在工程設置里寫上鏈入Ws2_32.lib的效果一樣,不過這種方法寫的  
程序別人在使用你的代碼的時候就不用再設置工程settings了
 

comment

Visual Studio 6.0

#pragma comment(comment-type [,commentstring] )

Places a comment record into an object file or executable file. The comment-type is one of five predefined identifiers, described below, that specify the type of comment record. The optional commentstring is a string literal that provides additional information for some comment types. Because commentstring is a string literal, it obeys all the rules for string literals with respect to escape characters, embedded quotation marks ("), and concatenation.

compiler

Places the name and version number of the compiler in the object file. This comment record is ignored by the linker. If you supply a commentstring parameter for this record type, the compiler generates a warning.

exestr

Places commentstring in the object file. At link time, this string is placed in the executable file. The string is not loaded into memory when the executable file is loaded; however, it can be found with a program that finds printable strings in files. One use for this comment-record type is to embed a version number or similar information in an executable file.

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. Since the library name precedes 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. 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.

linker

Places a linker option in the object file. You can use this comment-type to specify a linker option instead  placing the option on the Link tab of the Project Settings dialog box. For example, you can specity the /include option to force the inclusion of a symbol:

#pragma comment(linker, "/include:__mySymbol")

user

Places a general comment in the object file. The commentstring parameter contains the text of the comment. This comment record is ignored by the linker.

The following pragma causes the linker to search for the EMAPI.LIB library while linking. The linker searches first in the current working directory and then in the path specified in the LIB environment variable.

#pragma comment( lib, "emapi" )

The following pragma causes the compiler to place the name and version number of the compiler in the object file:

#pragma comment( compiler )

Note   For comments that take a commentstring parameter, you can use a macro in any place where you would use a string literal, provided that the macro expands to a string literal. You can also concatenate any combination of string literals and macros that expand to string literals. For example, the following statement is acceptable:

#pragma comment( user, "Compiled on " __DATE__ " at " __TIME__ )

posted on 2010-09-21 13:02 Sosi 閱讀(534) 評論(0)  編輯 收藏 引用

統計系統
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            久久精品人人做人人综合| 蜜桃av综合| 夜夜嗨av一区二区三区中文字幕 | 亚洲激情视频在线观看| 夜夜嗨av一区二区三区网站四季av| 国产精品视频网| 亚洲久色影视| 亚洲精品一区二区三区樱花| 亚洲看片一区| 国产一区二区三区的电影| 国产日韩欧美在线观看| 亚洲在线播放电影| 久久久久久69| 99精品久久| 亚洲综合日韩| 蜜桃av一区二区三区| 久久精品日产第一区二区| 欧美深夜福利| 免费观看国产成人| 欧美精品v日韩精品v国产精品| 亚洲一区久久| 激情婷婷亚洲| 欧美一级在线视频| 9色porny自拍视频一区二区| 国产三级欧美三级日产三级99| 午夜久久久久久| 性欧美暴力猛交69hd| 美国成人直播| 亚洲精品中文字幕在线| 免费成人高清视频| 久久精品国产免费看久久精品| 99视频有精品| 亚洲美女精品成人在线视频| 欧美福利一区二区三区| 性色av一区二区怡红| 另类激情亚洲| 欧美第一黄色网| 国产乱码精品一区二区三| 亚洲理伦电影| 亚洲人成网站在线观看播放| 国产精品三上| 欧美日韩久久精品| 亚洲一级网站| 国产亚洲午夜| 欧美视频免费在线观看| 欧美精品不卡| 欧美黑人在线观看| 亚洲大胆人体视频| 99re8这里有精品热视频免费| 国产精品美女视频网站| 欧美日韩国产在线看| 亚洲国产aⅴ天堂久久| 国产一区二区三区在线观看免费视频 | 午夜精品久久久久久久99樱桃| 亚洲视频一二三| 99精品视频免费观看视频| 国产日韩欧美一区二区| 欧美激情一区二区三区全黄| 日韩亚洲欧美中文三级| 在线日韩视频| 性久久久久久久久久久久| 久久久免费精品视频| 在线看视频不卡| 亚洲婷婷免费| 亚洲男人的天堂在线aⅴ视频| 国产日韩精品一区二区浪潮av| 亚洲在线视频| 亚洲国产毛片完整版 | 欧美激情a∨在线视频播放| 久久综合色婷婷| 欧美在线视频一区| 夜夜精品视频一区二区| 亚洲午夜精品17c| 欧美国产日韩一区| 久久久www| 欧美在线播放一区| 亚洲欧美成人精品| 欧美一区二区三区在线播放| 欧美影院视频| 可以看av的网站久久看| 久久精品视频免费| 久久亚洲精品视频| 久久综合婷婷| 欧美精品18| 国产精品日本一区二区| 国产精品欧美一区喷水| 国产亚洲免费的视频看| 亚洲二区免费| 正在播放亚洲一区| 欧美一乱一性一交一视频| 久久精品人人做人人综合 | 久久久女女女女999久久| 欧美成人在线影院| 国产精品免费看久久久香蕉| 国产精品成人在线观看| 国产亚洲观看| 亚洲伦伦在线| 久久国产精品亚洲77777| 久久疯狂做爰流白浆xx| 久久天天狠狠| 亚洲欧洲在线看| 亚洲免费av网站| 欧美在线免费观看| 欧美/亚洲一区| 国产香蕉97碰碰久久人人| 亚洲国内自拍| 欧美久久成人| 91久久国产自产拍夜夜嗨| 亚洲高清久久久| 日韩一级精品| 久久九九热re6这里有精品 | 欧美一级午夜免费电影| 欧美日韩国产精品一区| 黄色精品免费| 这里只有精品电影| 另类春色校园亚洲| 亚洲欧美在线免费| 欧美精品日韩www.p站| 极品尤物一区二区三区| 欧美在线网址| 一区二区三区视频在线| 欧美国产精品va在线观看| 激情欧美日韩一区| 欧美在线视频免费观看| 9色精品在线| 欧美激情91| 亚洲国产一区在线观看| 免费亚洲电影在线观看| 性娇小13――14欧美| 国产精品丝袜久久久久久app| 99精品欧美一区二区三区综合在线 | 午夜国产欧美理论在线播放| 欧美体内she精视频| 亚洲福利国产| 久久免费视频在线观看| 欧美一级二区| 久久精品一区二区三区不卡牛牛| 欧美日韩免费高清一区色橹橹| 在线日韩欧美视频| 久久爱www| 亚洲资源在线观看| 欧美日韩国产影院| 亚洲青色在线| 欧美成人精品激情在线观看| 欧美一区二区三区在线看| 国产亚洲美州欧州综合国| 久久久精彩视频| 午夜精品免费| 国内成人精品2018免费看| 猫咪成人在线观看| 欧美成人按摩| 亚洲午夜激情网站| 亚洲在线成人| 国产精品高清免费在线观看| 在线观看欧美日本| 亚洲欧洲日本一区二区三区| 性色一区二区三区| 在线播放亚洲| 久久精品国产精品亚洲精品| 亚洲资源在线观看| 极品av少妇一区二区| 久久国产主播| 久久免费视频网| 日韩午夜中文字幕| 亚洲老司机av| 国产精品一卡二| 免费高清在线一区| 欧美日韩精品在线播放| 亚洲永久精品国产| 久久久久久久91| 国产一区二区三区免费观看| 欧美成人一区二免费视频软件| 一本久久综合亚洲鲁鲁| 国产精品99免视看9| 久久免费99精品久久久久久| 亚洲欧洲一区二区三区在线观看| 亚洲色在线视频| 亚洲乱码视频| 国产精品日本精品| 欧美精品一二三| 久久久久久日产精品| 一区二区免费看| 亚洲高清不卡一区| 亚洲盗摄视频| 日韩午夜激情| 极品少妇一区二区三区精品视频| 在线观看国产精品网站| 麻豆国产精品777777在线| 亚洲欧美视频在线| 女主播福利一区| 国产精品av久久久久久麻豆网| 国产精品亚洲аv天堂网| 亚洲卡通欧美制服中文| 欧美日韩在线不卡| 国产伦精品一区二区三区免费迷| 国产精品一区二区三区久久| 国产精品美女www爽爽爽| 欧美日本中文字幕| 日韩亚洲视频在线| 99re成人精品视频|