Hi All,
I’m new to SDL. Coded a audio waveform generator using SDL on Debian 3.1r4
successfully on an i386 platform. Now attempting to port to Win2k using MinGW
without success. Need some guidance but I am not sure whether this is the
correct place I should post this question. If it isn’t, hope somebody could
guide me in some direction. If it is, could somebody help with the following?
COMPILE-------
$ gcc -I/local/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main -lmingw32 -L/local/l
ib -lSDLmain -lSDL -mwindows SDL_wave4.c -o SDL_wave4
Below are the error messages returned. The first 2 warnings are okay.
Subsequent errors are one that I’ve been trying to get rid. I suspect I might
have set up MinGW/MSys wrongly but just could not find the problem. My code
called SDL_Init but no error was reported, and therefore I presume no problem
with locations of the *.a lib files.
SDL_wave4.c: In function waveCommit': SDL_wave4.c:139: warning: initialization makes integer from pointer without a cast C:/DOCUME~1/library3/LOCALS~1/Temp/ccgdcaaa.o:SDL_wave4.c:(.text+0xba0): undefined reference to
SDL_OpenAudio’
C:/DOCUME~1/library3/LOCALS~1/Temp/ccgdcaaa.o:SDL_wave4.c:(.text+0xbf8):
undefined reference to SDL_PauseAudio' C:/DOCUME~1/library3/LOCALS~1/Temp/ccgdcaaa.o:SDL_wave4.c:(.text+0xbfd): undefined reference to
SDL_GetAudioStatus’
C:/DOCUME~1/library3/LOCALS~1/Temp/ccgdcaaa.o:SDL_wave4.c:(.text+0xc12):
undefined reference to SDL_Delay' C:/DOCUME~1/library3/LOCALS~1/Temp/ccgdcaaa.o:SDL_wave4.c:(.text+0xc34): undefined reference to
SDL_Delay’
C:/DOCUME~1/library3/LOCALS~1/Temp/ccgdcaaa.o:SDL_wave4.c:(.text+0xc58):
undefined reference to SDL_Delay' C:/DOCUME~1/library3/LOCALS~1/Temp/ccgdcaaa.o:SDL_wave4.c:(.text+0xce2): undefined reference to
SDL_CloseAudio’
collect2: ld returned 1 exit status
INSTALL MinGW/MSys/SDL
I used MinGW-5.1.3.exe to install MinGW in C:\MinGW.
I used MSYS-1.0.10.exe to install MSys in C:\Msys. (A final hiccup was that
Msys.ini wasn’t installed as I’m not the administrator of the computer, is
this okay?)
I used SDL-1.2.11.zip to “configure”, “make” and “make install” in an MSys
rxvt terminal.
I’ll be glad to provide more information …
Thanks in advance!
Best regards,
ping-lek
P.S. One quick question (perhaps obvious …), how can I open and write to 8-
channel audio (aka HD Audio) “simultaneously” using SDL?