Commit b853acd2 authored by Rachel Wil Sha Singh's avatar Rachel Wil Sha Singh 💬
Browse files

Linking libraries examples

parent c86c782f
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="SDL Example" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/SDL Example" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
<Target title="Release">
<Option output="bin/Release/SDL Example" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
<Add directory="/usr/include/SDL2" />
</Compiler>
<Linker>
<Add option="-lSDL2" />
<Add directory="/usr/lib/x86_64-linux-gnu/" />
</Linker>
<Unit filename="example.cpp" />
<Extensions />
</Project>
</CodeBlocks_project_file>
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="SDL Example" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/SDL Example" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
<Target title="Release">
<Option output="bin/Release/SDL Example" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
<Add directory="/usr/include/SDL2" />
</Compiler>
<Linker>
<Add option="-lSDL2" />
<Add directory="/usr/lib/x86_64-linux-gnu/" />
</Linker>
<Unit filename="example.cpp" />
<Extensions />
</Project>
</CodeBlocks_project_file>
# depslib dependency file v1.0
1600716911 source:/home/wilsha/RACHEL/_ADULTING/TEACHING/PUBLIC/cs250-basic-data-structures-with-cpp/example-code/Linking Libraries/SDL Example/example.cpp
<iostream>
<SDL.h>
1586798831 /usr/include/SDL2/SDL.h
"SDL_main.h"
"SDL_stdinc.h"
"SDL_assert.h"
"SDL_atomic.h"
"SDL_audio.h"
"SDL_clipboard.h"
"SDL_cpuinfo.h"
"SDL_endian.h"
"SDL_error.h"
"SDL_events.h"
"SDL_filesystem.h"
"SDL_gamecontroller.h"
"SDL_haptic.h"
"SDL_hints.h"
"SDL_joystick.h"
"SDL_loadso.h"
"SDL_log.h"
"SDL_messagebox.h"
"SDL_mutex.h"
"SDL_power.h"
"SDL_render.h"
"SDL_rwops.h"
"SDL_sensor.h"
"SDL_shape.h"
"SDL_system.h"
"SDL_thread.h"
"SDL_timer.h"
"SDL_version.h"
"SDL_video.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_main.h
"SDL_stdinc.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_stdinc.h
"SDL_config.h"
<sys/types.h>
<stdio.h>
<stdlib.h>
<stddef.h>
<stdarg.h>
<stdlib.h>
<malloc.h>
<stddef.h>
<stdarg.h>
<memory.h>
<string.h>
<strings.h>
<wchar.h>
<inttypes.h>
<stdint.h>
<ctype.h>
<math.h>
<float.h>
<alloca.h>
<malloc.h>
<malloc.h>
<malloc.h>
<stdlib.h>
<sal.h>
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_config.h
<SDL2/_real_SDL_config.h>
1586798831 /usr/include/SDL2/begin_code.h
1586798831 /usr/include/SDL2/close_code.h
1586798831 /usr/include/SDL2/SDL_assert.h
"SDL_config.h"
"begin_code.h"
<signal.h>
"close_code.h"
1586798831 /usr/include/SDL2/SDL_atomic.h
"SDL_stdinc.h"
"SDL_platform.h"
"begin_code.h"
<sys/cpuinline.h>
<mbarrier.h>
"close_code.h"
1586798831 /usr/include/SDL2/SDL_platform.h
"AvailabilityMacros.h"
"TargetConditionals.h"
<winapifamily.h>
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_audio.h
"SDL_stdinc.h"
"SDL_error.h"
"SDL_endian.h"
"SDL_mutex.h"
"SDL_thread.h"
"SDL_rwops.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_error.h
"SDL_stdinc.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_endian.h
"SDL_stdinc.h"
<endian.h>
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_mutex.h
"SDL_stdinc.h"
"SDL_error.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_thread.h
"SDL_stdinc.h"
"SDL_error.h"
"SDL_atomic.h"
"SDL_mutex.h"
"begin_code.h"
<process.h>
<process.h>
<stdlib.h>
"close_code.h"
1586798831 /usr/include/SDL2/SDL_rwops.h
"SDL_stdinc.h"
"SDL_error.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_clipboard.h
"SDL_stdinc.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_cpuinfo.h
"SDL_stdinc.h"
<intrin.h>
<intrin.h>
<altivec.h>
<arm_neon.h>
<armintr.h>
<arm_neon.h>
<armintr.h>
<arm_neon.h>
<mm3dnow.h>
<immintrin.h>
<mmintrin.h>
<xmmintrin.h>
<emmintrin.h>
<pmmintrin.h>
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_events.h
"SDL_stdinc.h"
"SDL_error.h"
"SDL_video.h"
"SDL_keyboard.h"
"SDL_mouse.h"
"SDL_joystick.h"
"SDL_gamecontroller.h"
"SDL_quit.h"
"SDL_gesture.h"
"SDL_touch.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_video.h
"SDL_stdinc.h"
"SDL_pixels.h"
"SDL_rect.h"
"SDL_surface.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_pixels.h
"SDL_stdinc.h"
"SDL_endian.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_rect.h
"SDL_stdinc.h"
"SDL_error.h"
"SDL_pixels.h"
"SDL_rwops.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_surface.h
"SDL_stdinc.h"
"SDL_pixels.h"
"SDL_rect.h"
"SDL_blendmode.h"
"SDL_rwops.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_blendmode.h
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_keyboard.h
"SDL_stdinc.h"
"SDL_error.h"
"SDL_keycode.h"
"SDL_video.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_keycode.h
"SDL_stdinc.h"
"SDL_scancode.h"
1586798831 /usr/include/SDL2/SDL_scancode.h
"SDL_stdinc.h"
1586798831 /usr/include/SDL2/SDL_mouse.h
"SDL_stdinc.h"
"SDL_error.h"
"SDL_video.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_joystick.h
"SDL_stdinc.h"
"SDL_error.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_gamecontroller.h
"SDL_stdinc.h"
"SDL_error.h"
"SDL_rwops.h"
"SDL_joystick.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_quit.h
"SDL_stdinc.h"
"SDL_error.h"
1586798831 /usr/include/SDL2/SDL_gesture.h
"SDL_stdinc.h"
"SDL_error.h"
"SDL_video.h"
"SDL_touch.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_touch.h
"SDL_stdinc.h"
"SDL_error.h"
"SDL_video.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_filesystem.h
"SDL_stdinc.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_haptic.h
"SDL_stdinc.h"
"SDL_error.h"
"SDL_joystick.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_hints.h
"SDL_stdinc.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_loadso.h
"SDL_stdinc.h"
"SDL_error.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_log.h
"SDL_stdinc.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_messagebox.h
"SDL_stdinc.h"
"SDL_video.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_power.h
"SDL_stdinc.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_render.h
"SDL_stdinc.h"
"SDL_rect.h"
"SDL_video.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_sensor.h
"SDL_stdinc.h"
"SDL_error.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_shape.h
"SDL_stdinc.h"
"SDL_pixels.h"
"SDL_rect.h"
"SDL_surface.h"
"SDL_video.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_system.h
"SDL_stdinc.h"
"SDL_keyboard.h"
"SDL_render.h"
"SDL_video.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_timer.h
"SDL_stdinc.h"
"SDL_error.h"
"begin_code.h"
"close_code.h"
1586798831 /usr/include/SDL2/SDL_version.h
"SDL_stdinc.h"
"begin_code.h"
"close_code.h"
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
<File name="example.cpp" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="881" topLine="29" />
</Cursor>
</File>
</CodeBlocks_layout_file>
#include <iostream>
using namespace std;
#include <SDL.h>
int main( int argc, char* args[] )
{
SDL_Window* window = NULL;
SDL_Renderer* renderer = NULL;
SDL_Init( SDL_INIT_EVERYTHING );
window = SDL_CreateWindow
(
"Example SDL Program",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
640,
480,
SDL_WINDOW_SHOWN
);
renderer = SDL_CreateRenderer( window, -1, SDL_RENDERER_ACCELERATED );
SDL_Rect exampleRect;
exampleRect.x = 100;
exampleRect.y = 50;
exampleRect.w = 300;
exampleRect.h = 350;
bool done = false;
while ( !done )
{
SDL_Event e;
while( SDL_PollEvent( &e ) != 0 )
{
if( e.type == SDL_QUIT )
{
done = true;
}
}
SDL_SetRenderDrawColor( renderer, 200, 200, 255, 255 );
SDL_RenderClear( renderer );
SDL_SetRenderDrawColor( renderer, 100, 100, 255, 255 );
SDL_RenderFillRect( renderer, &exampleRect );
SDL_RenderPresent( renderer );
}
SDL_DestroyRenderer( renderer );
SDL_DestroyWindow( window );
SDL_Quit();
return 0;
}
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="SFML Example" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/SFML Example" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
<Target title="Release">
<Option output="bin/Release/SFML Example" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
</Compiler>
<Linker>
<Add option="-lsfml-graphics -lsfml-window -lsfml-system" />
</Linker>
<Unit filename="example.cpp" />
<Extensions />
</Project>
</CodeBlocks_project_file>
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="SFML Example" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/SFML Example" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
<Target title="Release">
<Option output="bin/Release/SFML Example" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
</Compiler>
<Linker>
<Add option="-lsfml-graphics -lsfml-window -lsfml-system" />
</Linker>
<Unit filename="example.cpp" />
<Extensions />
</Project>
</CodeBlocks_project_file>
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
<File name="example.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">