From deeec1b716acdfda0f11a5d06e4722aea9c4cf5f Mon Sep 17 00:00:00 2001 From: Sam Ellicott Date: Thu, 3 Jun 2021 00:08:49 -0400 Subject: [PATCH] Fix Windows build --- colorchord2/DisplayNetwork.c | 2 +- colorchord2/main.c | 2 -- colorchord2/windows/compile-clang.bat | 2 +- colorchord2/windows/compile.bat | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/colorchord2/DisplayNetwork.c b/colorchord2/DisplayNetwork.c index 67d21bc..798f77c 100644 --- a/colorchord2/DisplayNetwork.c +++ b/colorchord2/DisplayNetwork.c @@ -211,7 +211,7 @@ static void DPOUpdate(void * id, struct NoteFinder*nf) } } - int r = sendto( d->socket, buffer, i, MSG_NOSIGNAL,(const struct sockaddr *) &d->servaddr, sizeof( d->servaddr ) ); + int r = sendto( d->socket, (const char*) buffer, i, MSG_NOSIGNAL,(const struct sockaddr *) &d->servaddr, sizeof( d->servaddr ) ); if( r < 0 ) { fprintf( stderr, "Send fault.\n" ); diff --git a/colorchord2/main.c b/colorchord2/main.c index 57a41e2..66a0f9a 100644 --- a/colorchord2/main.c +++ b/colorchord2/main.c @@ -2,8 +2,6 @@ #if defined( WINDOWS ) || defined( USE_WINDOWS ) || defined( WIN32 ) || defined( WIN64 ) || \ defined( _WIN32 ) || defined( _WIN64 ) -#include -#include #ifndef strdup #define strdup _strdup #endif diff --git a/colorchord2/windows/compile-clang.bat b/colorchord2/windows/compile-clang.bat index 900ea1d..ca9c46a 100644 --- a/colorchord2/windows/compile-clang.bat +++ b/colorchord2/windows/compile-clang.bat @@ -3,7 +3,7 @@ set CC="C:\Program Files\LLVM\bin\clang.exe" rem To enable OpenGL rendering use the -DCNFGOGL option set CCFLAGS=-g -D_CRT_SECURE_NO_WARNINGS set CCIFLAGS=-I../../embeddedcommon -I../cnfa -I../rawdraw -I../ -O2 -set CCLFLAGS=-lwinmm -lgdi32 -lws2_32 -lsetupapi -lkernel32 -luser32 -ldbghelp -lole32 -lmmdevapi -lAvrt +set CCLFLAGS=-lwinmm -lgdi32 -lws2_32 -lsetupapi -lkernel32 -luser32 -ldbghelp -lole32 -lmmdevapi -lAvrt -lopengl32 set SOURCES=../main.c ../dft.c ../decompose.c ../filter.c ../color.c ../notefinder.c ../util.c ../outdrivers.c ^ ../parameters.c ../chash.c ../OutputVoronoi.c ../OutputProminent.c ../DisplayArray.c ^ ../OutputLinear.c ../DisplayPie.c ../DisplayNetwork.c ../hook.c ../RecorderPlugin.c ^ diff --git a/colorchord2/windows/compile.bat b/colorchord2/windows/compile.bat index f69e406..d9912be 100644 --- a/colorchord2/windows/compile.bat +++ b/colorchord2/windows/compile.bat @@ -3,7 +3,7 @@ echo Unzip http://download.savannah.gnu.org/releases/tinycc/tcc-0.9.27-win64-bin echo Also, if compiling with OpenGL, download http://download.savannah.nongnu.org/releases/tinycc/winapi-full-for-0.9.27.zip and overwrite the include, etc. folders in C:\tcc. echo Don't worry. It includes the i386 compiler in the win64 build. -set CFLAGS= -v -DHIDAPI -DWINDOWS -DWIN32 -DTCC -DRUNTIME_SYMNUM -O2 -Itccinc -DINCLUDING_EMBEDDED -rdynamic -g -DCNFGOGL +set CFLAGS= -v -DHIDAPI -DWINDOWS -DWIN32 -DTCC -DRUNTIME_SYMNUM -O2 -Itccinc -DINCLUDING_EMBEDDED -rdynamic -g set INCLUDES=-I../rawdraw -I../cnfa -I.. -I. -I../../embeddedcommon set LDFLAGS=-lkernel32 -lole32 -lgdi32 -luser32 -lsetupapi -ldbghelp -lws2_32 -lAvrt -lopengl32