Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ar: no archive members specified #28

Closed
SpartanJ opened this issue Nov 21, 2019 · 7 comments
Closed

ar: no archive members specified #28

SpartanJ opened this issue Nov 21, 2019 · 7 comments
Labels
bug Something isn't working minor

Comments

@SpartanJ
Copy link
Owner

Original report by Anonymous.


Linking soil2-static-lib
ar: no archive members specified
usage:  ar -d [-TLsv] archive file ...
    ar -m [-TLsv] archive file ...
    ar -m [-abiTLsv] position archive file ...
    ar -p [-TLsv] archive [file ...]
    ar -q [-cTLsv] archive file ...
    ar -r [-cuTLsv] archive file ...
    ar -r [-abciuTLsv] position archive file ...
    ar -t [-TLsv] archive [file ...]
    ar -x [-ouTLsv] archive [file ...]
make[1]: *** [../../lib/macosx/libsoil2-debug.a] Error 1
make: *** [soil2-static-lib] Error 2

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.

@SpartanJ
Copy link
Owner Author

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.

@SpartanJ
Copy link
Owner Author

Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).


In case you want to try, I added a premake5 project, you can build the gnu make project with premake5 gmake2 (instead of gmake), this uses a new backend to generate the projects, it might help.

@SpartanJ
Copy link
Owner Author

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.

@SpartanJ
Copy link
Owner Author

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.

@SpartanJ
Copy link
Owner Author

SpartanJ commented Dec 2, 2019

Original comment by shinerd (Bitbucket: shinerd, GitHub: shinerd).


I’m really sorry about keeping asking. Thanks to you,

  1. I succeed to make ‘SOIL2’ and
  2. moved ‘src/SOIL2’ to ‘usr/local/include’ successfully.
  3. On Xcode, I added ‘debug.a’ to framework. (of course I added the path to include)
  4. And tried to run my project.
  5. Just like the time before I started over again, I got error saying :
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.

@SpartanJ
Copy link
Owner Author

SpartanJ commented Dec 2, 2019

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!

@SpartanJ
Copy link
Owner Author

SpartanJ commented Dec 3, 2019

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!

@SpartanJ SpartanJ added minor bug Something isn't working labels Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working minor
Projects
None yet
Development

No branches or pull requests

1 participant