Fix Windows build

This commit is contained in:
Sam Ellicott 2021-06-03 00:08:49 -04:00
parent 27ed88b5de
commit deeec1b716
4 changed files with 3 additions and 5 deletions

View file

@ -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" );

View file

@ -2,8 +2,6 @@
#if defined( WINDOWS ) || defined( USE_WINDOWS ) || defined( WIN32 ) || defined( WIN64 ) || \
defined( _WIN32 ) || defined( _WIN64 )
#include <windows.h>
#include <winsock2.h>
#ifndef strdup
#define strdup _strdup
#endif

View file

@ -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 ^

View file

@ -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