我正在尝试在 mac 上构建 GLSDK。我下载了源代码,premake4 xcode3
它为 xcode 创建了所有项目文件。现在我正在尝试构建所有东西,设法构建 glload、glimg、glutil、glmesh 就好了,我已经从 XQuartz 包中获得了 freeglut,所以我想我不需要构建 glsdk 中包含的那个。
当我尝试构建 glfw 时,问题就开始了:
Wojciechs-MacBook-Air:glfw wojciechmusialkiewicz$ xcodebuild
=== BUILD NATIVE TARGET glfw OF PROJECT glfw WITH THE DEFAULT CONFIGURATION (Debug) ===
Check dependencies
CompileC obj/Debug/glfw.build/Objects-normal/x86_64/enable.o lib/enable.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw
setenv LANG en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -arch x86_64 -fmessage-length=0 -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D_LIB -D_DEBUG -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -g -Wno-sign-conversion -iquote /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/glfwD-generated-files.hmap -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/glfwD-own-target-headers.hmap -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/glfwD-all-target-headers.hmap -iquote /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/glfwD-project-headers.hmap -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/library/include -Iinclude -Ilib -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/DerivedSources/x86_64 -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/DerivedSources -F/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/library -MMD -MT dependencies -MF /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/Objects-normal/x86_64/enable.d --serialize-diagnostics /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/Objects-normal/x86_64/enable.dia -c /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/lib/enable.c -o /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/Objects-normal/x86_64/enable.o
In file included from /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/lib/enable.c:31:
lib/internal.h:92:10: fatal error: 'platform.h' file not found
#include "platform.h"
^
1 error generated.
CompileC obj/Debug/glfw.build/Objects-normal/x86_64/glext.o lib/glext.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw
setenv LANG en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -arch x86_64 -fmessage-length=0 -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D_LIB -D_DEBUG -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -g -Wno-sign-conversion -iquote /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/glfwD-generated-files.hmap -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/glfwD-own-target-headers.hmap -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/glfwD-all-target-headers.hmap -iquote /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/glfwD-project-headers.hmap -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/library/include -Iinclude -Ilib -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/DerivedSources/x86_64 -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/DerivedSources -F/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/library -MMD -MT dependencies -MF /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/Objects-normal/x86_64/glext.d --serialize-diagnostics /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/Objects-normal/x86_64/glext.dia -c /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/lib/glext.c -o /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/Objects-normal/x86_64/glext.o
In file included from /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/lib/glext.c:31:
lib/internal.h:92:10: fatal error: 'platform.h' file not found
#include "platform.h"
^
1 error generated.
CompileC obj/Debug/glfw.build/Objects-normal/x86_64/image.o lib/image.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw
setenv LANG en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -arch x86_64 -fmessage-length=0 -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D_LIB -D_DEBUG -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -g -Wno-sign-conversion -iquote /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/glfwD-generated-files.hmap -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/glfwD-own-target-headers.hmap -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/glfwD-all-target-headers.hmap -iquote /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/glfwD-project-headers.hmap -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/library/include -Iinclude -Ilib -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/DerivedSources/x86_64 -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/DerivedSources -F/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/library -MMD -MT dependencies -MF /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/Objects-normal/x86_64/image.d --serialize-diagnostics /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/Objects-normal/x86_64/image.dia -c /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/lib/image.c -o /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/Objects-normal/x86_64/image.o
In file included from /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/lib/image.c:56:
lib/internal.h:92:10: fatal error: 'platform.h' file not found
#include "platform.h"
^
1 error generated.
CompileC obj/Debug/glfw.build/Objects-normal/x86_64/fullscreen.o lib/fullscreen.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw
setenv LANG en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -arch x86_64 -fmessage-length=0 -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D_LIB -D_DEBUG -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -g -Wno-sign-conversion -iquote /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/glfwD-generated-files.hmap -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/glfwD-own-target-headers.hmap -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/glfwD-all-target-headers.hmap -iquote /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/glfwD-project-headers.hmap -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/library/include -Iinclude -Ilib -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/DerivedSources/x86_64 -I/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/DerivedSources -F/Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/library -MMD -MT dependencies -MF /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/Objects-normal/x86_64/fullscreen.d --serialize-diagnostics /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/Objects-normal/x86_64/fullscreen.dia -c /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/lib/fullscreen.c -o /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/obj/Debug/glfw.build/Objects-normal/x86_64/fullscreen.o
In file included from /Users/wojciechmusialkiewicz/glsdk_0.4.4/glfw/lib/fullscreen.c:31:
lib/internal.h:92:10: fatal error: 'platform.h' file not found
#include "platform.h"
^
1 error generated.
** BUILD FAILED **
The following build commands failed:
CompileC obj/Debug/glfw.build/Objects-normal/x86_64/enable.o lib/enable.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler
CompileC obj/Debug/glfw.build/Objects-normal/x86_64/glext.o lib/glext.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler
CompileC obj/Debug/glfw.build/Objects-normal/x86_64/image.o lib/image.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler
CompileC obj/Debug/glfw.build/Objects-normal/x86_64/fullscreen.o lib/fullscreen.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler
(4 failures)
我试过用谷歌搜索这个platform.h
文件是什么,但没有明确的答案,即使它存在于 MacOS 上也没有——我在我的电脑上找不到它,所以我猜它不是。有人知道发生了什么吗?