C/C++ Runtime (CRTDLL.DLL, etc.) shipped with Windows 3.1(Win32s), NT 3.1 and later
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 /Obinline 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
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
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 /Zmmax 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
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]
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 /AIadd 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]
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,"")
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]
#define COMPILE_NEWAPIS_STUBS #define WANT_GETDISKFREESPACEEX_WRAPPER // wrap for GetDiskFreeSpaceEx #define WANT_GETLONGPATHNAME_WRAPPER // wrap for GetLongPathName #define WANT_GETFILEATTRIBUTESEX_WRAPPER // wrap for GetFileAttributesEx #define WANT_ISDEBUGGERPRESENT_WRAPPER // wrap for wrap for IsDebuggerPresent #include <NewAPIs.h>
libcmt*.lib msvcrt*.lib msvcrt_win2000.obj msvcrt_winxp.obj msvcrt_win2003.obj
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}]
libcmt*.lib msvcrt*.lib msvcrt_win2000.obj msvcrt_winxp.obj msvcrt_win2003.obj
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 DeleteTimerQueueTimerIf 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 endAnd 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
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
DecodePointer:KERNEL32 Windows 2000 only, fix below EncodePointer:KERNEL32 Windows 2000 only, fix below FlsAlloc:KERNEL32 Windows 2000/XP/2003 FlsFree:KERNEL32 Windows 2000/XP/2003 FlsGetValue:KERNEL32 Windows 2000/XP/2003 FlsSetValue:KERNEL32 Windows 2000/XP/2003 GetModuleHandleExW:KERNEL32 Windows 2000 only GetTickCount64:KERNEL32 Windows 2000/XP/2003 InitOnceExecuteOnce:KERNEL32 Windows 2000/XP/2003 LCMapStringEx:KERNEL32 Windows 2000/XP/2003, in NT4.0/3.51/95 - use CRTDLL.LIB.
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 WaitForThreadpoolTimerCallbacksIf 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
.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 endAnd link it within your program.
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...
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.
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:
@echo off cls cl.exe /nologo /MD /EHsc /W3 /D_NDEBUG /D_MBCS myprog.cpp link.exe /nologo myprog.obj gdi32.lib user32.lib kernel32.lib opengl32.lib /out:myprog.exe del *.obj
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.
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:
@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)
Directories tree
atl atl/include atl/lib bin include include/sys lib mfc mfc/include mfc/libMSVS 6.0 CMD/BAT-file (go_x86.bat), with separate SDK (dated 2003 or 2006 year) and DirectX8 SDK
@echo off cls for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\VS1998\go_x86.bat SET VCDRIVE=%%i set MSVCBASE=%VCDRIVE%:\VS1998 set MSSDK=%VCDRIVE%:\VSPSDK\2003 set PATH=%MSVCBASE%\bin;%MSVCBASE%\debug;%PATH% set INCLUDE=%MSSDK%\include;%MSVCBASE%\dx8\include;%MSVCBASE%\inc;%MSVCBASE%\atl\include;%MSVCBASE%\mfc\include set LIB=%MSSDK%\lib;%MSVCBASE%\dx8\lib;%MSVCBASE%\lib;%MSVCBASE%\atl\lib;%MSVCBASE%\mfc\lib
Directories tree
atlmfc atlmfc/include atlmfc/lib bin include include/sys lib PSDK PSDK/bin PSDK/include PSDK/libCMD/BAT-file (go_x86.bat)
@echo off for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\VSNET\go_x86.bat SET VCDRIVE=%%i set VCINSTALLDIR=%VCDRIVE%:\VSNET set PATH=%VCINSTALLDIR%\bin;%PATH% set INCLUDE=%VCINSTALLDIR%\PSDK\include;%VCINSTALLDIR%\INCLUDE;%VCINSTALLDIR%\ATLMFC\INCLUDE set LIB=%VCINSTALLDIR%\PSDK\lib;%VCINSTALLDIR%\LIB;%VCINSTALLDIR%\ATLMFC\LIB
MSVS 2005 (MSVC 8.0)
Directories tree
atlmfc atlmfc/include atlmfc/lib atlmfc/lib/amd64 atlmfc/lib/ia64 bin bin/1033 bin/amd64 bin/ia64 bin/x86_amd64 bin/x86_ia64 include include/sys lib lib/amd64 lib/ia64 PSDK PSDK/Bin PSDK/Bin/win64 PSDK/Include PSDK/Lib PSDK/Lib/amd64 PSDK/Lib/ia64CMD/BAT-file (go_x86.bat)
@echo off cls for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\VS2005\vcvarsall.bat SET VCDRIVE=%%i set VCINSTALLDIR=%VCDRIVE%:\VS2005 set PATH=%VCINSTALLDIR%\BIN;%VCINSTALLDIR%\PSDK\bin;%PATH% set INCLUDE=%VCINSTALLDIR%\ATLMFC\INCLUDE;%VCINSTALLDIR%\INCLUDE;%VCINSTALLDIR%\PSDK\include;%VCINSTALLDIR%\DX_SDK\include;%INCLUDE% set LIB=%VCINSTALLDIR%\ATLMFC\LIB;%VCINSTALLDIR%\LIB;%VCINSTALLDIR%\PSDK\lib;%VCINSTALLDIR%\DX_SDK\Lib\x86;%LIB% set LIBPATH=%VCINSTALLDIR%\ATLMFC\LIB;%LIBPATH%CMD/BAT-file (go_x64_x86.bat) - crosscompile x64 binaries on x86 platform
@echo off cls for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\VS2005\vcvarsall.bat SET VCDRIVE=%%i set VCINSTALLDIR=%VCDRIVE%:\VS2005 set PATH=%VCINSTALLDIR%\BIN\x86_amd64;%VCINSTALLDIR%\BIN;%VCINSTALLDIR%\PSDK\bin;%PATH% set INCLUDE=%VCINSTALLDIR%\ATLMFC\INCLUDE;%VCINSTALLDIR%\INCLUDE;%VCINSTALLDIR%\PSDK\include;%VCINSTALLDIR%\DX_SDK\include;%INCLUDE% set LIB=%VCINSTALLDIR%\ATLMFC\LIB\amd64;%VCINSTALLDIR%\LIB\amd64;%VCINSTALLDIR%\PSDK\lib\amd64;%VCINSTALLDIR%\DX_SDK\Lib\x64;%LIB% set LIBPATH=%VCINSTALLDIR%\ATLMFC\LIB\amd64;%LIBPATH%CMD/BAT-file (go_x64.bat)
@echo off cls for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\VS2005\vcvarsall.bat SET VCDRIVE=%%i set VCINSTALLDIR=%VCDRIVE%:\VS2005 set PATH=%VCINSTALLDIR%\BIN\amd64;%VCINSTALLDIR%\BIN;%VCINSTALLDIR%\PSDK\bin\win64\amd64;%VCINSTALLDIR%\PSDK\bin;%PATH% set INCLUDE=%VCINSTALLDIR%\ATLMFC\INCLUDE;%VCINSTALLDIR%\INCLUDE;%VCINSTALLDIR%\PSDK\include;%VCINSTALLDIR%\DX_SDK\include;%INCLUDE% set LIB=%VCINSTALLDIR%\ATLMFC\LIB\amd64;%VCINSTALLDIR%\LIB\amd64;%VCINSTALLDIR%\PSDK\lib\amd64;%VCINSTALLDIR%\DX_SDK\Lib\x64;%LIB% set LIBPATH=%VCINSTALLDIR%\ATLMFC\LIB\amd64;%LIBPATH%
MSVS 2008 (MSVC 9.0)
Directories tree
atlmfc atlmfc/include atlmfc/lib atlmfc/lib/amd64 bin bin/1033 bin/amd64 bin/ia64 bin/x86_amd64 bin/x86_ia64 include include/sys lib lib/amd64 lib/ia64 PSDK PSDK/v6.0A PSDK/v6.0A/Bin PSDK/v6.0A/Bin/win64 PSDK/v6.0A/Include PSDK/v6.0A/Lib PSDK/v6.0A/Lib/x64CMD/BAT-file (go_x86.bat)
@echo off for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\VS2008\vcvarsall.bat SET VCDRIVE=%%i SET MSSDK=%VCDRIVE%:\VS2008\psdk\v6.0A SET VCINSTALLDIR=%VCDRIVE%:\VS2008 set PATH=%VCINSTALLDIR%\BIN;%MSSDK%\bin;%path% SET INCLUDE=%MSSDK%\include;%VCINSTALLDIR%\INCLUDE;%VCINSTALLDIR%\ATLMFC\INCLUDE;%VCINSTALLDIR%\DX_SDK\Include SET LIB=%VCINSTALLDIR%\LIB;%VCINSTALLDIR%\ATLMFC\LIB;%MSSDK%\lib;%VCINSTALLDIR%\DX_SDK\Lib\x86CMD/BAT-file (go_x64_x86.bat) - crosscompile x64 binaries on x86 platform
@echo off for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\VS2008\vcvarsall.bat SET VCDRIVE=%%i SET MSSDK=%VCDRIVE%:\VS2008\psdk\v6.0A SET VCINSTALLDIR=%VCDRIVE%:\VS2008 set PATH=%VCINSTALLDIR%\bin\x86_amd64;%VCINSTALLDIR%\BIN;%MSSDK%\bin\x64;%MSSDK%\bin;%path% SET INCLUDE=%MSSDK%\include;%VCINSTALLDIR%\INCLUDE;%VCINSTALLDIR%\ATLMFC\INCLUDE;%VCINSTALLDIR%\DX_SDK\Include SET LIB=%VCINSTALLDIR%\LIB\amd64;%VCINSTALLDIR%\ATLMFC\LIB\amd64;%MSSDK%\lib\x64;%VCINSTALLDIR%\DX_SDK\Lib\x64CMD/BAT-file (go_x64.bat)
@echo off for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\VS2008\vcvarsall.bat SET VCDRIVE=%%i SET MSSDK=%VCDRIVE%:\VS2008\psdk\v6.0A SET VCINSTALLDIR=%VCDRIVE%:\VS2008 set PATH=%VCINSTALLDIR%\BIN\amd64;%MSSDK%\bin\x64;%MSSDK%\bin;%path% SET INCLUDE=%MSSDK%\include;%VCINSTALLDIR%\INCLUDE;%VCINSTALLDIR%\ATLMFC\INCLUDE;%VCINSTALLDIR%\DX_SDK\Include SET LIB=%VCINSTALLDIR%\LIB\amd64;%VCINSTALLDIR%\ATLMFC\LIB\amd64;%MSSDK%\lib\x64;%VCINSTALLDIR%\DX_SDK\Lib\x64
Directories tree
atlmfc atlmfc/include atlmfc/lib bin bin/1033 bin/amd64 bin/ia64 bin/x86_amd64 bin/x86_ia64 include include/sys lib lib/amd64 lib/ia64 PSDK PSDK/v7.0A PSDK/v7.0A/Bin PSDK/v7.0A/Bin/win64 PSDK/v7.0A/Include PSDK/v7.0A/LibCMD/BAT-file (go_x86.bat)
@echo off for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\VS2010\vcvarsall.bat SET VCDRIVE=%%i SET MSSDK=%VCDRIVE%:\VS2010\psdk\v7.0A SET VCINSTALLDIR=%VCDRIVE%:\VS2010 set PATH=%VCINSTALLDIR%\BIN;%MSSDK%\bin;%path% SET INCLUDE=%MSSDK%\include;%VCINSTALLDIR%\INCLUDE;%VCINSTALLDIR%\ATLMFC\INCLUDE SET LIB=%VCINSTALLDIR%\LIB;%VCINSTALLDIR%\ATLMFC\LIB;%MSSDK%\lib;%VCDRIVE%:\dx9sdk\Lib\x86CMD/BAT-file (go_x64_x86.bat) - crosscompile x64 binaries on x86 platform
@echo off for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\VS2010\vcvarsall.bat SET VCDRIVE=%%i SET MSSDK=%VCDRIVE%:\VS2010\psdk\v7.0A SET VCINSTALLDIR=%VCDRIVE%:\VS2010 set PATH=%VCINSTALLDIR%\bin\x86_amd64;%VCINSTALLDIR%\BIN;%MSSDK%\bin;%path% SET INCLUDE=%MSSDK%\include;%VCINSTALLDIR%\INCLUDE;%VCINSTALLDIR%\ATLMFC\INCLUDE SET LIB=%VCINSTALLDIR%\LIB\amd64;%VCINSTALLDIR%\ATLMFC\LIB\amd64;%MSSDK%\lib\x64;%VCDRIVE%:\dx9sdk\Lib\x64CMD/BAT-file (go_x64.bat)
@echo off for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\VS2010\vcvarsall.bat SET VCDRIVE=%%i SET MSSDK=%VCDRIVE%:\VS2010\psdk\v7.0A SET VCINSTALLDIR=%VCDRIVE%:\VS2010 set PATH=%VCINSTALLDIR%\BIN\amd64;%VCINSTALLDIR%\BIN;%MSSDK%\bin;%path% SET INCLUDE=%MSSDK%\include;%VCINSTALLDIR%\INCLUDE;%VCINSTALLDIR%\ATLMFC\INCLUDE SET LIB=%VCINSTALLDIR%\LIB\amd64;%VCINSTALLDIR%\ATLMFC\LIB\amd64;%MSSDK%\lib\x64;%VCDRIVE%:\DX9SDK\Lib\x64
Directories tree
atlmfc atlmfc/include atlmfc/lib bin bin/1033 bin/amd64 bin/ia64 bin/x86_amd64 include include/sys lib lib/amd64 PSDK PSDK/v8.0A PSDK/v8.0A/Bin PSDK/v8.0A/Bin/win64 PSDK/v8.0A/Include PSDK/v8.0A/Include/shared PSDK/v8.0A/Include/um PSDK/v8.0A/Lib PSDK/v8.0A/Lib/win8 PSDK/v8.0A/Lib/win8/um PSDK/v8.0A/Lib/win8/um/x64 PSDK/v8.0A/Lib/win8/um/x86CMD/BAT-file (go_x86.bat)
@echo off for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\VS2012\vcvarsall.bat SET VCDRIVE=%%i SET MSSDK=%VCDRIVE%:\VS2012\psdk\v8.0A SET VCINSTALLDIR=%VCDRIVE%:\VS2012 set PATH=%VCINSTALLDIR%\BIN;%MSSDK%\bin\x86;%path% SET INCLUDE=%MSSDK%\include\um;%MSSDK%\include\shared;%MSSDK%\include\shared;%VCINSTALLDIR%\INCLUDE;%VCINSTALLDIR%\ATLMFC\INCLUDE;%VCINSTALLDIR%\DX_SDK\Include SET LIB=%VCINSTALLDIR%\LIB;%VCINSTALLDIR%\ATLMFC\LIB;%MSSDK%\lib\win8\um\x86;%VCINSTALLDIR%\DX_SDK\Lib\x86CMD/BAT-file (go_x64_x86.bat) - crosscompile x64 binaries on x86 platform
@echo off for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\VS2012\vcvarsall.bat SET VCDRIVE=%%i SET MSSDK=%VCDRIVE%:\VS2012\psdk\v8.0A SET VCINSTALLDIR=%VCDRIVE%:\VS2012 set PATH=%VCINSTALLDIR%\bin\x86_amd64;%VCINSTALLDIR%\BIN;%MSSDK%\bin\x64;%MSSDK%\bin\x86;%path% SET INCLUDE=%MSSDK%\include\um;%MSSDK%\include\shared;%VCINSTALLDIR%\INCLUDE;%VCINSTALLDIR%\ATLMFC\INCLUDE;%VCINSTALLDIR%\DX_SDK\Include SET LIB=%VCINSTALLDIR%\LIB\amd64;%VCINSTALLDIR%\ATLMFC\LIB\amd64;%MSSDK%\lib\win8\um\x64;%VCINSTALLDIR%\DX_SDK\Lib\x64CMD/BAT-file (go_x64.bat)
@echo off for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\VS2012\vcvarsall.bat SET VCDRIVE=%%i SET MSSDK=%VCDRIVE%:\VS2012\psdk\v8.0A SET VCINSTALLDIR=%VCDRIVE%:\VS2012 set PATH=%VCINSTALLDIR%\BIN\amd64;%MSSDK%\bin\x64;%MSSDK%\bin\x86;%path% SET INCLUDE=%MSSDK%\include\um;%VCINSTALLDIR%\INCLUDE;%VCINSTALLDIR%\ATLMFC\INCLUDE;%VCINSTALLDIR%\DX_SDK\Include SET LIB=%VCINSTALLDIR%\LIB\amd64;%VCINSTALLDIR%\ATLMFC\LIB\amd64;%MSSDK%\lib\win8\um\x64;%VCINSTALLDIR%\DX_SDK\Lib\x64
call %VCDRIVE%:\FAR\FAR.EXE %VCDRIVE%:\WORK exitSo Far Manager will start and open %VCDRIVE%:\WORK with your working set of files.
Separately available versions, most of them are here msdl.microsoft.com/download/symbols/debuggers/