diff --git a/CompatLib/CompatLib.vcxproj b/CompatLib/CompatLib.vcxproj
index fd0f557..9cb9a3b 100644
--- a/CompatLib/CompatLib.vcxproj
+++ b/CompatLib/CompatLib.vcxproj
@@ -62,13 +62,13 @@
false
$(ProjectDir)\lib\
$(ProjectDir)\obj\$(Configuration)\$(Platform)\
- libcompat-x86
+ libcompat-$(PlatformToolset)-$(PlatformTarget)
false
$(ProjectDir)\lib\
$(ProjectDir)\obj\$(Configuration)\$(Platform)\
- libcompat-x64
+ libcompat-$(PlatformToolset)-$(PlatformTarget)
diff --git a/Example/Example.vcxproj b/Example/Example.vcxproj
index 42b053c..1b78193 100644
--- a/Example/Example.vcxproj
+++ b/Example/Example.vcxproj
@@ -80,7 +80,7 @@
false
5.1
UseLinkTimeCodeGeneration
- libcompat-x86.lib;%(AdditionalDependencies)
+ libcompat-$(PlatformToolset)-$(PlatformTarget).lib
$(SolutionDir)\CompatLib\lib
@@ -104,7 +104,7 @@
false
5.2
UseLinkTimeCodeGeneration
- libcompat-x64.lib;%(AdditionalDependencies)
+ libcompat-$(PlatformToolset)-$(PlatformTarget).lib
$(SolutionDir)\CompatLib\lib
diff --git a/Example/src/main.cpp b/Example/src/main.cpp
index 8a511e9..6c8ea8a 100644
--- a/Example/src/main.cpp
+++ b/Example/src/main.cpp
@@ -13,5 +13,5 @@
int main()
{
- std::cout << "Hello World! [" << ARCH_TYPE << "]" << std::endl;
+ std::cout << "Hello World! [MSVC v" << _MSC_VER << "] [" << ARCH_TYPE << "]\n" << std::endl;
}
diff --git a/make.cmd b/make.cmd
new file mode 100644
index 0000000..37b76df
--- /dev/null
+++ b/make.cmd
@@ -0,0 +1,33 @@
+@echo off
+setlocal enabledelayedexpansion
+cd /d "%~dp0"
+
+if "%MSVC_PATH%"=="" (
+ set "MSVC_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC"
+)
+
+if not exist "%MSVC_PATH%\Auxiliary\Build\vcvarsall.bat" (
+ echo MSVC not found. Please check your MSVC_PATH and try again^^!
+ pause
+ goto:eof
+)
+
+for %%p in (x86,x64) do (
+ call "%MSVC_PATH%\Auxiliary\Build\vcvarsall.bat" %%p
+ for %%t in (Clean,Rebuild,Build) do (
+ MSBuild.exe /property:Configuration=Release /property:Platform=%%p /target:%%t /verbosity:normal "%CD%\CompatLib.sln"
+ if not "!ERRORLEVEL!"=="0" goto:BuildFailed
+ )
+)
+
+echo.
+echo Build completed successfully.
+echo.
+pause
+goto:eof
+
+:BuildFailed
+echo.
+echo Build has failed ^^!^^!^^!
+echo.
+pause