2009年4月26日 星期日

[轉載]List of Best Open Souce projects written in VC++/MFC

List of Best Open Souce projects written in VC++/MFC
http://www.codeproject.com/KB/cpp/OpenSource_VC_MFC.aspx






Introduction

List of some of the best Open Source projects written in VC++/MFC.

Background

Codeproject has the best source code repository for VC++ developers. But another site Sourceforge.net also have some of the best quality projects available for VC++. Here I lists some of the best open source projects written in Visual C++. These are very good reference for all VC++ programmers.

List of Best Open Souce projects written in VC++/MFC

  1. 7-Zip (http://sourceforge.net/projects/sevenzip/) :
    7-Zip is a file archiver with the high compression ratio. The program supports 7z, ZIP, CAB, RAR, ARJ, LZH, CHM, GZIP, BZIP2, Z, TAR, CPIO, RPM and DEB formats. Compression ratio in the new 7z format is 30-50% better than ratio in ZIP format.
  2. eMule (http://sourceforge.net/projects/emule/):
    eMule is a filesharing client which is based on the eDonkey2000 network but offers more features than the standard client.
  3. eMule Plus (http://sourceforge.net/projects/emuleplus/) :
    eMule Plus is an evolution of the original eMule project, created to improve its abilities and features, in both work efficiency and user interface.
  4. eMule Morph (http://sourceforge.net/projects/emulemorph/):
    eMule Morph Mod - eMule Modding Project.
  5. FileZilla (http://sourceforge.net/projects/filezilla/):
    FileZilla is a fast FTP and SFTP client for Windows with a lot of features. FileZilla Server is a reliable FTP server.
  6. KeePass Password Safe (http://sourceforge.net/projects/keepass/):
    KeePass Password Safe is a free, open source, light-weight and easy-to-use password manager for Windows. You can store your passwords in a highly-encrypted database, which is locked with one master password or key file.
  7. K-Meleon (http://sourceforge.net/projects/kmeleon/):
    K-Meleon is a fast and customizable web browser that can be used instead of Internet Explorer on Windows. Powered by the same Gecko engine as the Firefox and Mozilla browsers, K-Meleon provides users with a secure browsing experience.
  8. MiKTeX (http://sourceforge.net/projects/miktex/):
    MiKTeX is an up-to-date implementation of TeX & Friends for Windows (all current variants).
  9. MyNapster (http://sourceforge.net/projects/mynapster/):
    MyNapster is a Win32 client using Gnutella and IRC for chat. It is based on Gnucleus and utilizes MFC (works with WINE).
  10. Nokia Composer (http://sourceforge.net/projects/nokiacomposer/):
    This is a Win32, VC++ MFC application to manage Nokia mobile phones melodies. Includes VC++ source code and Rational Rose UML model.
  11. Peters Backup (http://sourceforge.net/projects/pbackup):
    Peters Backup is a program for backing up your important data files on to diskette, zip drive, fixed disk or CD/RW. It uses an extremely efficient compression algorithm. It keeps track of all versions of your files in full and incremental backups.
  12. Password Safe (https://sourceforge.net/projects/passwordsafe/):
    Password Safe is a password database utility. Users can keep their passwords securely encrypted on their computers. A single Safe Combination unlocks them all.
  13. RenFile (http://sourceforge.net/projects/renfile/):
    rename files and folders in bulk using this vc++ .net program.
  14. Shareaza (https://sourceforge.net/projects/shareaza/):
    Multi-network peer-to-peer file-sharing client supporting Gnutella2, Gnutella1, eDonkey2000/eMule and BitTorrent protocols. Using C++, MFC and ATL, for Windows.
  15. SunshineUN (http://sourceforge.net/projects/sunshineun/):
    SunshineUN is a free Napster based file sharing program for Opennap/Slavanap which allows you to share and download multiple files of different types for example music, pictures and videos. It is for Windows and it is written in C++ using MFC .
  16. TortoiseCVS (http://sourceforge.net/projects/tortoisecvs/):
    TortoiseCVS is an extension for Microsoft Windows Explorer that makes using CVS fun and easy. Features include: colored icons, tight integration with SSH, and context-menu interactivity.
  17. TortoiseSVN (http://sourceforge.net/projects/tortoisesvn):
    TortoiseSVN is a Subversion (SVN) client, implemented as a windows shell extension. It's intuitive and easy to use, since it doesn't require the Subversion command line client to run. Simply the coolest Interface to (Sub)Version Control!
  18. WinDirStat: Windows Directory Statistics (http://sourceforge.net/projects/windirstat/):
    WinDirStat (WDS) is a disk usage statistics viewer and cleanup tool for Windows. It shows disk, file and directory sizes in a treelist as well as graphically in a treemap, much like KDirStat or SequoiaView.
  19. WinDjView (http://sourceforge.net/projects/windjview):
    WinDjView is a fast, compact and powerful DjVu viewer for Windows with continuous scrolling and advanced printing options, based on free DjVuLibre library. MacDjView is a simple DjVu viewer for Mac OS X, also with continuous scrolling.
  20. C++ Library for Windows (http://sourceforge.net/projects/rulib):
    A C++ library for the Windows platform containing classes for MIME, video capture, socket, Windows registry, files, images, and other basic purposes.
  21. WinMerge (https://sourceforge.net/projects/winmerge/):
    WinMerge is a Win32 tool for visual difference display and merging, for both files and directories. Unicode support. Flexible syntax coloring editor. Windows Shell integration. Regexp filtering. Side-by-side line diff and highlights diffs inside lines.
  22. Disk Cleaner (http://sourceforge.net/projects/dclean/):
    Disk Cleaner is a tool to quickly and easily free disk space that is used by temporary files like the system temporary folder, the Internet Explorer Cache and Cookies folder, and the Recycle Bin. It can be expanded with text-based plug-ins & DLLs.
  23. Shared IIS Server Log/Bandwidth-Analyzer (http://sourceforge.net/projects/sharediis/):
    This utility is intended to be used to analyze and present a per-site (in case of WWW logs), or (in case of FTP logs) a per-web summary of bandwidth used, hits, and average bandwidth used.
  24. Remote Control Center (http://sourceforge.net/projects/remotectrlctr/):
    Remote Control Center is an application designed to help a system/network administrators taking control of remote devices in the network from a single GUI.
  25. RevConnect - Enhanced DC++ (http://sourceforge.net/projects/reverseconnect/):
    RevConnect is a file sharing program based on DC++. It is fully compatible with the Direct Connect network and made some major features.
  26. Show Traffic (http://sourceforge.net/projects/showtraf):
    "Show Traffic" monitors network traffic on the chosen network interface and displays it continuously. It could be used for locating suspicious network traffic or to evaluate current utilization of the network interface.
  27. War FTP Daemon Engine (http://sourceforge.net/projects/wfde/):
    A generic C++ class library for FTP server implementations, including a full-featured, mature FTP server.
  28. AxCrypt - File Encryption for Windows (http://sourceforge.net/projects/axcrypt/):
    AxCrypt - Personal Privacy and Security with AES-128 File Encryption and Compression for Windows 98/ME/NT/2K/XP. Double-click to automatically decrypt and open documents. Store strong keys on removable USB-devices.
  29. Open Source Firewall For Windows (http://sourceforge.net/projects/firewallpapi/):
    FirewallPAPI is an open source firewall for Windows 2000 and above. It is a simple utility for filter network traffic.
  30. MinkSonic Jukebox (http://sourceforge.net/projects/minksonic):
    MFC-based front-end to Winamp that provides jukebox behavior as well as "explorer-like" MP3 library management, a web-based network interface and MP3 frame error detection/correction.
  31. p2pfire: super p2p driver firewall (http://sourceforge.net/projects/p2pfire):
    Super P2P firewall 32/64 bits (driver + aplication).
  32. WABAccess (http://sourceforge.net/projects/wabaccess/):
    The WABAccess component give an access to the Windows Address Book (or WAB) used by Outlook Express. It's a COM/ATL component that give an access from Visual Basic language or Scripting language (VBS) to WAB.
  33. Yet Another Fractal Explorer (http://sourceforge.net/projects/yafe):
    Yet Another Fractal Explorer is an interactive fractal renderer for Windows. It features extremely simple and intuitive user interface and is capable of producing mathematically-sound renderings.
  34. CDDA Ripper XP (http://sourceforge.net/projects/cddarip):
    CDDA Ripper XP is an audio CD ripper program that provides support for NT/2000/XP natively (ASPI manager is optional). It supports WAV-MP3-OGG-FLAC-ACM codec encoding and can be used to rip multiple CDs. It uses newest encoders like LAME and Ogg/Vorbis.
  35. [ mp3 - explorer ] (http://sourceforge.net/projects/mp3explorer):
    [ mp3 - explorer ] is a MP3 Manager providing advanced features : multi-folders file scaning with cache - id3v1 and id3v2 tagging - Intellitag - Html view of the tracks displaying album cover and Lyrics.
  36. ultraMaGE (http://sourceforge.net/projects/ultramage):
    ultraMage is a powerful dual-window file manager for Windows with many useful features like bookmarks, advanced file operations and folder synchronisation. It is still very easy to use, because the user interface is similar to that of Windows Explorer.
  37. WinTarBall (http://sourceforge.net/projects/wintarball/):
    WinTarBall adds a control panel and an Explorer shell extension that allow users to compress directories into .tgz or .tbz files simply by right-clicking on them and choosing "compress to tarball".
  38. XML Explorer (http://sourceforge.net/projects/xpathexplorer/):
    A utility to query xml files using XPath and also extend XPath to more documents than one. Win32 platform/MFC.
  39. Emerge Desktop (http://sourceforge.net/projects/emerge/):
    emerge is an alternate windows shell. It's purpose is to replace Windows Explorer as your desktop user interface, providing similar functionality, with the additional plugins to provide even more.
  40. Folder Size for Windows (http://sourceforge.net/projects/foldersize/):
    Folder Size for Windows adds a new column to the Windows Explorer details view that displays the sizes of files and folders. A service scans your hard disk in the background and caches the results. Designed for performance!
  41. Rename-It! (https://sourceforge.net/projects/renameit/):
    Define some filters to apply to a list of files, which can be in multiple folders, to rename the whole list at once. It checks the file names, integrates in the Shell (via Explorer context menu), supports regular expressions, ID3 tags, and much more.
  42. ShellWM (http://sourceforge.net/projects/shellwm/):
    Windows skinning application to be used with a Win32 Shell replacement (like Litestep, geOshell, sharpE, etc.) or just native Explorer.
  43. Blackbox for Windows (http://sourceforge.net/projects/bb4win/):
    Blackbox for Windows is an alternative shell for Microsoft Windows. It is based stylistically on the Blackbox window manager for the X Window System, however it does not use the same codebase except for the gradient rendering code.
  44. HideThatWindow! (http://sourceforge.net/projects/hidethatwindow/):
    HideThatWindow! enables you to Hide or Show a window; minimize, maximize and restore its original size (or change the size to fit your needs). Disable the window's taskbar button or send it to tray. Other features are transparency, docking and top-most.
  45. Security & Privacy Complete 3 (http://sourceforge.net/projects/cmia/):
    Security & Privacy Complete is mainly a security tool for Windows. It can disable all services which might be a securit-risk, harden registry settings... Also included privacy features for Internet Explorer, Media Player, and of course: Mozilla Firefox.
  46. TaskSwitchXP (http://sourceforge.net/projects/taskswitchxp/):
    TaskSwitchXP provides the same functionality as the existing application switching mechanism in Windows XP today. In addition to displaying an icon list, however, the application will also show a thumbnail preview of the window that will be switched to.
  47. Windows Process Tools (http://sourceforge.net/projects/winpstools):
    Command-line utilities to find, list, and terminate running processes under Windows, similar to the Unix ps and kill commands. Good for command-line folks who don't like to use the Windows Task Manager.
  48. OpenSTA (http://sourceforge.net/projects/opensta/):
    Open System Testing Architecture - a distributed software testing architecture designed around CORBA. The current toolset has the capability of performing scripted Web (HTTP and HTTPS) heavy load tests with performance measurements from Win32 platforms.
  49. MFC MUTE (http://sourceforge.net/projects/mfc-mute-net/):
    MFC MUTE is a MS Windows *ONLY* client for the MUTE anonymous P2P network. This application derives from the original MUTE (mute-net.sourceforge.net) app supporting anonymous file sharing. The GUI is the best/most polished Windows MUTE available.
  50. DeepNetScanner (http://sourceforge.net/projects/nbtenum):
    This is a internet security scanner which scans a specified machine or a range of IPs for all possible information like NetBIOS enumeration, gathering sharelist, domain, os, lan manager, remote connection, SNMP walking, ...
  51. WinSCP (http://sourceforge.net/projects/winscp/):
    WinSCP is a SFTP and SCP client for Windows using SSH. Its main function is secure copying of files between a local and a remote computer. Beyond this basic function, WinSCP manages some other actions with files. Plugin to FAR manager is available too.
  52. winfingerprint (http://sourceforge.net/projects/winfingerprint/):
    Winfingerprint is a Win32 MFC VC++ .NET based security tool that is able to Determine OS, enumerate users, groups, shares, SIDs, transports, sessions, services, service pack and hotfix level, date and time, disks, and open tcp and udp ports.
  53. Visual Component Framework (http://vcf-online.org/): The Visual Component Framework is an advanced C++ application framework that makes it easy to produce powerful C++ applications. The framework is a based on a thoroughly modern C++ design and has built in support for Rapid Application Development (RAD).

Some Very good VC++/MFC resources beside Codeproject.com

  1. http://www.naughter.com/ (VC++/MFC huge code repository)
    By PJ naughter Personally my favorite beside codeproject.com. This site contains huge source code repository for MFC programmer. It has some of the best addon classes written for MFC programmers. What I like most about PJ naughter is that he keeps on improving these classes and fix each and every bug in the code. Some of the classes has now is 70 to 80th version.
  2. http://flounder.com/mvp_tips.htm (VC++/MFC)
    BY Joseph M. Newcomer
    This is very nice site containing lots and lots of VC++ tips tricks and very detailed essays + great code examples. Main focus is on how to write the code in right way.
  3. http://www.cheztabor.com/ (ATL/WTL)
    by cheztabor
    This site contains very nice code examples for ATL , WTL and Shell programming.
  4. http://www.viksoe.dk/code/ (ATL/WTL)
    By author of Gmail Drive
    Although code for GmailDrive is not provided but this site contains lots of other code example covering MFC, ATL, WTL and Shell programming.
  5. http://www.codeguru.com/ (VC++/MFC/ATL and lot more)
    Does not need any introduction. I think most of us already know about this site.
  6. http://programmerworld.net/personal/projects.htm (VC++/MFC )
    This is my personal web site. It has one firewall software with source code. Will be adding more code soon.
  7. http://vcfaq.mvps.org/ (VC++/MFC FAQs)
    This is the MVP's Frequently Asked Questions Page for Microsoft Visual C++. In here you'll find answers to several common asked questions about Visual C++, MFC and Windows development in C/C++, as well as other.
  8. http://www.developersvoice.com/programming/article/vc-mfc (VC++/MFC)
    VC++/ MFC related FAQS
  9. http://www.functionx.com/ (VC++/MFC )
    A beginners site for VC++ and MFC programming. Contains some very nice beginner articles.
  10. http://www.softlookup.com/tutorial/vc++/index.asp A beginners site for VC++ and MFC programming. Contains some very nice beginner articles.
  11. http://www.mathcs.sjsu.edu/faculty/pearce/mfc/ A very vice web site. Very well written. One of the best resource for beginner in the field of VC++/MFC.

Points of Interest

I have written this article to provide all VC++ developers a place where they can find some of the best open source VC++/MFC applications. I personally find them very useful.

Kindly help me in adding more good open source VC++/MFC projects in this list.

You can find more articles and software projects with free source code on my web site :-

2009年4月17日 星期五

Lua與C語言的結合- Part1 設定檔的應用

Lua是一個C語言寫成的script language.


Lua是什麼 google 一下就有了 我擷取wiki的一部分資料來使用


Lua 的wiki (http://zh.wikipedia.org/w/index.php?title=Lua&variant=zh-hant)


特性


Lua是一種輕量語言,它的官方版本只包括一個精簡的核心和最基本的庫。這使得Lua體積小、啟動速度快。它用標準C語言編寫並以源代碼形式開放,編譯後僅僅一百餘K,可以很方便的嵌入別的程式裡。和許多"大而全"的語言不一樣,網路通訊、圖形界面等都沒有預設提供。但是Lua可以很容易地被擴展:由宿主語言(通常是C或C++)提供這些功能,Lua可以使用它們,就像是本來就內置的功能一樣。事實上,現在已經有很多成熟的擴展模塊可供選用。


Lua是一種多重編程範式的程式設計語言:它只提供了很小的一個特性集合來滿足不同編輯範式的需要,而不是為某種特定的編輯範式提供繁雜的特性支援。例如,Lua並不提供繼承這個特性,但是你可以用元表來模擬它。諸如名字空間這些概念都沒有在語言基本特性中實現,但是我們可以輕易的用表結構(Lua唯一提供的複雜數據結構)輕易模擬。Lua可以在運行時隨時構造出一個函數,並把它看作一個對象(正是所謂的first class function),這個特性可以很好的滿足函數式編程的需要。這是提供了這些基本的元特性,我們可以任意的對語言進行自需的改造。

Lua原生支援的數據類型非常之少,它只提供了 數字(缺省是雙精度浮點數,可配置)、布爾量、字符串、表、子程序、協程(coroutine)以及用戶自定義數據這幾種。但是其處理表和字符串的效率非常之高,加上元表的支援,我們可以高效的模擬出需要的複雜數據類型(比如集合、數組等)。

Lua是一個動態弱類型語言,支援增量式垃圾收集策略。有內建的,與操作系統無關的協作式多線程(coroutine)支援。

================================================================


比起python perl來說lua非常的小 資源需求量也很低


Perl的原始碼 很亂 有些架構上 非常不適合C/C++ embed


python 就好很多 python 比起來 比perl好學 也好debug多


至於embed這方便 也處理得非常好 python架構有想到embed這一塊


但是python有一個缺點 就是他需要C++的compiler


那我們可以拿Lua作什麼用 除了拿來作script engine外



因為1. Lua 需求資源少 2.Lua API 好使用 3. 當檔案文法錯誤 會有訊息指出


還有一個很有用的功能 就是 當作"設定檔"或是"文字資源檔"


接下來 提供下面的作法 跟大家分享


1.Init lua


2. Load Lua file


3. How to trace lua object


前置作業 到Lua的網站download一份原始碼 跟你的程式結合在一起
Lua 5.1.4 Link: http://www.lua.org/ftp/lua-5.1.4.tar.gz


1.如何init Lua


lua_State 可以產生很多個 每一個代表一個Lua virtual machine


這也是lua 有考慮到embed之後的設計 ,perl就沒有這樣的好處




2. Load Lua file





3. Trace Lua object.


這邊提供一個trace/dump object的function
可以參考codes的作法 可以隨意implement 自己讀取變數或是儲存變數的函式
這邊 有一個非常重要的一點 就是 如何trace table
一般都會用 lua_objlen() 去讀取table的obj len
但是 你會發現 會有點怪怪的
如果你的table裡面 有另外一個table你會發現 lua_objlen()回來的數字並不包含sub-table
這個部分 我有機會 再另外開一篇來解釋這個東西
如果 你的table不會有含有string-index的table 請用lua-objlen() 然後用index去取得obj
要完整的trace一個table 要利用 lua_next() api (這樣出來的順序是不固定的)
如何使用請參考我提供的codes

setting.lua
----------------------------

----------------------------


trace後的結果
----------------------------

----------------------------

Source code:

_traceLuaGlobalObject(g_pLuaState,"ConfigDB",stdout);








參考資料:
在可插入脚本的应用程序中嵌入 Lua (http://www.ibm.com/developerworks/cn/linux/l-embed-lua/)
使用 Lua 编写可嵌入式脚本 (http://www.ibm.com/developerworks/cn/linux/l-lua.html)

2009年4月15日 星期三

[其他筆記]Visual C++ 編譯器選項


Visual C++ 編譯器選項






最佳化

選項

用途

/O1

建立小型程式碼。

/O2

建立快速程式碼。

/Ob

控制內嵌展開。

/Od

停用最佳化。

/Og

使用全域最佳化。

/Oi

產生內建函式。

/Os

偏好小的程式碼。

/Ot

偏好快的程式碼。

/Ox

使用最大最佳化 (/Ob2gity /Gs)。

/Oy

省略框架指標 (僅適用於 x86)。

程式碼產生

選項

用途

/arch

在程式碼產生時使用 SSE 或 SSE2 指令 (僅適用於 x86)。

/bigobj

增加 .obj 檔中可定址區段的數目。

/clr

產生輸出檔案,以便在 Common Language Runtime 上執行。

/EH

指定例外處理模型。

/favor

產生已為特定 x64 架構最佳化的程式碼,或為 AMD64 和 延伸記憶體 64 技術 (Extended Memory 64 Technology,EM64T) 架構中微架構特性最佳化的程式碼。

/fp

指定浮點行為。

/G1

為 Itanium 處理器執行最佳化。只有 IPF 跨平台編譯器或 IPF 原生編譯器才有提供。

/G2

為 Itanium2 處理器執行最佳化。只有 IPF 跨平台編譯器或 IPF 原生編譯器才有提供。

/Gd

使用 __cdecl 呼叫慣例 (僅適用於 x86)。

/Ge

啟動堆疊探查。

/GF

啟用字串共用。

/Gh

呼叫攔截函式 _penter

/GH

呼叫攔截函式 _pexit

/GL

啟用整個程式最佳化。

/Gm

啟用最少重建。

/GR

啟用執行階段型別資訊 (RTTI)。

/Gr

使用 __fastcall 呼叫慣例 (僅適用於 x86)。

/Gs

控制堆疊探查。

/GT

對使用靜態執行緒區域儲存區配置的資料支援 Fiber 安全性。

/GX

啟用同步例外處理。

/Gy

啟用函式階層連結。

/Gz

使用 __stdcall 呼叫慣例 (僅適用於 x86)。

/MD

使用 MSVCRT.lib 建立多執行緒 DLL。

/MDd

使用 MSVCRTD.lib 建立偵錯多執行緒 DLL。

/MT

使用 LIBCMT.lib 建立多執行緒可執行檔。

/MTd

使用 LIBCMTD.lib 建立偵錯多執行緒可執行檔。

/Qfast_transcendentals

產生快速超越函式。

/Qimprecise_fwaits

移除 try 區塊內的 fwait 命令。

輸出檔

選項

用途

/FA

建立清單檔 設定清單檔名稱。

/Fa

建立清單檔 設定清單檔名稱。

/Fd

重新命名程式資料庫檔案。

/Fe

重新命名可執行檔。

/Fm

建立對應檔 (Mapfile)。

/Fo

建立目的檔。

/Fp

指定先行編譯標頭檔的名稱。

/FR/Fr

產生瀏覽器檔案。

/Fx

將插入的程式碼與原始程式檔合併。

偵錯

選項

用途

/GS

緩衝區安全性檢查。

/GZ

/RTC1 相同。

/homeparams

在函式進入時,強制暫存器中所傳遞的參數寫入至堆疊上的位置。這個編譯器選項只適用於 x64 編譯器 (原生和跨平台編譯)。

/RTC

啟用執行階段錯誤檢查。

/Wp64

偵測 64 位元可移植性問題。

/Yd

將完整的偵錯資訊置於所有目的檔中。

/Yl

在建立偵錯程式庫時插入一個 PCH 參考。

/Z7

產生 C 7.0 相容的偵錯資訊。

/Zi

產生完整偵錯資訊。

/ZI

將偵錯資訊包括在與「編輯後繼續」相容的程式資料庫中 (僅適用於 x86)。

/Zx

產生可偵錯最佳化程式碼。只有 IPF 跨平台編譯器或 IPF 原生編譯器才有提供。

前置處理器 (Preprocessor)

選項

用途

/AI

指定一個要搜尋的目錄,以解析傳遞給 #using 指示詞的檔案參考。

/C

在前置處理過程中保留註解。

/D

定義常數和巨集。

/E

複製前置處理器輸出至標準輸出。

/EP

複製前置處理器輸出至標準輸出。

/Fl

前置處理指定的包含檔。

/FU

強制使用某一檔名,就如同它已傳遞給 #using 指示詞一樣。

/I

搜尋包含檔的目錄。

/P

將前置處理器輸出寫入檔案。

/U

移除某個預先定義巨集。

/u

移除所有預先定義巨集。

/X

忽略標準 Include 目錄。

語言

選項

用途

/openmp

在原始程式碼中啟用 #pragma omp

/vd

抑制或啟用隱藏的 vtordisp 類別成員。

/vmb

對指向成員的指標使用最佳基底。

/vmg

對指向成員的指標使用完整一般性。

/vmm

宣告多重繼承。

/vms

宣告單一繼承。

/vmv

宣告虛擬繼承。

/Za

停用語言擴充功能。

/Zc

指定 /Ze 下的標準行為。

/Ze

啟用語言擴充功能。

/Zg

產生函式原型。

/Zl

從 .obj 檔案移除預設程式庫名稱。

/Zpn

封裝結構成員。

/Zs

僅檢查語法。

連結

選項

用途

/F

設定堆疊大小。

/LD

建立動態連結程式庫。

/LDd

建立偵錯動態連結程式庫。

/LN

建立 MSIL 模組。

/link

傳遞指定的選項給 LINK。

/MD

使用 MSVCRT.lib 編譯以建立多執行緒 DLL。

/MDd

使用 MSVCRTD.lib 編譯以建立偵錯多執行緒 DLL。

/MT

使用 LIBCMT.lib 編譯以建立多執行緒可執行檔。

/MTd

使用 LIBCMTD.lib 編譯以建立偵錯多執行緒可執行檔。

先行編譯標頭

選項

用途

/Y-

忽略目前組建中所有其他先行編譯標頭編譯器選項。

/Yc

建立先行編譯標頭檔。

/Yd

將完整的偵錯資訊置於所有目的檔中。

/Yu

在建置時使用先行編譯標頭檔。

其他

選項

用途

/?

列出編譯器選項。

@

指定回應檔 (Response File)。

/analyze

啟用程式碼分析。

/c

編譯而不連結。

/doc

將文件註解處理成 XML 檔案。

/errorReport

讓您直接提供內部編譯器錯誤 (ICE) 資訊給 Visual C++ 團隊。

/fc

顯示在診斷測試中傳遞給 cl.exe 的原始程式檔完整路徑。

/H

限制外部 (共用) 名稱的長度。

/HELP

列出編譯器選項。

/hotpatch

建立可線上修補的影像。

/J

變更預設 char 型別。

/MP

同時建置多重原始程式檔。

/nologo

隱藏登入程式的啟始資訊。

QIfist

在必須從浮點型別轉換為整數型別時,抑制呼叫 Helper 函式 _ftol (僅適用於 x86)。

/QIPF_B

根據 B CPU 逐步偵錯的 errata,不會產生指令順序,而導致意外結果(僅適用於 IPF)。

/QIPF_C

根據 C CPU 逐步偵錯的 errata,不會產生指令順序,而導致意外結果(僅適用於 IPF)。

/QIPF_fr32

不要使用上層 96 浮點暫存器(僅適用於 IPF)。

/QIPF_noPIC

產生影像加上與位置有關的程式碼 (僅適用於 IPF)。

/QIPF_restrict_plabels

為不在執行階段建立函式的程式增強效能(僅適用於 IPF)。

/showIncludes

在編譯時顯示所有包含檔清單。

/Tc/TC

指定 C 原始程式檔。

/Tp/TP

指定 C++ 原始程式檔。

/V

設定版本字串。

/Wall

啟用所有警告,包括預設停用的警告。

/W

設定警告層級。

/w

停用所有警告。

/WL

從命令列編譯 C++ 原始程式碼時啟用一行錯誤和警告訊息診斷。

/Zm

指定先行編譯標頭檔的記憶體配置上限。