libSOIL.a file is getting ignored on MacOS

166 Views Asked by At

I installed SOIL on my Mac (BigSur) in the normal way with make and make install. When I do cmake . to my OpenGL Project, everything is ok and SOIL is found. But when i do make, i get following warning/error: ld: warning: ignoring file /usr/local/lib/libSOIL.a, building for macOS-x86_64 but attempting to link with file built for macOS-x86_64. I tried everything i found on the internet. I also included -m64 in the Makefile. Does somebody know to solve this issue?

2

There are 2 best solutions below

0
On

libSOIL uses the Carbon API (see here). The Carbon API has been deprecated with Montain Lion and removed with Catalina. I have removed libSOIL from a project for this reason, it is unlikely you can get it to work without rewriting some of its code.

A possible replacement would be libSDL along with SDL_image. These libs are much more heavy-weight, but can be used while still doing raw OpenGL rendering and ignoring the SDL rendering API.

2
On

You can use SOIL2 replace libSOIL, see SOIL2 for more.