在Mac上构建GLSDK - 找不到platform.h

时间:2013-02-25 09:55:40

标签: macos opengl glfw

我正在尝试在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上也没有 - 我在计算机上找不到它所以我猜它不是。 有人知道发生了什么吗?

1 个答案:

答案 0 :(得分:3)

glfw.lua文件夹中有glfw个文件。打开它并为“ macosx ”进行配置,然后将目录“lib/cocoa”添加到包含目录中。我还定义了_GLFW_COCOA_GLFW_NSGL_GLFW_USE_OPENGL