In file included from g_audio_dats.c:15:g_audio_dats.c: In function 'audio_init':g_audio_dats.c:351:34: error: 'AUDIO_S16' undeclared (first use in this function)ATSINSmove(tmpref3, ATSPMVextval(AUDIO_S16)) ;^~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'#define ATSINSmove(tmp, val) (tmp = val)^~~g_audio_dats.c:351:21: note: in expansion of macro 'ATSPMVextval'ATSINSmove(tmpref3, ATSPMVextval(AUDIO_S16)) ;^~~~~~~~~~~~g_audio_dats.c:351:34: note: each undeclared identifier is reported only once for each function it appears inATSINSmove(tmpref3, ATSPMVextval(AUDIO_S16)) ;^~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'#define ATSINSmove(tmp, val) (tmp = val)^~~g_audio_dats.c:351:21: note: in expansion of macro 'ATSPMVextval'ATSINSmove(tmpref3, ATSPMVextval(AUDIO_S16)) ;^~~~~~~~~~~~g_audio_dats.c:369:19: warning: implicit declaration of function 'SDL_InitSubSystem' [-Wimplicit-function-declaration]ATSINSmove(tmp10, SDL_InitSubSystem(ATSPMVextval(SDL_INIT_AUDIO))) ;^~~~~~~~~~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'#define ATSINSmove(tmp, val) (tmp = val)^~~g_audio_dats.c:369:50: error: 'SDL_INIT_AUDIO' undeclared (first use in this function)ATSINSmove(tmp10, SDL_InitSubSystem(ATSPMVextval(SDL_INIT_AUDIO))) ;^~~~~~~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'#define ATSINSmove(tmp, val) (tmp = val)^~~g_audio_dats.c:369:37: note: in expansion of macro 'ATSPMVextval'ATSINSmove(tmp10, SDL_InitSubSystem(ATSPMVextval(SDL_INIT_AUDIO))) ;^~~~~~~~~~~~g_audio_dats.c:401:19: warning: implicit declaration of function 'Mix_OpenAudio' [-Wimplicit-function-declaration]ATSINSmove(tmp16, Mix_OpenAudio(ATSPMVi0nt(22050), ATSPMVextval(AUDIO_S16), ATSPMVi0nt(2), ATSPMVi0nt(4096))) ;^~~~~~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'#define ATSINSmove(tmp, val) (tmp = val)^~~g_audio_dats.c:433:19: warning: implicit declaration of function 'Mix_QuerySpec' [-Wimplicit-function-declaration]ATSINSmove(tmp22, Mix_QuerySpec(ATSPMVrefarg1(ATSPMVptrof(tmpref2)), ATSPMVrefarg1(ATSPMVptrof(tmpref3)), ATSPMVrefarg1(ATSPMVptrof(tmpref4)))) ;^~~~~~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'#define ATSINSmove(tmp, val) (tmp = val)^~~g_audio_dats.c: In function 'audio_finish':g_audio_dats.c:669:27: warning: implicit declaration of function 'Mix_CloseAudio' [-Wimplicit-function-declaration]ATSINSmove_void(tmpret25, Mix_CloseAudio()) ;^~~~~~~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:284:39: note: in definition of macro 'ATSINSmove_void'#define ATSINSmove_void(tmp, command) command^~~~~~~g_audio_dats.c: In function 'audio_sound_play':g_audio_dats.c:718:19: warning: implicit declaration of function 'Mix_PlayChannel' [-Wimplicit-function-declaration]ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;^~~~~~~~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'#define ATSINSmove(tmp, val) (tmp = val)^~~g_audio_dats.c:718:96: error: 'Mix_Chunk' undeclared (first use in this function)ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;^~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'#define ATSINSmove(tmp, val) (tmp = val)^~~g_audio_dats.c:718:42: note: in expansion of macro 'ATSPMVrefarg1'ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;^~~~~~~~~~~~~g_audio_dats.c:718:56: note: in expansion of macro 'ATSPMVptrof'ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;^~~~~~~~~~~g_audio_dats.c:718:68: note: in expansion of macro 'ATSSELrecsin'ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;^~~~~~~~~~~~g_audio_dats.c:718:81: note: in expansion of macro 'ATSderef'ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;^~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:217:35: error: expected expression before ')' token#define ATSderef(pmv, hit) (*(hit*)pmv)^/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'#define ATSINSmove(tmp, val) (tmp = val)^~~g_audio_dats.c:718:42: note: in expansion of macro 'ATSPMVrefarg1'ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;^~~~~~~~~~~~~g_audio_dats.c:718:56: note: in expansion of macro 'ATSPMVptrof'ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;^~~~~~~~~~~g_audio_dats.c:718:68: note: in expansion of macro 'ATSSELrecsin'ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;^~~~~~~~~~~~g_audio_dats.c:718:81: note: in expansion of macro 'ATSderef'ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;^~~~~~~~g_audio_dats.c:748:19: warning: implicit declaration of function 'Mix_GetError' [-Wimplicit-function-declaration]ATSINSmove(tmp36, Mix_GetError()) ;^~~~~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'#define ATSINSmove(tmp, val) (tmp = val)^~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:35: warning: assignment to 'atstype_ptrk' {aka 'void *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]#define ATSINSmove(tmp, val) (tmp = val)^g_audio_dats.c:748:1: note: in expansion of macro 'ATSINSmove'ATSINSmove(tmp36, Mix_GetError()) ;^~~~~~~~~~g_audio_dats.c: In function 'audio_sound_pause':g_audio_dats.c:845:27: warning: implicit declaration of function 'Mix_Pause' [-Wimplicit-function-declaration]ATSINSmove_void(tmpret37, Mix_Pause(arg0)) ;^~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:284:39: note: in definition of macro 'ATSINSmove_void'#define ATSINSmove_void(tmp, command) command^~~~~~~g_audio_dats.c: In function 'audio_sound_resume':g_audio_dats.c:875:27: warning: implicit declaration of function 'Mix_Resume' [-Wimplicit-function-declaration]ATSINSmove_void(tmpret38, Mix_Resume(arg0)) ;^~~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:284:39: note: in definition of macro 'ATSINSmove_void'#define ATSINSmove_void(tmp, command) command^~~~~~~g_audio_dats.c: In function 'audio_sound_stop':g_audio_dats.c:905:27: warning: implicit declaration of function 'Mix_HaltChannel' [-Wimplicit-function-declaration]ATSINSmove_void(tmpret39, Mix_HaltChannel(arg0)) ;^~~~~~~~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:284:39: note: in definition of macro 'ATSINSmove_void'#define ATSINSmove_void(tmp, command) command^~~~~~~g_audio_dats.c: In function 'audio_music_play':g_audio_dats.c:953:19: warning: implicit declaration of function 'Mix_FadeInMusic' [-Wimplicit-function-declaration]ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;^~~~~~~~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'#define ATSINSmove(tmp, val) (tmp = val)^~~g_audio_dats.c:953:89: error: 'Mix_Music' undeclared (first use in this function)ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;^~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'#define ATSINSmove(tmp, val) (tmp = val)^~~g_audio_dats.c:953:35: note: in expansion of macro 'ATSPMVrefarg1'ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;^~~~~~~~~~~~~g_audio_dats.c:953:49: note: in expansion of macro 'ATSPMVptrof'ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;^~~~~~~~~~~g_audio_dats.c:953:61: note: in expansion of macro 'ATSSELrecsin'ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;^~~~~~~~~~~~g_audio_dats.c:953:74: note: in expansion of macro 'ATSderef'ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;^~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:217:35: error: expected expression before ')' token#define ATSderef(pmv, hit) (*(hit*)pmv)^/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'#define ATSINSmove(tmp, val) (tmp = val)^~~g_audio_dats.c:953:35: note: in expansion of macro 'ATSPMVrefarg1'ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;^~~~~~~~~~~~~g_audio_dats.c:953:49: note: in expansion of macro 'ATSPMVptrof'ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;^~~~~~~~~~~g_audio_dats.c:953:61: note: in expansion of macro 'ATSSELrecsin'ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;^~~~~~~~~~~~g_audio_dats.c:953:74: note: in expansion of macro 'ATSderef'ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;^~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:35: warning: assignment to 'atstype_ptrk' {aka 'void *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]#define ATSINSmove(tmp, val) (tmp = val)^g_audio_dats.c:983:1: note: in expansion of macro 'ATSINSmove'ATSINSmove(tmp49, Mix_GetError()) ;^~~~~~~~~~g_audio_dats.c: At top level:g_audio_dats.c:1063:1: error: redefinition of 'audio_sound_pause'audio_sound_pause()^~~~~~~~~~~~~~~~~g_audio_dats.c:832:1: note: previous definition of 'audio_sound_pause' was hereaudio_sound_pause(atstkind_t0ype(atstype_int) arg0)^~~~~~~~~~~~~~~~~g_audio_dats.c: In function 'audio_sound_pause':g_audio_dats.c:1064:1: error: number of arguments doesn't match prototype{^g_audio_dats.c:832:1: error: prototype declarationaudio_sound_pause(atstkind_t0ype(atstype_int) arg0)^~~~~~~~~~~~~~~~~In file included from g_audio_dats.c:15:g_audio_dats.c:1076:27: warning: implicit declaration of function 'Mix_PauseMusic' [-Wimplicit-function-declaration]ATSINSmove_void(tmpret50, Mix_PauseMusic()) ;^~~~~~~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:284:39: note: in definition of macro 'ATSINSmove_void'#define ATSINSmove_void(tmp, command) command^~~~~~~g_audio_dats.c: In function 'audio_music_resume':g_audio_dats.c:1106:27: warning: implicit declaration of function 'Mix_ResumeMusic' [-Wimplicit-function-declaration]ATSINSmove_void(tmpret51, Mix_ResumeMusic()) ;^~~~~~~~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:284:39: note: in definition of macro 'ATSINSmove_void'#define ATSINSmove_void(tmp, command) command^~~~~~~g_audio_dats.c: In function 'audio_music_stop':g_audio_dats.c:1143:19: warning: implicit declaration of function 'Mix_FadeOutMusic' [-Wimplicit-function-declaration]ATSINSmove(tmp53, Mix_FadeOutMusic(ATSPMVi0nt(5000))) ;^~~~~~~~~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'#define ATSINSmove(tmp, val) (tmp = val)^~~g_audio_dats.c: In function 'audio_music_set_volume':g_audio_dats.c:1195:53: error: 'MIX_MAX_VOLUME' undeclared (first use in this function)ATSINSmove(tmp56, atspre_mul_int_float(ATSPMVextval(MIX_MAX_VOLUME), arg0)) ;^~~~~~~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'#define ATSINSmove(tmp, val) (tmp = val)^~~g_audio_dats.c:1195:40: note: in expansion of macro 'ATSPMVextval'ATSINSmove(tmp56, atspre_mul_int_float(ATSPMVextval(MIX_MAX_VOLUME), arg0)) ;^~~~~~~~~~~~g_audio_dats.c:1200:19: warning: implicit declaration of function 'Mix_VolumeMusic' [-Wimplicit-function-declaration]ATSINSmove(tmp55, Mix_VolumeMusic(ATSPMVcastfn(float_to_int, atstkind_t0ype(atstype_int), tmp56))) ;^~~~~~~~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'#define ATSINSmove(tmp, val) (tmp = val)^~~g_audio_dats.c: In function 'audio_music_get_volume':g_audio_dats.c:1257:60: error: 'MIX_MAX_VOLUME' undeclared (first use in this function)ATSINSmove(tmp58, atspre_g0int_mul_int(tmp59, ATSPMVextval(MIX_MAX_VOLUME))) ;^~~~~~~~~~~~~~/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'#define ATSINSmove(tmp, val) (tmp = val)^~~g_audio_dats.c:1257:47: note: in expansion of macro 'ATSPMVextval'ATSINSmove(tmp58, atspre_g0int_mul_int(tmp59, ATSPMVextval(MIX_MAX_VOLUME))) ;
I took a quick look. You used '#include' in many places. When a SATS file is included, each of the following kind of code blocks is discarded. %{# ... %} In general, a SATS file should not be included in another file; it should be staloaded. Say you have: foo1.sats foo2.sats foo3.sats You can then create foo_all.hats of the following content: #staload "foo1.sats" #staload "foo2.sats" #staload "foo3.sats" This foo_all.hats can be included in another file. How to fix the problem you have now? First, keep including SATS files as you did. I suggest that you put all the code blocks of the following form into a single SATS file called, say, SDL2_headers.sats: %{# ... %} Then just make sure that this file is staloaded in a file like g_audio.dats. By the way, you don't need to compile SATS files. You only need to compile DATS files. Only when you introduce an exception constructor in a SATS file, you need to compiler that SATS file. Hope this helps. |
--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/ccb6be7c-f75b-4c74-9cf7-dd0ab0344f33%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lan...@googlegroups.com.