I'm trying to get a small example I coded in C++ working in Pelles C. Here is the code.
#include <bass.h>
int main(){
HSAMPLE sfx[20];
HSTREAM strm;
BASS_Init(-1,44100,0,0,NULL);
char hold;
//sfx1 = BASS_StreamCreateFile(FALSE,"aud\\gun1.ogg",0,0,0);
sfx[0] = BASS_SampleLoad(FALSE,"aud\\gun1.ogg",0,0,1,0);
sfx[1] = BASS_SampleLoad(FALSE,"aud\\explode.ogg",0,0,1,0);
sfx[1] = BASS_SampleLoad(FALSE,"aud\\ric1.ogg",0,0,1,0);
sfx[2] = BASS_SampleLoad(FALSE,"aud\\ric2.ogg",0,0,1,0);
sfx[3] = BASS_SampleLoad(FALSE,"aud\\ric3.ogg",0,0,1,0);
sfx[4] = BASS_SampleLoad(FALSE,"aud\\healthPowerup.ogg",0,0,1,0);
sfx[5] = BASS_SampleLoad(FALSE,"aud\\weaponPowerup.ogg",0,0,1,0);
for(int i = 0 ; i < 5 ; i++){
strm = BASS_SampleGetChannel(sfx[i],FALSE);
BASS_ChannelPlay(strm,FALSE);
scanf("%c",hold);
}
scanf("%c",hold);
}
I've tried this code with both Win32 Program (exe) and Win32 Console project types. Oddly both tell me that I need to include the /Ze option if I'm working on a windows program. I looked in Project Options -> Compiler -> Command line options (CCFLAGS) and see this string -Tx86-coff -Ot -W1 -Gz -Ze so I'm assuming the /Ze option is being used. If not please tell me where to use the /Ze option.
Aside from that I get a lot of errors that look like this...
E:\Program Files (x86)\PellesC\Include\Win\objidl.h(3593): error #2001: Syntax error: found 'HMETAFILEPICT' - expecting '}'.
E:\Program Files (x86)\PellesC\Include\Win\objidl.h(3596): error #2001: Syntax error: found 'LPOLESTR' - expecting '}'.
E:\Program Files (x86)\PellesC\Include\Win\objidl.h(3599): error #2156: Unrecognized declaration.
E:\Program Files (x86)\PellesC\Include\Win\objidl.h(3601): error #2156: Unrecognized declaration.
E:\Program Files (x86)\PellesC\Include\Win\objidl.h(3601): warning #2099: Missing type specifier.
E:\Program Files (x86)\PellesC\Include\Win\objidl.h(3607): error #2078: Invalid union field declarations.
E:\Program Files (x86)\PellesC\Include\Win\objidl.h(3607): error #2001: Syntax error: found 'wireHBITMAP' - expecting '}'.
E:\Program Files (x86)\PellesC\Include\Win\objidl.h(3608): error #2001: Syntax error: found 'wireHPALETTE' - expecting '}'.
E:\Program Files (x86)\PellesC\Include\Win\objidl.h(3609): warning #2099: Missing type specifier.
E:\Program Files (x86)\PellesC\Include\Win\objidl.h(3609): error #2001: Syntax error: found 'hGeneric' - expecting ';'.
E:\Program Files (x86)\PellesC\Include\Win\objidl.h(3609): warning #2099: Missing type specifier.
E:\Program Files (x86)\PellesC\Include\Win\objidl.h(3610): error #2156: Unrecognized declaration.
E:\Program Files (x86)\PellesC\Include\Win\objidl.h(3610): warning #2099: Missing type specifier.
E:\Program Files (x86)\PellesC\Include\Win\objidl.h(3611): error #2156: Unrecognized declaration.
E:\Program Files (x86)\PellesC\Include\Win\objidl.h(3611): warning #2099: Missing type specifier.
E:\Program Files (x86)\PellesC\Include\Win\objidl.h(3618): error #2078: Invalid union field declarations.
There are hundreds of them so I only posted a few. What am I doing wrong here?