Fix ColorChord on Windows10 32-bit TinyCC Compilation.

This commit is contained in:
CNLohr 2018-12-16 01:21:05 -05:00
parent 0b2e686d55
commit 9c3e841771
11 changed files with 74 additions and 21 deletions

View file

@ -1,8 +1,11 @@
@echo off
echo Unzip https://download.savannah.gnu.org/releases/tinycc/tcc-0.9.26-win64-bin.zip to C:\tcc
echo Unzip http://download.savannah.gnu.org/releases/tinycc/tcc-0.9.27-win64-bin.zip to C:\tcc
echo Don't worry. It includes the i386 compiler in the win64 build.
set CFLAGS=-v -DHIDAPI -DWINDOWS -DWIN32 -DTCC -DRUNTIME_SYMNUM -Os -Itccinc -DINCLUDING_EMBEDDED -I.. -I. -I../../embeddedcommon -rdynamic -g
set LDFLAGS=-lkernel32 -lgdi32 -luser32 -lsetupapi -ldbghelp -ltcc1 -lwinmm -lws2_32
set LDFLAGS=-lkernel32 -lgdi32 -luser32 -lsetupapi -ldbghelp -lws2_32
set SOURCES=..\chash.c ..\color.c ..\configs.c ..\decompose.c ..\dft.c ..\DisplayNetwork.c ..\DisplayArray.c ..\DisplayHIDAPI.c ..\DisplayOUTDriver.c ..\DisplayPie.c ..\DrawFunctions.c ..\filter.c ..\hidapi.c ..\hook.c ..\main.c ..\os_generic.c ..\outdrivers.c ..\OutputCells.c ..\OutputLinear.c ..\OutputProminent.c ..\OutputVoronoi.c ..\parameters.c ..\sound.c ..\sound_win.c ..\sound_null.c ..\util.c ..\WinDriver.c ..\notefinder.c ..\..\embeddedcommon\DFT32.c tcc_stubs.c symbol_enumerator.c
set ARCH_SPECIFIC=-L32
set ARCH_SPECIFIC=-L32 C:\windows\system32\winmm.dll
set CC=C:\tcc\i386-win32-tcc.exe
rem set CC=C:\tcc\x86_64-win32-tcc.exe
@echo on
C:\tcc\tcc %CFLAGS% %ARCH_SPECIFIC% %SOURCES% %LDFLAGS% -o ..\colorchord.exe
%CC% %CFLAGS% %ARCH_SPECIFIC% %SOURCES% %LDFLAGS% -o ..\colorchord.exe

View file

@ -0,0 +1,3 @@
cd ..
colorchord
cd windows

View file

@ -1,7 +1,12 @@
#include <string.h>
#include <_mingw.h>
#include <tcclib.h>
#include "symbol_enumerator.h"
#define REMATH(x) double __cdecl x( double f ); float x##f(float v) { return x(v); }
_CRTIMP int __cdecl _vscprintf(const char *_Format,va_list _ArgList);
#define REMATH(x) double __cdecl x( double f ); float x##f(float v) { return x(v); }
#define REMATH2(x) double __cdecl x( double f, double g ); float x##f(float v, float w) { return x(v,w); }
int SymnumCheck( const char * path, const char * name, void * location, long size )
{
@ -27,8 +32,8 @@ REMATH( sin );
REMATH( sqrt );
REMATH( asin );
REMATH( exp );
REMATH( fmod );
REMATH( pow );
REMATH2( fmod );
REMATH2( pow );
double __cdecl strtod (const char* str, char** endptr);
float strtof( const char* str, char** endptr)