Yes I had AlignC Macro.
I think the issue was that I had taken a short cut on porting the structure and there's a lot to import
The mp3 sound dlI i made in inline c with my #include hacks doesn't work since the change to lld-link. Not sure what the problem is, i think the import lib is broken
It was easy to do with inline c and my hacks but it's complicated you don't need a whole C compiler chain but you do need the specific c compiler headers to make it work, I used clang to compile rather than gcc and even then some compiler options differ between gcc and clang.
....
Code: Select all
!//gccflags -IC:\llvm-mingw-20211002-msvcrt-x86_64\lib\clang\13.0.0\include;
!//#include "E:\idle\pbcex\examples\miniaudio\miniaudio.h";
!//useclang;
ImportC "miniaudiox64.lib" : EndImport
Structure sound_ma
*sound
*delaynode
EndStructure
ProcedureCDLL maSound_Init()
Protected *engine
Protected sz
!v_sz = sizeof(ma_engine);
*engine= AllocateMemory(sz);
!ma_result result;
!result = ma_engine_init(NULL, p_engine);
!if (result == MA_SUCCESS) {
ProcedureReturn *engine
!}
EndProcedure
ProcedureCDLL maSound_UnInit(*engine)
If *engine
!ma_engine_uninit(p_engine);
*engine = 0
EndIf
EndProcedure
ProcedureCDLL maSound_LastError()
ProcedureReturn @err
EndProcedure
ProcedureCDLL maSound_Free(sound)
Protected *snd.sound_ma = sound
If sound
! ma_sound_uninit(p_snd->f_sound);
If *snd\delaynode
! ma_delay_node_uninit(p_snd->f_delaynode, NULL);
EndIf
FreeMemory(*snd)
EndIf
EndProcedure
ProcedureCDLL maSound_Load(*engine,file.s,delay.f=0.0,decay.f=0.0)
If file <> ""
Protected *snd.sound_ma = AllocateMemory(SizeOf(sound_ma))
Protected sz
!v_sz = sizeof(ma_sound);
Protected *sound = AllocateMemory(sz)
!ma_result result;
! ma_uint32 channels;
! ma_uint32 sampleRate;
! channels = ma_engine_get_channels(p_engine);
! sampleRate = ma_engine_get_sample_rate(p_engine);
If delay <> 0.0
! ma_delay_node* g_delayNode = malloc(sizeof(ma_delay_node)); /* The echo effect is achieved using a delay node. */
! p_snd->f_delaynode = g_delayNode;
! ma_delay_node_config delayNodeConfig;
! delayNodeConfig = ma_delay_node_config_init(channels, sampleRate, (ma_uint32)(sampleRate * v_delay), v_decay);
! result = ma_delay_node_init(ma_engine_get_node_graph(p_engine), &delayNodeConfig, NULL, g_delayNode);
! if (result != MA_SUCCESS) {
;err = "Failed to initialize delay node."
Goto error
! }
!
! ma_node_attach_output_bus(g_delayNode, 0, ma_engine_get_endpoint(p_engine), 0);
! result = ma_sound_init_from_file_w(p_engine,v_file, 0, NULL, NULL, p_sound);
! if (result != MA_SUCCESS) {
;err = "Failed to initialize sound"
Goto error
! }
EndIf
If delay <> 0.0
; /* Connect the output of the sound To the input of the effect. */
! ma_node_attach_output_bus(p_sound, 0, g_delayNode, 0);
Else
! result = ma_sound_init_from_file_w(p_engine,v_file, 0, NULL, NULL, p_sound);
! if (result != MA_SUCCESS) {
;err = "Failed to initialize sound"
Goto error
! }
EndIf
!p_snd->f_sound = p_sound;
ProcedureReturn *snd
error:
maSound_Free(*snd)
EndIf
EndProcedure
ProcedureCDLL maSound_Play(sound)
Protected *snd.sound_ma = sound
If sound
! ma_sound_start(p_snd->f_sound);
EndIf
EndProcedure
ProcedureCDLL maSound_Stop(sound)
Protected *snd.sound_ma = sound
If sound
!ma_sound_stop(p_snd->f_sound);
EndIf
EndProcedure
ProcedureCDLL maSound_Set_Volume(Sound,volume.f)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_volume(p_snd->f_sound,v_volume);
EndIf
EndProcedure
ProcedureCDLL.f maSound_Get_Volume(Sound)
Protected *snd.sound_ma = sound
Protected vol.f
If sound
!v_vol = ma_sound_get_volume(p_snd->f_sound);
EndIf
ProcedureReturn vol
EndProcedure
ProcedureCDLL maSound_Set_Pan(Sound,pan.f)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_pan(p_snd->f_sound, v_pan);
EndIf
EndProcedure
ProcedureCDLL.f maSound_Get_Pan(Sound)
Protected *snd.sound_ma = sound
Protected pan.f
If sound
!v_pan = ma_sound_get_pan(p_snd->f_sound);
EndIf
ProcedureReturn pan
EndProcedure
ProcedureCDLL maSound_Set_Pan_Mode(Sound,panMode.l)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_pan_mode(p_snd->f_sound,v_panmode);
EndIf
EndProcedure
ProcedureCDLL maSound_Get_Pan_Mode(Sound)
Protected *snd.sound_ma = sound
Protected mode
If sound
!v_mode = ma_sound_get_pan_mode(p_snd->f_sound);
EndIf
ProcedureReturn mode
EndProcedure
ProcedureCDLL maSound_Set_Pitch(Sound,pitch.f)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_pitch(p_snd->f_sound,v_pitch);
EndIf
EndProcedure
ProcedureCDLL.f maSound_Get_Pitch(Sound)
Protected *snd.sound_ma = sound
Protected pitch.f
If sound
!v_pitch = ma_sound_get_pitch(p_snd->f_sound);
EndIf
ProcedureReturn pitch
EndProcedure
ProcedureCDLL maSound_Set_Spatialization_Enabled(Sound,enabled.l)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_spatialization_enabled(p_snd->f_sound,v_enabled);
EndIf
EndProcedure
ProcedureCDLL maSound_Is_Spatialization_Enabled(Sound)
Protected *snd.sound_ma = sound
Protected enabled.l
If sound
!v_enabled = ma_sound_is_spatialization_enabled(p_snd->f_sound);
EndIf
ProcedureReturn enabled
EndProcedure
ProcedureCDLL maSound_Set_Pinned_Listener_Index(Sound,listenerIndex.l)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_pinned_listener_index(p_snd->f_sound,v_listenerindex);
EndIf
EndProcedure
ProcedureCDLL maSound_Get_Pinned_Listener_Index(Sound)
Protected *snd.sound_ma = sound
Protected index.l
If sound
!v_index = ma_sound_get_pinned_listener_index(p_snd->f_sound);
EndIf
ProcedureReturn index
EndProcedure
ProcedureCDLL maSound_Get_Listener_Index(Sound)
Protected *snd.sound_ma = sound
Protected index.l
If sound
!v_index = ma_sound_get_listener_index(p_snd->f_sound);
EndIf
ProcedureReturn index
EndProcedure
ProcedureCDLL maSound_Get_Direction_To_Listener(Sound,*vec3.Vector3)
Protected *snd.sound_ma = sound
If sound
!ma_vec3f relativePos;
!relativePos = ma_sound_get_direction_to_listener(p_snd->f_sound);
!p_vec3->f_x = relativePos.x;
!p_vec3->f_y = relativePos.y;
!p_vec3->f_z = relativePos.z;
EndIf
EndProcedure
ProcedureCDLL maSound_Set_Position(Sound,*vec3.Vector3)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_position(p_snd->f_sound,p_vec3->f_x,p_vec3->f_y,p_vec3->f_z);
EndIf
EndProcedure
ProcedureCDLL maSound_Get_Position(Sound,*vec3.Vector3)
Protected *snd.sound_ma = sound
If sound
!ma_vec3f relativePos;
!relativePos = ma_sound_get_position(p_snd->f_sound);
!p_vec3->f_x = relativePos.x;
!p_vec3->f_y = relativePos.y;
!p_vec3->f_z = relativePos.z;
EndIf
EndProcedure
ProcedureCDLL maSound_Set_Direction(Sound,*vec3.Vector3)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_direction(p_snd->f_sound,p_vec3->f_x,p_vec3->f_y,p_vec3->f_z);
EndIf
EndProcedure
ProcedureCDLL maSound_Get_Direction(Sound,*vec3.Vector3)
Protected *snd.sound_ma = sound
If sound
!ma_vec3f relativePos;
!relativePos = ma_sound_get_direction(p_snd->f_sound);
!p_vec3->f_x = relativePos.x;
!p_vec3->f_y = relativePos.y;
!p_vec3->f_z = relativePos.z;
EndIf
EndProcedure
ProcedureCDLL maSound_Set_Velocity(Sound,*vec3.Vector3)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_velocity(p_snd->f_sound,p_vec3->f_x,p_vec3->f_y,p_vec3->f_z);
EndIf
EndProcedure
ProcedureCDLL maSound_Get_Velocity(Sound,*vec3.Vector3)
Protected *snd.sound_ma = sound
If sound
!ma_vec3f relativePos;
!relativePos = ma_sound_get_velocity(p_snd->f_sound);
!p_vec3->f_x = relativePos.x;
!p_vec3->f_y = relativePos.y;
!p_vec3->f_z = relativePos.z;
EndIf
EndProcedure
ProcedureCDLL maSound_Set_Attenuation_Model(Sound,attenuationModel.l)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_attenuation_model(p_snd->f_sound,v_attenuationmodel);
EndIf
EndProcedure
ProcedureCDLL maSound_Get_Attenuation_Model(Sound)
Protected *snd.sound_ma = sound
Protected mod
If sound
!v_mod = ma_sound_get_attenuation_model(p_snd->f_sound);
EndIf
ProcedureReturn mod
EndProcedure
ProcedureCDLL maSound_Set_Positioning(Sound,positioning.l)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_positioning(p_snd->f_sound,v_positioning);
EndIf
EndProcedure
ProcedureCDLL maSound_Get_Positioning(Sound)
Protected *snd.sound_ma = sound
Protected pos
If sound
!v_pos = ma_sound_get_positioning(p_snd->f_sound);
EndIf
ProcedureReturn pos
EndProcedure
ProcedureCDLL maSound_Set_Rolloff(Sound,rolloff.f)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_rolloff(p_snd->f_sound,v_rolloff);
EndIf
EndProcedure
ProcedureCDLL.f maSound_Get_Rolloff(Sound)
Protected *snd.sound_ma = sound
Protected rol.f
If sound
!v_rol = ma_sound_get_rolloff(p_snd->f_sound);
EndIf
ProcedureReturn rol
EndProcedure
ProcedureCDLL maSound_Set_Min_Gain(Sound,minGain.f)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_min_gain(p_snd->f_sound,v_mingain);
EndIf
EndProcedure
ProcedureCDLL.f maSound_Get_Min_Gain(Sound)
Protected *snd.sound_ma = sound
Protected rol.f
If sound
!v_rol = ma_sound_get_min_gain(p_snd->f_sound);
EndIf
ProcedureReturn rol
EndProcedure
ProcedureCDLL maSound_Set_Max_Gain(Sound,maxGain.f)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_max_gain(p_snd->f_sound,v_maxgain);
EndIf
EndProcedure
ProcedureCDLL.f maSound_Get_Max_Gain(Sound)
Protected *snd.sound_ma = sound
Protected rol.f
If sound
!v_rol = ma_sound_get_max_gain(p_snd->f_sound);
EndIf
ProcedureReturn rol
EndProcedure
ProcedureCDLL maSound_Set_Min_Distance(Sound,minDistance.f)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_min_distance(p_snd->f_sound,v_mindistance);
EndIf
EndProcedure
ProcedureCDLL.f maSound_Get_Min_Distance(Sound)
Protected *snd.sound_ma = sound
Protected rol.f
If sound
!v_rol = ma_sound_get_min_distance(p_snd->f_sound);
EndIf
ProcedureReturn rol
EndProcedure
ProcedureCDLL maSound_Set_Max_Distance(Sound,maxDistance.f)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_max_distance(p_snd->f_sound,v_maxdistance);
EndIf
EndProcedure
ProcedureCDLL.f maSound_Get_Max_Distance(Sound)
Protected *snd.sound_ma = sound
Protected rol.f
If sound
!v_rol = ma_sound_get_max_distance(p_snd->f_sound);
EndIf
ProcedureReturn rol
EndProcedure
ProcedureCDLL maSound_Set_Cone(Sound,*vec3.Vector3) ;float innerAngleInRadians, float outerAngleInRadians, float outerGain)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_cone(p_snd->f_sound,p_vec3->f_x,p_vec3->f_y,p_vec3->f_z);
EndIf
EndProcedure
ProcedureCDLL maSound_Get_Cone(Sound,*vec3.Vector3); float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain)
Protected *snd.sound_ma = sound
If sound
!ma_vec3f pos;
!ma_sound_get_cone(p_snd->f_sound,&pos.x,&pos.y,&pos.z);
!p_vec3->f_x = pos.x;
!p_vec3->f_y = pos.y;
!p_vec3->f_z = pos.z;
EndIf
EndProcedure
ProcedureCDLL maSound_Set_Doppler_Factor(Sound,dopplerFactor.f)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_doppler_factor(p_snd->f_sound,v_dopplerfactor);
EndIf
EndProcedure
ProcedureCDLL.f maSound_Get_Doppler_Factor(Sound)
Protected *snd.sound_ma = sound
Protected rol.f
If sound
!v_rol = ma_sound_get_doppler_factor(p_snd->f_sound);
EndIf
ProcedureReturn rol
EndProcedure
ProcedureCDLL maSound_Set_Directional_Attenuation_Factor(Sound,directionalAttenuationFactor.f)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_directional_attenuation_factor(p_snd->f_sound,v_directionalattenuationfactor);
EndIf
EndProcedure
ProcedureCDLL.f maSound_Get_Directional_Attenuation_Factor(Sound)
Protected *snd.sound_ma = sound
Protected rol.f
If sound
!v_rol = ma_sound_get_directional_attenuation_factor(p_snd->f_sound);
EndIf
ProcedureReturn rol
EndProcedure
ProcedureCDLL maSound_Set_Fade_In_Pcm_Frames(Sound,volumeBeg.f,volumeEnd.f,fadeLengthInFrames.q)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_fade_in_pcm_frames(p_snd->f_sound,v_volumebeg,v_volumeend,v_fadelengthinframes);
EndIf
EndProcedure
ProcedureCDLL maSound_Set_Fade_In_Milliseconds(sound,volumeBegin.f,volumeEnd.f,fadeLengthInMilliseconds.q);
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_fade_in_milliseconds(p_snd->f_sound,v_volumebegin,v_volumeend,v_fadelengthinmilliseconds);
EndIf
EndProcedure
ProcedureCDLL.f maSound_Get_Current_Fade_Volume(Sound)
Protected *snd.sound_ma = sound
Protected rol.f
If sound
!v_rol = ma_sound_get_current_fade_volume(p_snd->f_sound);
EndIf
ProcedureReturn rol
EndProcedure
ProcedureCDLL maSound_Set_Start_Time_In_Pcm_Frames(Sound,absoluteGlobalTimeInFrames.q)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_start_time_in_pcm_frames(p_snd->f_sound,v_absoluteglobaltimeinframes);
EndIf
EndProcedure
ProcedureCDLL maSound_Set_Start_Time_In_Milliseconds(Sound,absoluteGlobalTimeInMilliseconds.q)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_start_time_in_milliseconds(p_snd->f_sound,v_absoluteglobaltimeinmilliseconds);
EndIf
EndProcedure
ProcedureCDLL maSound_Set_Stop_Time_In_Pcm_Frames(Sound,absoluteGlobalTimeInFrames.q)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_stop_time_in_pcm_frames(p_snd->f_sound,v_absoluteglobaltimeinframes);
EndIf
EndProcedure
ProcedureCDLL maSound_Set_Stop_Time_In_Milliseconds(Sound,absoluteGlobalTimeInMilliseconds.q)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_stop_time_in_milliseconds(p_snd->f_sound,v_absoluteglobaltimeinmilliseconds);
EndIf
EndProcedure
ProcedureCDLL maSound_Is_Playing(Sound)
Protected *snd.sound_ma = sound
Protected ret.l
If sound
!v_ret = ma_sound_is_playing(p_snd->f_sound);
EndIf
ProcedureReturn ret
EndProcedure
ProcedureCDLL.q maSound_Get_Time_In_Pcm_Frames(Sound)
Protected *snd.sound_ma = sound
Protected ret.q
If sound
!v_ret = ma_sound_get_time_in_pcm_frames(p_snd->f_sound);
EndIf
ProcedureReturn ret
EndProcedure
ProcedureCDLL maSound_Set_Looping(Sound,isLooping.l)
Protected *snd.sound_ma = sound
If sound
!ma_sound_set_looping(p_snd->f_sound,v_islooping);
EndIf
EndProcedure
ProcedureCDLL maSound_Is_Looping(Sound)
Protected *snd.sound_ma = sound
Protected ret.l
If sound
!v_ret =ma_sound_is_looping(p_snd->f_sound);
EndIf
ProcedureReturn ret
EndProcedure
ProcedureCDLL maSound_At_End(Sound)
Protected *snd.sound_ma = sound
Protected ret.l
If sound
!v_ret =ma_sound_at_end(p_snd->f_sound);
EndIf
ProcedureReturn ret
EndProcedure
ProcedureCDLL maSound_Seek_To_Pcm_Frame(Sound,frameindex.q)
Protected *snd.sound_ma = sound
Protected ret.l
If sound
!v_ret = ma_sound_seek_to_pcm_frame(p_snd->f_sound,v_frameindex);
EndIf
ProcedureReturn ret
EndProcedure
ProcedureCDLL maSound_Get_Data_Format(Sound,*Format.long,*Channels.long,*SampleRate.long,*ChannelMap.long,channelMapCap.i)
Protected *snd.sound_ma = sound
Protected ret.l
If sound
!v_ret = ma_sound_get_data_format(p_snd->f_sound,&p_format,&p_channels,&p_samplerate,&p_channelmap,v_channelmapcap);
EndIf
ProcedureReturn ret
EndProcedure
CompilerIf #PB_Compiler_IsMainFile
#ma_positioning_absolute =0
#ma_positioning_relative = 1
#ma_attenuation_model_none = 0 ;/* No distance attenuation And no spatialization. */
#ma_attenuation_model_inverse = 1 ;/* Equivalent To OpenAL's AL_INVERSE_DISTANCE_CLAMPED. */
#ma_attenuation_model_linear = 2 ;/* Linear attenuation. Equivalent To OpenAL's AL_LINEAR_DISTANCE_CLAMPED. */
#ma_attenuation_model_exponential = 3
ImportC "miniaudiosound.lib"
ma_Init()
ma_UnInit(engine)
ma_LastError()
ma_FreeSound(sound)
ma_LoadSound(engine,file.s,delay.f=0.0,decay.f=0.0)
ma_PlaySound(sound)
ma_StopSound(sound)
ma_Sound_Set_Volume(Sound,volume.f)
ma_Sound_Get_Volume(Sound)
ma_Sound_Set_Pan(Sound,pan.f)
ma_sound_set_pan_mode(Sound,panMode.l)
ma_sound_get_pan_mode(sound)
ma_sound_set_pitch(Sound,pitch.f)
ma_sound_get_pitch(Sound)
ma_sound_set_spatialization_enabled(Sound,enabled.l)
ma_sound_is_spatialization_enabled(Sound)
ma_sound_set_pinned_listener_index(Sound,listenerIndex.l)
ma_sound_get_pinned_listener_index(Sound)
ma_sound_get_listener_index(Sound)
ma_sound_get_direction_to_listener(Sound,*vec3.Vector3)
ma_sound_set_position(Sound,*vec3.Vector3)
ma_sound_get_position(Sound,*vec3.Vector3)
ma_sound_set_direction(Sound,*vec3.Vector3)
ma_sound_get_direction(Sound,*vec3.Vector3)
ma_sound_set_velocity(Sound,*vec3.Vector3)
ma_sound_get_velocity(Sound,*vec3.Vector3)
ma_sound_set_attenuation_model(Sound,attenuationModel.l)
ma_sound_get_attenuation_model(Sound)
ma_sound_set_positioning(Sound,ma_positioning.l)
ma_sound_get_positioning(Sound)
ma_sound_set_rolloff(Sound,rolloff.f)
ma_sound_get_rolloff(Sound)
ma_sound_set_min_gain(Sound,minGain.f)
ma_sound_get_min_gain(Sound)
ma_sound_set_max_gain(Sound,maxGain.f)
ma_sound_get_max_gain(Sound)
ma_sound_set_min_distance(Sound,minDistance.f)
ma_sound_get_min_distance(Sound)
ma_sound_set_max_distance(Sound,maxDistance.f)
ma_sound_get_max_distance(Sound)
ma_sound_set_cone(Sound,*vec.Vector3) ;float innerAngleInRadians, float outerAngleInRadians, float outerGain
ma_sound_get_cone(Sound,*vec.Vector3) ; float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain)
ma_sound_set_doppler_factor(Sound,dopplerFactor.f)
ma_sound_get_doppler_factor(Sound)
ma_sound_set_directional_attenuation_factor(Sound,directionalAttenuationFactor.f)
ma_sound_get_directional_attenuation_factor(Sound)
ma_sound_set_fade_in_pcm_frames(Sound,volumeBeg.f,volumeEnd.f,fadeLengthInFrames.q)
ma_sound_set_fade_in_milliseconds(sound,volumeBegin.f,volumeEnd.f,fadeLengthInMilliseconds.q)
ma_sound_get_current_fade_volume(Sound)
ma_sound_set_start_time_in_pcm_frames(Sound,absoluteGlobalTimeInFrames.q)
ma_sound_set_start_time_in_milliseconds(Sound,absoluteGlobalTimeInMilliseconds.q)
ma_sound_set_stop_time_in_pcm_frames(Sound,absoluteGlobalTimeInFrames.q)
ma_sound_set_stop_time_in_milliseconds(Sound,absoluteGlobalTimeInMilliseconds.q)
ma_sound_is_playing(Sound)
ma_sound_get_time_in_pcm_frames(Sound)
ma_sound_set_looping(Sound,isLooping.l)
ma_sound_is_looping(Sound)
ma_sound_at_end(Sound)
ma_sound_seek_to_pcm_frame(Sound,frameindex.q)
ma_sound_get_data_format(Sound,*Format.long,*Channels.long,*SampleRate.long,*ChannelMap.long,channelMapCap.i)
EndImport
Global engine
engine = ma_init()
If engine
OpenConsole()
sound = ma_LoadSound(engine,"E:\idle\Music\motat.mp3",0.6,0.25)
If sound
ma_PlaySound(sound)
PrintN("Press Enter to quit...");
Input()
ma_FreeSound(sound)
Else
PrintN(PeekS(@ma_lastError()))
PrintN("Press Enter to quit...");
Input()
EndIf
ma_uninit(@engine)
EndIf
CompilerEndIf
To make inline C usable for direct includes all that's required is to have #include outside of the scope of the main function and also a copy of the gcc include headers.