-
I'd really like to get Apple's OpenGL SDK to work, but it seems like I can't actually link against the SDK that Apple provided. They seem to be CodeWarrior files? Which I can't link against. Because the gl functions are expected to be present on the system, I imagine that there's something I need to modify in this compiler (or another codebase related to this) to get it working. But I have no idea where I'd even get started. Can anyone give me a rundown of what I'd need to do? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 6 replies
-
If you're referring to linking against the '*.lib' files from the OpenGL SDK, it might be easiest to just rebuild them from the included source. But perhaps I'm misreading the contents of the SDK. |
Beta Was this translation helpful? Give feedback.
-
Ok so I actually did find out how to compile the sources in a way that lines up with the libraries that Retro68 wants. But it links against it and then doesn't see the function? CMake if(PLATFORM MATCHES retroppc)
add_compile_definitions(FOR_PPC)
set_target_properties(os9fetch PROPERTIES COMPILE_FLAGS "-ffunction-sections -mcpu=601 -O3 -Wall -Wextra -Wno-unused-parameter")
set_target_properties(os9fetch PROPERTIES LINK_FLAGS "-Wl,-gc-sections")
target_link_libraries( os9fetch PowerMgrLib)
target_link_libraries( os9fetch NameRegistryLib)
target_link_libraries( os9fetch OpenGL)
endif() Confirming the library has the function and then seeing an error. ➜ os9fetch git:(master) ✗ powerpc-apple-macos-nm /opt/Retro68/toolchain/powerpc-apple-macos/lib/libOpenGL.a | grep "glGetString"
U .glGetString
➜ os9fetch git:(master) ✗ ./build.sh
...
[ 5%] Linking CXX executable os9fetch.code.bin
/opt/Retro68/toolchain/lib/gcc/powerpc-apple-macos/12.2.0/../../../../powerpc-apple-macos/bin/ld: CMakeFiles/os9fetch.dir/src/detection/gpu.cpp.obj:/home/gavin/Projects/os9fetch/src/detection/gpu.cpp:(.pr+0x14): undefined reference to `.glGetString'
/opt/Retro68/toolchain/lib/gcc/powerpc-apple-macos/12.2.0/../../../../powerpc-apple-macos/bin/ld: CMakeFiles/os9fetch.dir/src/detection/gpu.cpp.obj:/home/gavin/Projects/os9fetch/src/detection/gpu.cpp:(.pr+0x24): undefined reference to `.glGetString'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/os9fetch.dir/build.make:353: os9fetch.xcoff] Error 1
make[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/os9fetch.dir/all] Error 2
make: *** [Makefile:91: all] Error 2 |
Beta Was this translation helpful? Give feedback.
-
Oh wait, I should learn how nm works. The output of that says it's undefined. So I'm back to square one. |
Beta Was this translation helpful? Give feedback.
-
Try linking against OpenGLLibraryStub, possibly? $ DumpPEF OpenGLLibraryStub | grep -E "glGetString|Export" |
Beta Was this translation helpful? Give feedback.
-
I was finally able to get my hands on a modern Mac, and using that, I was able to convert not only the OpenGL libraries, but also SDL 1.2 as a bonus! They are avaliable here: https://github.com/IoIxD/os9libs |
Beta Was this translation helpful? Give feedback.
-
For the Nix users, there is now a sample program with complete build scripts at https://github.com/autc04/RetroOpenGL/ . |
Beta Was this translation helpful? Give feedback.
I was finally able to get my hands on a modern Mac, and using that, I was able to convert not only the OpenGL libraries, but also SDL 1.2 as a bonus!
They are avaliable here: https://github.com/IoIxD/os9libs