xml tiny

TinyXml配置說明:
(1)將tinyxmlsrc目錄(內含六個文件)拷到工程目錄下;(備註:tinyxmlsrc目錄在TinyXml\TinyXml\目錄下。)
(2)將步驟(1)中的6個文件添加到工程
(3)在程序中#include "tinyxmlsrc\tinyxml.h"

http://www.cnblogs.com/marchtea/archive/2012/11/08/2760593.html

http://sourceforge.net/projects/tinyxml/

xerces和libxml2是C解析XML的兩個主要選擇。
google一下,有很多例子的。

xerces:去網上下一個,安裝上之後,選用裏面的函數就可以解析XML文檔了...要想用的話,得花一點時間熟悉...

libxml2: http://jianlee.ylinux.org/Computer/C/libxml.html#sec11

libxml提供了一個宏來將char*轉換成xmlChar*, 名字很有趣,叫 BAD_CAST


OMNeT++ 啓動錯誤:“無法定位程序輸入點gzdirect於動態鏈接庫zlib1.dll”解決方案

http://blog.csdn.net/qq1987924/article/details/7695234

GTK+下載頁下載最新版的zlib運行時zlib_1.2.5-2_win32.zip,將其中bin文件夾中的zlib1.dll複製到C:\Windows\System32中,再啓動GIMP就能正常打開了。也可以複製GIMP安裝目錄下bin文件中的zlib1.dll。這種方法不影響其他程序的正常啓動。


在vs2008中添加lib文件以及一些常用項目設置選項

http://blog.csdn.net/linrulei11/article/details/7550731

下面以添加ws2_32.lib文件爲例

方法一(直接添加代碼):

直接在.cpp文件中,添加#pragma comment(lib, "ws2_32.lib");即可。(ws2_32.lib即爲你要添加的lib文件)

 

方法二(在vs工具欄中添加):

1.項目(project) -> TcpSrv屬性(TcpSrv properties) (其中TcpSrv爲工程名)

屬性

 

 

2.打開TcpSrv屬性頁後,配置屬性 -> 鏈接器(linker) -> 輸入(Input) ,在附加依賴項 (AddITional dependences)中輸入ws2_32.lib即可。

屬性頁

PS:括號內英文部分爲英文版vs2008




【Configuration Properties】

  General-> 【Output Directory】  .../../output/debug 表示生成文件的輸出路徑

  General->【Intermediate Directory】.WsIuCsParser___Win32_Debug表示生成的中間路徑

 Debugging->【Command】../../output/debug/TMPlatformConsole.exe表示此工程爲Dll,TMPlatformConsole.exe會調用這個dll,並且可以在Dll中添加斷點

Debugging->【Working Directory】../../output/debug,設置工作的路徑

【c/c++】

General-> 【Additonal Include Directories】./include/epan,./include/glib,./include,./include/decode表示此工程所依賴的文件所在路徑

Precompiled headers->【Precompiled Header File】.WsIuCsParser___Win32_Debug/WsIuCsParser.pch

預編譯頭文件

Output Files->【ASM List Name】.WsIuCsParser___Win32_Debug/

Output Files->【Object File Name】.WsIuCsParser___Win32_Debug/

Output Files->【Program Database File Name】.WsIuCsParser___Win32_Debug/

【Linker】

 General->【Output File】../../output/debug/WsIuCsParser.dll,定義輸出文件路徑及名稱

General->【Additional Library Directories】./lib 依賴lib路徑

Input->【Additional Dependencies】 glib-2.0.lib gmodule.lib  依賴的lib文件

Input->【Module Definition File】./ws_IuCs.def,定義要導出函數的文件,如果要導出函數,這是必須定義的

定義格式:

LIBRARY WsIuCsParser
DESCRIPTION "WsIuCsParser DLL" 
EXPORTS 
InitWsParserIuCs    @1 
DeInitWsParserIuCs   @2
WsIuCsParse       @3

Debugging-> 【Generate Program Database File】.../../output/debug/WsIuCsParser.pdb

Advanced->【Import  Library】.../../output/debug/WsIuCsParser.lib




LIBXML2庫windows使用指南





發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章