Closed SpartanJ closed 4 years ago
Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).
I cannot reproduce the bug. ar is complaining that no files were specified to create the archive, something must have been gone wrong at some point. Run: make verbose=yes
so we can see what’s happening. Please report your macOS version and toolchain.
Original comment by shinerd (Bitbucket: shinerd, GitHub: shinerd).
My version was High Sierra, and I used CLI for this.
I just updated MacOS to Catalina though. So I tried premake5. And I got new problem. When I try make, it says,
Linking soil2-shared-lib
ld: warning: directory not found for option '-F/Users/shinerd/Library/Frameworks'
ld: library not found for -lSDL2
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [../../lib/macosx/libsoil2-debug.dylib] Error
So I checked my directory, and my “Frameworks” folder is in Macintosh HD/Library/Frameworks.
I tried to edit premake5.lua but, the only thing I can find is linkoptions {"-F /Library/Frameworks", "-F ~/Library/Frameworks"}
When I try command+shift+G and to move to “~/Library/Frameorks” in finder, it finds the exact folder. I don’t really get what’s wrong.
Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).
You simply don’t have installed SDL2. You have two options: install it as a framework ( from its official package https://www.libsdl.org/release/SDL2-2.0.10.dmg ) or as a library ( for example with brew or manually ). Anyway, you don’t need SDL2 to use SOIL2, that’s just needed for the demo. The directory not found is just a warning, nothing really important.
Original comment by shinerd (Bitbucket: shinerd, GitHub: shinerd).
I’m really sorry about keeping asking. Thanks to you,
clang:-1: linker command failed with exit code 1 (use -v to see invocation)
A few weeks ago, I got the same error code. So I thought maybe it’s because of the errors that I got while installing soil2 (I ignored them). But now, I don’t know what’s wrong. Other frameworks that I’m using with soil2 work though.
Original comment by shinerd (Bitbucket: shinerd, GitHub: shinerd).
I finally solved this problem, and while googling this, I just knew that there’re some people who had struggled with the same thing.
I solved this problem by adding CoreFoundation.framework to Xcode.
link → check this out
and I think it would be really nice of you to write this on readme.md.
I really appreciate you. Thank you for good library. Have a good day!
Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).
I’m glad you solved it! Yes, I could clarify how to include the statically built library into a project, but there are many scenarios to cover and it’s actually pretty basic for any C/C++ dev, but, I’ll clarify the library dependencies for that specific scenario (manually linking SOIL2). The way that Scott solved isn’t necessarily the only way, but did the job. He ended up writing an OpenGL book that uses SOIL2 for texture loading, it might interest you: https://www.amazon.com/Computer-Graphics-Programming-OpenGL-C/dp/1683922212
Regards!
Original report by Anonymous.
I downloaded premake4, and moved .exe to 'SpartanJ-soil2'. And I moved to the directory on Terminal. I typed " ./premake4 gmake", "cd make/macosx", and "make" Then it showed me the errors above.