1.
g++ OpenGL.cpp -I/Users/temp/Downloads/SFML-2.4.2-osx-clang/include -L/usr/local/lib -framework OpenGL -framework GLUT -lsfml-graphics -lsfml-window -lsfml-system
https://www.sfml-dev.org/tutorials/2.4/start-osx.php
2. sfml
https://github.com/ilay122/Chess-Project/
https://github.com/search?p=2&q=texture+loadFromFile&type=Code&utf8=%E2%9C%93
3.
DIR *pDir = NULL; struct dirent *pFile = NULL; pDir = opendir(szDir); if (pDir == NULL) return; while ((pFile = readdir(pDir)) != NULL) { if (pFile->d_type & DT_DIR) { if (strcmp(pFile->d_name, ".") == 0 || strcmp(pFile->d_name, "..") == 0) continue; char Path[256]; int len = strlen(szDir); strncpy(Path, szDir, len + 1); if (szDir[len - 1] != '/') strncat(Path, "/", 2); strncat(Path, pFile->d_name, strlen(pFile->d_name) + 1); scanFile(Path); } else { printf("path:%s fileName:%s ", szDir, pFile->d_name); } } closedir(pDir);
http://blog.csdn.net/xiexingshishu/article/details/42886885