diff --git a/tcc.h b/tcc.h index c8031f3..fbd320f 100644 --- a/tcc.h +++ b/tcc.h @@ -76,6 +76,13 @@ # define LIBTCCAPI __declspec(dllexport) # define PUB_FUNC LIBTCCAPI # endif +# ifdef _MSC_VER +# pragma warning (disable : 4244) // conversion from 'uint64_t' to 'int', possible loss of data +# pragma warning (disable : 4267) // conversion from 'size_t' to 'int', possible loss of data +# pragma warning (disable : 4996) // The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name +# pragma warning (disable : 4018) // signed/unsigned mismatch +# pragma warning (disable : 4146) // unary minus operator applied to unsigned type, result still unsigned +# endif #endif #ifndef O_BINARY diff --git a/win32/build-tcc.bat b/win32/build-tcc.bat index 7713e69..e5caf3b 100644 --- a/win32/build-tcc.bat +++ b/win32/build-tcc.bat @@ -63,10 +63,11 @@ tiny_libmaker lib/libtcc1.a libtcc1.o alloca86_64.o crt1.o wincrt1.o dllcrt1.o d del *.o :makedoc -where makeinfo > nul 2>&1 || goto :skip_makedoc +for /f "delims=" %%i in ('where makeinfo') do set minfo=perl "%%~i" +if "%minfo%"=="" goto :skip_makedoc echo>..\config.texi @set VERSION %VERSION% if not exist doc md doc -makeinfo --html --no-split -o doc\tcc-doc.html ../tcc-doc.texi +%minfo% --html --no-split -o doc\tcc-doc.html ../tcc-doc.texi copy tcc-win32.txt doc copy ..\tests\libtcc_test.c examples :skip_makedoc diff --git a/win32/vs2015/libtcc.vcxproj b/win32/vs2015/libtcc.vcxproj new file mode 100644 index 0000000..acb27a7 --- /dev/null +++ b/win32/vs2015/libtcc.vcxproj @@ -0,0 +1,162 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {41F2DA74-9707-49A3-A466-157C7028BD79} + Win32Proj + libtcc + 8.1 + + + + DynamicLibrary + true + v140 + MultiByte + + + DynamicLibrary + false + v140 + true + MultiByte + + + DynamicLibrary + true + v140 + MultiByte + + + DynamicLibrary + false + v140 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + + + Level3 + Disabled + ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_I386;WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + Windows + true + + + copy $(TargetPath) $(SolutionDir).. + + + + + + + Level3 + Disabled + ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_X86_64;_DEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + + + copy $(TargetPath) $(SolutionDir).. + + + + + Level3 + + + MaxSpeed + true + true + ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_I386;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + copy $(TargetPath) $(SolutionDir).. + + + + + Level3 + + + MaxSpeed + true + true + ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_X86_64;NDEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + copy $(TargetPath) $(SolutionDir).. + + + + + + + + + \ No newline at end of file diff --git a/win32/vs2015/tcc.sln b/win32/vs2015/tcc.sln new file mode 100644 index 0000000..9015cd0 --- /dev/null +++ b/win32/vs2015/tcc.sln @@ -0,0 +1,41 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25123.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcc", "tcc.vcxproj", "{6E7932A7-B123-48EB-AB39-40867AF28105}" + ProjectSection(ProjectDependencies) = postProject + {41F2DA74-9707-49A3-A466-157C7028BD79} = {41F2DA74-9707-49A3-A466-157C7028BD79} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtcc", "libtcc.vcxproj", "{41F2DA74-9707-49A3-A466-157C7028BD79}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6E7932A7-B123-48EB-AB39-40867AF28105}.Debug|x64.ActiveCfg = Debug|x64 + {6E7932A7-B123-48EB-AB39-40867AF28105}.Debug|x64.Build.0 = Debug|x64 + {6E7932A7-B123-48EB-AB39-40867AF28105}.Debug|x86.ActiveCfg = Debug|Win32 + {6E7932A7-B123-48EB-AB39-40867AF28105}.Debug|x86.Build.0 = Debug|Win32 + {6E7932A7-B123-48EB-AB39-40867AF28105}.Release|x64.ActiveCfg = Release|x64 + {6E7932A7-B123-48EB-AB39-40867AF28105}.Release|x64.Build.0 = Release|x64 + {6E7932A7-B123-48EB-AB39-40867AF28105}.Release|x86.ActiveCfg = Release|Win32 + {6E7932A7-B123-48EB-AB39-40867AF28105}.Release|x86.Build.0 = Release|Win32 + {41F2DA74-9707-49A3-A466-157C7028BD79}.Debug|x64.ActiveCfg = Debug|x64 + {41F2DA74-9707-49A3-A466-157C7028BD79}.Debug|x64.Build.0 = Debug|x64 + {41F2DA74-9707-49A3-A466-157C7028BD79}.Debug|x86.ActiveCfg = Debug|Win32 + {41F2DA74-9707-49A3-A466-157C7028BD79}.Debug|x86.Build.0 = Debug|Win32 + {41F2DA74-9707-49A3-A466-157C7028BD79}.Release|x64.ActiveCfg = Release|x64 + {41F2DA74-9707-49A3-A466-157C7028BD79}.Release|x64.Build.0 = Release|x64 + {41F2DA74-9707-49A3-A466-157C7028BD79}.Release|x86.ActiveCfg = Release|Win32 + {41F2DA74-9707-49A3-A466-157C7028BD79}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/win32/vs2015/tcc.vcxproj b/win32/vs2015/tcc.vcxproj new file mode 100644 index 0000000..3b4dc5c --- /dev/null +++ b/win32/vs2015/tcc.vcxproj @@ -0,0 +1,170 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {6E7932A7-B123-48EB-AB39-40867AF28105} + Win32Proj + tcc + 8.1 + + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + + + Level3 + Disabled + TCC_TARGET_PE;TCC_TARGET_I386;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + Debug + libtcc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + copy $(TargetPath) $(SolutionDir).. + + + + + + + Level3 + Disabled + TCC_TARGET_PE;TCC_TARGET_X86_64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + libtcc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + x64\Debug + + + copy $(TargetPath) $(SolutionDir).. + + + + + Level3 + + + MaxSpeed + true + true + TCC_TARGET_PE;TCC_TARGET_I386;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + Release + libtcc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + copy $(TargetPath) $(SolutionDir).. + + + + + Level3 + + + MaxSpeed + true + true + TCC_TARGET_PE;TCC_TARGET_X86_64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + libtcc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + x64\Release + + + copy $(TargetPath) $(SolutionDir).. + + + + + + + + + \ No newline at end of file