Microsoft Visual C/C++, Visual Studio tips and tricks



I. Development, compatibility timeline (32-bit compilers)


  1. Visual C/C++ 1.0 (_MSC_VER = 800), 1993
  2. Visual C/C++ 2.0 (_MSC_VER = 900), 1995
  3. Visual C/C++ 4.0 (_MSC_VER = 1000), 1996
  4. Visual C/C++ 5.0, Visual Studio 97 (_MSC_VER = 1100), 1997
  5. Visual C/C++ 6.0, Visual Studio 6.0 (_MSC_VER = 1200), 1998
  6. Visual C/C++ 7.0, Visual Studio .NET (_MSC_VER = 1300), 2002
  7. Visual C/C++ 7.1, Visual Studio .NET (_MSC_VER = 1301), 2003
  8. Visual C/C++ 8.0, Visual Studio 2005 (_MSC_VER = 1400)
  9. Visual C/C++ 9.0, Visual Studio 2008 (_MSC_VER = 1500)
  10. Visual C/C++ 10.0, Visual Studio 2010 (_MSC_VER = 1600)
  11. Visual C/C++ 11.0, Visual Studio 2012 (_MSC_VER = 1700)
  12. Visual C/C++ 12.0, Visual Studio 2013 (_MSC_VER = 1800)

Visual C/C++ 1.0 (_MSC_VER = 800), 1993

C/C++ Runtime (CRTDLL.DLL, etc.) shipped with Windows 3.1(Win32s), NT 3.1 and later

Visual C/C++ 2.0 (_MSC_VER = 900), 1995

C/C++ Runtime shipped with Windows 95, NT40 and later
MFC30.DLL MFC30DEU.DLL MFC30FRA.DLL MFC30JPN.DLL MFC30U.DLL MFCANS32.DLL MFCD30.DLL MFCN30.DLL MFCN30U.DLL MFCO30.DLL MFCO30U.DLL MFCUIA32.DLL MFCUIW32.DLL MSVCRT20.DLL

CL.EXE, LINK.EXE command line:

                            C COMPILER OPTIONS

                              -OPTIMIZATION-
/O1 minimize space                       /Op[-] improve floating-pt consistency
/O2 maximize speed                       /Os favor code space
/Oa assume no aliasing                   /Ot favor code speed
/Ob inline expansion (default n=0)    /Ow assume cross-function aliasing
/Od disable optimizations (default)      /Ox maximum opts. (/Ogityb1 /Gs)
/Og enable global optimization           /Oy[-] enable frame pointer omission
/Oi enable intrinsic functions
                             -CODE GENERATION-
/G3 optimize for 80386                   /Ge enable stack checking calls
/G4 optimize for 80486                   /Gs[num] disable stack checking calls
/G5 optimize for Pentium                 /Gf enable string pooling
/GB optimize for blended model (default) /Gy separate functions for linker
/Gd __cdecl calling convention           /Gh enable hook function call
/Gr __fastcall calling convention        /GX- disable C++ EH (default)
/Gz __stdcall calling convention         /GX  enable C++ EH
                              -OUTPUT FILES-
/Fa[file] name assembly listing file     /Fo name object file
/FA[sc] configure assembly listing       /Fp name precompiled header file
/Fd[file] name .PDB file                 /Fr[file] name source browser file
/Fe name executable file           /FR[file] name extended .SBR file
/Fm[file] name map file
                              -PREPROCESSOR-
/C don't strip comments                  /FI name forced include file
/D{=|#} define macro         /U remove predefined macro
/E preprocess to stdout                  /u remove all predefined macros
/EP preprocess to stdout, no #line       /I add to include search path
/P preprocess to file                    /X ignore "standard places"
                                -LANGUAGE-
/vd{0|1} disable/enable vtordisp         /Za disable extensions (implies /Op)
/vm type of pointers to members       /Ze enable extensions (default)
/Zi prepare for debugging (CodeView)     /Zg generate function prototypes
/Z7 C7 style CodeView information        /Zl omit default library name in .OBJ
/Zd line number information              /Zs syntax check only
/Zp[n] pack structs on n-byte boundary
                              -MISCELLANEOUS-
/?, /help print this help message        /w disable all warnings
/c compile only, no link                 /W set warning level (default n=1)
/H max external name length         /WX treat warnings as errors
/J default char type is unsigned         /Yc[file] create .PCH file
/nologo suppress copyright message       /Yd put debug info in every .OBJ
/Tc compile file as .c      /Yu[file] use .PCH file
/Tp compile file as .cpp    /YX[file] automatic .PCH
/V set version string            /Zn turn off SBRPACK for .SBR files
                                 -LINKING-
/MD link with MSVCRT.LIB                 /F set stack size
/ML link with LIBC.LIB                   /LD Create .DLL
/MT link with LIBCMT.LIB                 /link [linker options and libraries]

Visual C/C++ 4.0 (_MSC_VER = 1000), 1996

C/C++ Runtime shipped with Windows 95, NT40 and later
MSVC40/MSVC41: MFC40.DLL MFC40CHS.DLL MFC40DEU.DLL MFC40ENU.DLL MFC40ESP.DLL MFC40FRA.DLL MFC40ITA.DLL MFC40JPN.DLL MFC40KOR.DLL MFC40U.DLL MSVCRT40.DLL
MSVC42: MFC42.DLL MFC42CHS.DLL MFC42CHT.DLL MFC42DEU.DLL MFC42ENU.DLL MFC42ESP.DLL MFC42FRA.DLL MFC42ITA.DLL MFC42JPN.DLL MFC42KOR.DLL mfc42u.dll MSVCIRT.DLL MSVCRT.DLL

New, updated CL.EXE compiler command line:

/GA optimize for Windows Application     
/GD optimize for Windows DLL             
/QIfdiv[-] generate code for Pentium FDIV fix 
/QI05[-] generate code for Pentium 0x0f erratum fix/Gy separate functions for linker
/Gi[-] enable incremental compilation
/Gm[-] enable minimal rebuild
/GR[-] enable C++ RTTI
/GT enable fiber-safe TLS

New, updated LINK.EXE linker command line:

removed /EXETYPE:DEV386
/DRIVER[:UPONLY]
/GPSIZE:#
/IMPORT:[symbol][,][LIB=container][,WEAK=1]
/IMPORT:[CURRENTVER=#][,][OLDCODEVER=#][,][OLDAPIVER=#]
/LIBPATH:path
/MERGE:from=to
/SHARED
/SWAPRUN:{NET|CD}
/VERBOSE[:LIB]
/WS:AGGRESSIVE

Visual C/C++ 5.0, Visual Studio 97 (_MSC_VER = 1100), 1997

C/C++ Runtime (MSVCRT.DLL, etc.) shipped with Windows 95, NT40 and later

New, updated CL.EXE compiler command line:

/G6 optimize for Pentium Pro
/EHs enable synchronous C++ EH
/EHa enable asynchronous C++ EH
/EHc extern "C" defaults to nothrow
/noBool disable "bool" keyword
/Zm max memory alloc (% of default)
removed /Zn turn off SBRPACK for .SBR files

New, updated LINK.EXE linker command line:

removed /DEBUGTYPE:BOTH
/DRIVER:WDM
/FIXED:NO
removed /IMPORT:[symbol][,][LIB=container][,WEAK=1]
removed /IMPORT:[CURRENTVER=#][,][OLDCODEVER=#][,][OLDAPIVER=#]
/LARGEADDRESSAWARE[:NO]
/MAPINFO:{EXPORTS|FIXUPS|LINES}
/OPT:{ICF[,iterations]|NOICF|NOREF|REF}
removed /SHARED

Visual C/C++ 6.0, Visual Studio 6.0 (_MSC_VER = 1200), 1998

C/C++ Runtime Redist - VCREDIST.EXE, vc6redistsetup_enu.exe, shipped with Windows 2000 (NT 5.0) and later:
atla.dll atlu.dll mfc42.dll mfc42u.dll msvcirt.dll msvcp60.dll

New, updated CL.EXE compiler command line:

/GZ enable runtime debug checks

New, updated LINK.EXE linker command line:

/DELAY:{NOBIND|UNLOAD}
/DELAYLOAD:dll
/LINK50COMPAT
/OPT:{NOWIN98|WIN98}
/TSAWARE[:NO]

Visual C/C++ 7.0, Visual Studio .NET (_MSC_VER = 1300), 2002

C/C++ Runtime - VC_R_7X.EXE, shipped with NetFX 1.0 Runtime:
ATL70A.DLL ATL70U.DLL MFC70.DLL MFC70CHS.DLL MFC70CHT.DLL MFC70DEU.DLL MFC70ENU.DLL MFC70ESP.DLL MFC70FRA.DLL MFC70ITA.DLL MFC70JPN.DLL MFC70KOR.DLL MFC70U.DLL MSVCI70.DLL MSVCP70.DLL MSVCR70.DLL

New, updated CL.EXE compiler command line:

/clr[:noAssembly] compile for the common language runtime
    noAssembly - do not produce an assembly
/G6 optimize for PPro, P-II, P-III
/GT generate fiber-safe TLS accesses
/GL[-] enable link-time code generation
/QIfist[-] use FIST instead of ftol()
/RTC1 Enable fast checks (/RTCsu)
/RTCc Convert to smaller type checks
/RTCs Stack Frame runtime checking
/RTCu Uninitialized local usage checks
/AI add to assembly search path
/FU forced using assembly/module
/Fx merge injected code to file
/Zc:arg1[,arg2] C++ language conformance, where arguments can be:
    forScope - enforce Standard C++ for scoping rules
    wchar_t - wchar_t is the native type, not a typedef
/showIncludes show include file names
/wo issue warning n once
/Wall enable all warnings
/Wp64 enable 64 bit porting warnings
/Y- disable all PCH options

New, updated LINK.EXE linker command line:

/ALLOWBIND[:NO]
/ASSEMBLYMODULE:filename
/ASSEMBLYRESOURCE:filename
removed /COMMENT:comment
removed /DEBUGTYPE:{CV|COFF}
removed /GPSIZE:#
/IDLOUT:filename
/IGNOREIDL
/LTCG[:{NOSTATUS|PGINSTRUMENT|PGOPTIMIZE|STATUS}]
     (PGINSTRUMENT and PGOPTIMIZE are only available for IA64)
/MIDL:@commandfile
/NOASSEMBLY
/PDBSTRIPPED:filename
/PGD:filename
/TLBOUT:filename
/TLBID:#
removed /WARN[:warninglevel]

Visual C/C++ 7.1, Visual Studio .NET (_MSC_VER = 1301), 2003

C/C++ Runtime - VC_R_7X.EXE, shipped with NetFX 1.0 Runtime:
ATL71A.DLL ATL71U.DLL MFC71.DLL MFC71CHS.DLL MFC71CHT.DLL MFC71DEU.DLL MFC71ENU.DLL MFC71ESP.DLL MFC71FRA.DLL MFC71ITA.DLL MFC71JPN.DLL MFC71KOR.DLL MFC71U.DLL MSVCP71.DLL MSVCR71.DLL

New, updated CL.EXE compiler command line:

/G7 optimize for Pentium 4 or Athlon
/arch: minimum CPU architecture requirements, one of:
    SSE - enable use of instructions available with SSE enabled CPUs
    SSE2 - enable use of instructions available with SSE2 enabled CPUs
/nox87copy - favor integer moves over x87 loads
removed /noBool disable "bool" keyword

New, updated LINK.EXE linker command line:

/ASSEMBLYDEBUG[:DISABLE]
/ASSEMBLYLINKRESOURCE:filename
/DELAYSIGN[:NO]
/KEYFILE:filename
/KEYCONTAINER:name
/SAFESEH[:NO]
/VERBOSE[:{LIB|SAFESEH}]
removed /fixed:no from #pragma (linker,"")

Visual C/C++ 8.0, Visual Studio 2005 (_MSC_VER = 1400)

C/C++ Runtime - vcredist_x86.exe, vcredist_x64.exe:
mfc80.dll mfc80u.dll mfcm80.dll mfcm80u.dll msvcm80.dll msvcp80.dll msvcr80.dll

New, updated CL.EXE compiler command line:

clr[:option] compile for common language runtime, where option is:
    pure - produce IL-only output file (no native executable code)
    safe - produce IL-only verifiable output file
    oldSyntax - accept the Managed Extensions syntax from Visual C++ 2002/2003
    initialAppDomain - enable initial AppDomain behavior of Visual C++ 2002
    noAssembly - do not produce an assembly
/doc[file] process XML documentation comments and optionally name the .xdc file
/fp: choose floating-point model:
    except[-] - consider floating-point exceptions when generating code
    fast - "fast" floating-point model; results are less predictable
    precise - "precise" floating-point model; results are predictable
    strict - "strict" floating-point model (implies /fp:except)
/MP[n] use up to 'n' processes for compilation - UNDOCUMENTED, USE AT YOUR OWN RISK!
removed /Oa assume no aliasing 
/Op[-] improve floating-pt consistency
/Ow assume cross-function aliasing
removed /G3 optimize for 80386
removed /G4 optimize for 80486
removed /G5 optimize for Pentium
removed /G6 optimize for PPro, P-II, P-III
removed /G7 optimize for Pentium 4 or Athlon
removed /GB optimize for blended model (default)
/hotpatch ensure function padding for hotpatchable images
removed /nox87copy - favor integer moves over x87 loads
/openmp enable OpenMP 2.0 language extensions
/bigobj generate extended object format
/errorReport:option Report internal compiler errors to Microsoft
    none - do not send report                
    prompt - prompt to immediately send report
    queue - at next admin logon, prompt to send report (default)
    send - send report automatically         
/FC use full pathnames in diagnostics
/LN Create a .netmodule
removed /ML link with LIBC.LIB
removed /MLd link with LIBCD.LIB debug lib
/analyze[:WX-] enable code analysis     
    WX- - code analysis warnings should not be treated as errors even if /WX is invoked

New, updated LINK.EXE linker command line:

/ALLOWISOLATION[:NO]
/CLRIMAGETYPE:{IJW|PURE|SAFE}
/CLRSUPPORTLASTERROR[:{NO|SYSTEMDLL}]
/CLRTHREADATTRIBUTE:{STA|MTA|NONE}
/CLRUNMANAGEDCODECHECK[:NO]
/ERRORREPORT:{NONE|PROMPT|QUEUE|SEND}
removed /EXETYPE:DYNAMIC
/FUNCTIONPADMIN[:size]
/MANIFEST[:NO]
/MANIFESTDEPENDENCY:manifest dependency
/MANIFESTFILE:filename
/NXCOMPAT[:NO]
/PROFILE
/TLBID:#
/WX[:NO]

Visual C/C++ 9.0, Visual Studio 2008 (_MSC_VER = 1500)

C/C++ Runtime - vcredist_x86.exe, vcredist_x64.exe:
atl90.dll mfc90.dll mfc90chs.dll mfc90cht.dll mfc90deu.dll mfc90enu.dll mfc90esn.dll mfc90esp.dll mfc90fra.dll mfc90ita.dll mfc90jpn.dll mfc90kor.dll mfc90rus.dll mfc90u.dll mfcm90.dll mfcm90u.dll msvcm90.dll msvcp90.dll msvcr90.dll vcomp.dll

New, updated CL.EXE compiler command line:

/Qfast_transcendentals generate inline FP intrinsics even with /fp:except
/Qimprecise_fwaits generate FWAITs only on "try" boundaries, not inside "try"
/Qsafe_fp_loads generate safe FP loads
/MP[n] use up to 'n' processes for compilation

New, updated LINK.EXE linker command line:

/DYNAMICBASE[:NO]
/MANIFESTUAC[:{NO|UAC fragment}]

Visual C/C++ 10.0, Visual Studio 2010 (_MSC_VER = 1600)

C/C++ Runtime - vcredist_x86.exe, vcredist_x64.exe:
atl100.dll mfc100.dll mfc100chs.dll mfc100cht.dll mfc100deu.dll mfc100enu.dll mfc100esn.dll mfc100fra.dll mfc100ita.dll mfc100jpn.dll mfc100kor.dll mfc100rus.dll mfc100u.dll mfcm100.dll mfcm100u.dll msvcp100.dll msvcr100.dll vcomp100.dll

New, updated CL.EXE compiler command line:

/arch: minimum CPU architecture requirements, one of:
    SSE - enable use of instructions available with SSE enabled CPUs
    SSE2 - enable use of instructions available with SSE2 enabled CPUs
    AVX - enable use of Intel(R) Advanced Vector Extensions instructions
/Fi[file] name preprocessed file
/Zc:arg1[,arg2] C++ language conformance, where arguments can be:
    forScope[-] - enforce Standard C++ for scoping rules
    wchar_t[-] - wchar_t is the native type, not a typedef
    auto[-] - enforce the new Standard C++ meaning for auto
    trigraphs[-] - enable trigraphs (off by default)

New, updated LINK.EXE linker command line:

/CLRLOADEROPTIMIZATION:{SD|MD|MDH|NONE}

dynamic link: too many unresolved imports in msvcr100.dll:

DecodePointer
EncodePointer
InitializeSListHead
InterlockedFlushSList
InterlockedPopEntrySList
InterlockedPushEntrySList
QueryDepthSList
HeapQueryInformation
CreateTimerQueue
CreateTimerQueueTimer
DeleteTimerQueueTimer
If you wish to use standard static libraries instead of dynamic CRTDLL.LIB in Windows 2000 you face two problems : unresolved external HeapSetInformation:KERNEL32 - install Update Rollup 1 for Windows 2000 SP4 (KB891861) ; Windows 2000 KERNEL32.DLL does not contain EncodePointer, DecodePointer functions, you must assemble an additional obj file using MASM from this code:
.model flat

.data
__imp__EncodePointer@4 dd dummy
__imp__DecodePointer@4 dd dummy
EXTERNDEF __imp__EncodePointer@4 : DWORD
EXTERNDEF __imp__DecodePointer@4 : DWORD

.code
dummy proc
mov eax, [esp+4]
ret 4
dummy endp

end
And link it within your program.

Two Ted's Blog articles How to get Visual C++ 2010 MFC applications to run on Windows 2000
New redists break all dynamically linked MFC 2005/2008 apps on Windows 2000

Visual C/C++ 11.0, Visual Studio 2012 (_MSC_VER = 1700)

C/C++ Runtime - vcredist_x86.exe, vcredist_x64.exe:
atl110.dll mfc110.dll mfc110chs.dll mfc110cht.dll mfc110deu.dll mfc110enu.dll mfc110esn.dll mfc110fra.dll mfc110ita.dll mfc110jpn.dll mfc110kor.dll mfc110rus.dll mfc110u.dll mfcm110.dll mfcm110u.dll msvcp110.dll msvcr110.dll vcamp110.dll vccorlib110.dll vcomp110.dll

New, updated CL.EXE compiler command line:

/favor: select processor to optimize for, one of:
    blend - a combination of optimizations for several different x86 processors
    ATOM - Intel(R) Atom(TM) processors 
/Qpar[-] enable parallel code generation
/Qpar-report:1 auto-parallelizer diagnostic; indicate parallelized loops
/Qpar-report:2 auto-parallelizer diagnostic; indicate loops not parallelized
/Qvec-report:1 auto-vectorizer diagnostic; indicate vectorized loops
/Qvec-report:2 auto-vectorizer diagnostic; indicate loops not vectorized
/GL[-] enable link-time code generation 
/volatile: choose volatile model:
    iso - Acquire/release semantics not guaranteed on volatile accesses
    ms  - Acquire/release semantics guaranteed on volatile accesses
/clr[:option] compile for common language runtime, where option is:
    nostdlib - ignore the default \clr directory
/arch: minimum CPU architecture requirements, one of:
   IA32 - use no enhanced instructions and use x87 for floating point
/ZW enable WinRT language extensions
/sdl enable additional security features and warnings

New, updated LINK.EXE linker command line:

removed /APPCONTAINER[:NO]
/CLRIMAGETYPE:{IJW|PURE|SAFE}
/CLRLOADEROPTIMIZATION:{SD|MD|MDH|NONE}
/CLRTHREADATTRIBUTE:{STA|MTA|NONE}
removed /HIGHENTROPYVA[:NO]
removed /INTEGRITYCHECK
removed /KERNEL
/MACHINE:{ARM|EBC|IA64|MIPS|MIPS16|MIPSFPU|MIPSFPU16|
    SH4|THUMB|X64|X86}
/MANIFEST[:NO]
removed /POGOSAFEMODE
/SUBSYSTEM:{BOOT_APPLICATION|CONSOLE|EFI_APPLICATION|
EFI_BOOT_SERVICE_DRIVER|EFI_ROM|EFI_RUNTIME_DRIVER|
NATIVE|POSIX|WINDOWS|WINDOWSCE}[,#[.##]]
/VERBOSE[:{ICF|LIB|REF|SAFESEH}]
removed /WINMD[:{NO|ONLY}]
removed /WINMDDELAYSIGN[:NO]
removed /WINMDFILE:filename
removed /WINMDKEYCONTAINER:name
removed /WINMDKEYFILE:filename

dynamic link: too many unresolved imports in msvcr110.dll:

CloseThreadpoolTimer
CloseThreadpoolWait
CompareStringEx
CreateSemaphoreExW
CreateThreadpoolTimer
CreateThreadpoolWait
DecodePointer - Windows 2000 only
EncodePointer - Windows 2000 only
EnumSystemLocalesEx
FlsAlloc
FlsFree
FlsGetValue
FlsSetValue
FlushProcessWriteBuffers
FreeLibraryWhenCallbackReturns - Windows 2000 only
GetCurrentProcessorNumber
GetDateFormatEx
GetLocaleInfoEx
GetLogicalProcessorInformation - Windows 2000 only
GetModuleHandleExW - Windows 2000 only
GetNumaHighestNodeNumber - Windows 2000 only
GetTickCount64
GetTimeFormatEx
GetUserDefaultLocaleName
InitOnceExecuteOnce
InitializeSListHead - Windows 2000 only
InterlockedFlushSList - Windows 2000 only
InterlockedPopEntrySList - Windows 2000 only
InterlockedPushEntrySList - Windows 2000 only
IsValidLocaleName
LCMapStringEx
QueryDepthSList - Windows 2000 only
SetThreadStackGuarantee
SetThreadpoolTimer
SetThreadpoolWait
WaitForThreadpoolTimerCallbacks
If you wish to use standard static libraries instead of dynamic CRTDLL.LIB in Windows 2000/XP/2003 you face many problems : too many unresolved externals - use Ted's Blog article How to get Visual C++ 2012 (VC 11 Beta) statically linked CRT and MFC applications to run on Windows XP
Windows 2000 KERNEL32.DLL does not contain EncodePointer, DecodePointer functions, you must assemble an additional obj file using MASM from this code:
.model flat

.data
__imp__EncodePointer@4 dd dummy
__imp__DecodePointer@4 dd dummy
EXTERNDEF __imp__EncodePointer@4 : DWORD
EXTERNDEF __imp__DecodePointer@4 : DWORD

.code
dummy proc
mov eax, [esp+4]
ret 4
dummy endp

end
And link it within your program.

Visual C/C++ 12.0, Visual Studio 2013 (_MSC_VER = 1800)

C/C++ Runtime - vcredist_x86.exe, vcredist_x64.exe:
...MSVCR120.DLL...

New, updated CL.EXE compiler command line:

to be continued...

New, updated LINK.EXE linker command line:

to be continued...
* static link: to be continued...
* dynamic link: to be continued...

II. HOW-TO: Making portable, USB installation


Here are some steps to made a portable MSVS installation:
  1. Preface: Before making a portable installation we need to perform one time full installation of MSVS, to collect needed files and convert this installation to portable one. We cannot apply official (i. e. Microsoft-made) updates to this modified, portable installation! So we need to apply any service packs, updates to MSVS and VC redistributable files BEFORE we can construct a portable installation. Note that this installation will be no time limited regardless of trial period!

    Main negative cost of such installation that we cannot use included GUI features, such as IDE, debugger, additional tools and so on.

    It will be smaller ("lighter"), than traditional installation, f.e.:
    Portable MSVC 2.0 (1995) x86 ~about 128 Mb
    Portable MSVC 4.0 (1995) x86 with IDE Shell ~about 140 Mb
    Portable MSVC 4.1b (1996) x86 with IDE Shell ~about 138 Mb
    Portable MSVC 4.2b (1996) x86 with IDE Shell ~about 174 Mb
    Portable MSVS 5.0 (1997) x86 SP3 with IDE Shell ~about 180 Mb
    Portable MSVS 6.0 (1998) x86 SP5 with Windows SDK, DirectX SDK ~about 213 Mb
    Portable MSVS .NET/2002 x86 with Windows SDK ~about 300 Mb
    Portable MSVS .NET/2003 x86 with Windows SDK ~about 330 Mb
    Portable MSVS 2005 x86/amd64/ia64 with Windows SDK ~about 518 Mb
    Portable MSVS 2008 x86/amd64 with Windows SDK ~about 1405 Mb
    Portable MSVS 2010 x86/amd64 with Windows SDK ~about 1679 Mb
    Portable MSVS 2012 x86/amd64 with Windows SDK ~about 1927 Mb
    

    In compressed archive portable installation size will be about TEN TIMES smaller.

    To build your project you can use:

    You can use great alternative linker - UniLink, get ulnbXXXX.zip here ftp://ftp.styx.cabel.net/pub/UniLink/, history and help:

    ftp://ftp.styx.cabel.net/pub/UniLink/history_en.txt
    ftp://ftp.styx.cabel.net/pub/UniLink/history_ru.txt
    ftp://ftp.styx.cabel.net/pub/UniLink/ulhlp_en.zip
    ftp://ftp.styx.cabel.net/pub/UniLink/ulhlp_ru.zip
    

    UniLink is command-line tool that combine object modules, library modules and resources to produce executable files. UniLink allows to create 16x, 32o and 64o-bit executable modules meant for x86/AMD64 CPU family and dos/win-clone OS'es.

    UniLink supports OBJ's and LIB's formats almost all modern compilers (running on above-mentioned platforms), inclusive of their features.

    Supported compiler and rtl     
    --------------------------------------------------------------------------------
    Borland: bcc (v3.1 - v5.x), bcc32 (v5.0 - v7.x), bds (v4 - v7) 
    Microsoft: msc (v5.0 - v7.x), msvc (v4.0 - v10) 
    GCC (cygwin/mingw): v3.0 or higher 
    Intel: icl (v6 or higher). For versions 4/5 trivial modules also linked 
    Digital Mars: dm v8.1 or higher (below version not tested). 
    Watcom: wc10 (16bit and 32bit mode. Extenders are not supported) 
                                        Asm
    Microsoft: masm (v4 or higher), ml (v6 or higher) 
    Borland: tasm/tasm32 (v3.0 - v5.x) 
    
    Mixed mode     
    --------------------------------------------------------------------------------
    'Mixed' linking - with using of modules compiled with diverse compilers - is acceptable. 
    However, during the using more than one RTL  concurrently you should fully appreciate 
    what are you doing
    Contacts     
    
    --------------------------------------------------------------------------------
    UniLink on the web and other internet resources.
    
    To subscribe on the newsletter send a mail to
                updater@styx.cabel.net  
    with subject 
                SUBSCRIBE unilink-beta
    and empty body (text) field.
    
    N.B. Newsletter includes related products announcements, like DosWin32.
    
    Bug-reports:
    
    Send reports to ulink@styx.cabel.net
    
    Bug description has to include 3 necessarily things:
    1.   Reproducibility (singe-shot isn't bug)
    2.   Type and version OS the bug appears
    3.   Compiler(s) generated buggy OBJ's (and LIB's)
         A few words about bug itself 
    
    
    If bug is reproductive (and this is not grammatical or lexical mistake in the diagnostic message), 
    it is desirable to keep the very OBJ's-set for a while,
    - if bug reproduce will not be succeed, 
    it would very kindly to pack this set (don't forget about RSP) 
    and send the archive (if achieve is no very large) to:
                ulink@styx.cabel.net
    or upload it to
                ftp://ftp.styx.cabel.net/pub/UniLink/uploads/
    don't forget about rsp.
    
    N.B. "features requests" is acceptable, but without any guarantees to take them up, 
    meanwhile, bug reports are welcome, always.
    

    After making such portable installation, we can remove "static" installation without problems and work using our new portable installation.

  2. General overview: In most cases only three directories are needed:

    Also we need to create a command file (BAT/CMD) or modify system/current user variables to perform proper compiler initialization:

    Example (MSVS 6.0, 1998) for static installation:
    @echo off
    cls
    set _NT_SYMBOL_PATH=symsrv*symsrv.dll*c:\Symbols*http://msdl.microsoft.com/download/symbols
    set DDKDRIVE=F:
    set MSDevDir=..\Microsoft Visual Studio\Common\MSDev98
    set MSTOOLS=R:\VS1998
    set MSVCBASE=R:\VS1998
    set MSSDK=R:\VSPSDK\2003
    set PATH=%MSVCBASE%\bin;%MSVCBASE%\debug;%PATH%
    set INCLUDE=%MSSDK%\include;%MSVCBASE%\dx8\include;%MSVCBASE%\inc;%MSVCBASE%\mfc\include
    set LIB=%MSSDK%\lib;%MSVCBASE%\dx8\lib;%MSVCBASE%\lib;%MSVCBASE%\mfc\lib
    set PREFAST_ROOT=R:\VS2003T\bin\x86\prefast
    set PATH=%PREFAST_ROOT%\scripts;%PATH%
    
    As we see, f.e. here (MSDN Environment Setup) separate INCLUDE, LIB directories may exist for:
    Windows ATL, MFC support
    Windows SDK, DDK, WDK
    Directx/XNA SDK, DDK
    any other :)
    
    In most cases these libraries must stay BEFORE base libraries in INCLUDE variable, except for DirectX SDK, which may stay after.

    And we need to copy redistributable DLL files (such as crtdll.dll, msvc*.dll, atl*.dll, mfc*.dll, vcomp*.dll, PDBs and others to Windows system directory (mostly WINDOWS\SYSTEM32) or to any other directory listed in PATH)

  3. Constructing directories If you wish to add automatic Far Manager start add these line at the end of the cmd/bat file.
    call %VCDRIVE%:\FAR\FAR.EXE %VCDRIVE%:\WORK
    exit
    
    So Far Manager will start and open %VCDRIVE%:\WORK with your working set of files.

Debugging Tools Compatibility (cdb, windbg, i386kd, etc.) with Windows NT 4.0, Windows 2000


  1. dbg_x86_6.5.3.8.exe (July 2005) - correctly debugs NT4 under NT4/W2K/XP
  2. dbg_x86_6.6.03.5.exe (Jan 2006) - debugs NT4 under NT4/W2K/XP with some errors (ext.dll)
  3. dbg_x86_6.6.07.5.exe (July 2006) - UNcorrectly debugs NT4 under NT4/W2K/XP - error 'unable to get program counter' -> leave
  4. dbg_x86_6.7.05.0.exe (Apr 2007) - see above, same as 6.6.7.5
  5. dbg_x86_6.7.05.1.exe (June 2007) - see above, same as 6.6.7.5
  6. dbg_x86_6.8.4.0.msi (Sept 2007) - see above, same as 6.6.7.5
  7. dbg_x86_6.9.3.113.msi (Apr 2008) - see above, same as 6.6.7.5, it claimes as last THAT INSTALLS onto NT4 x86 guest/host but last is dbg_x86_6.8.4.0.msi (Sept 2007) (however unresloved in wdfkd.dll, needs patching OSVER for W2K host)
  8. dbg_x86_6.11.1.404.msi (Feb 2009) - latest for W2K x86 guest/host

Separately available versions, most of them are here msdl.microsoft.com/download/symbols/debuggers/


E-Mail: bearwindows_at_operamail_dot_com | Last update: December 1st 2013