# SDL2.framework is in the correct location:$ls/Library/FrameworksAEProfiling.frameworkAudioMixEngine.frameworkPluginManager.frameworkiTunesLibrary.frameworkAERegistration.frameworkNyxAudioAnalysis.frameworkSDL2.framework# Frameworks direction is included in path (Note: shouldn't actually matter)$echo$PATH/Users/Jo/_UTIL:/Library/Frameworks:/usr/local/lib:/usr/local/include:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin# Source file for a simple sdl2 program$lssdl2_test.c# Attempting to compile object code FAILS without -F flag$gccsdl2_test.c-c-osdl2_test.o-frameworkSDL2sdl2_test.c:1:22:fatalerror:SDL2/SDL.h:Nosuchfileordirectory#include"SDL2/SDL.h"^compilationterminated.# Attempting to compile object file SUCCEEDS with -F flag$gccsdl2_test.c-c-osdl2_test.o-frameworkSDL2-F/Library/Frameworks$lssdl2_test.csdl2_test.o# Attempting to link object file FAILS without -F flag$gccsdl2_test.o-osdl2_test-frameworkSDL2ld:frameworknotfoundSDL2collect2:error:ldreturned1exitstatus# Attempting to link object file SUCCEEDS with -F flag$gccsdl2_test.o-osdl2_test-frameworkSDL2-F/Library/Frameworks$lssdl2_testsdl2_test.csdl2_test.o
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.