Menu

#54 Trouble using ilutGLLoadTexture on MacOS

open
nobody
5
2018-05-16
2018-05-16
No

While building an OpenGL project on MacOS we found out that there was no ilutGLLoadTexture(char* filename) available.

after looking into ilut.h we noticed there's a "#ifdef ILUT_USE_OPENGL", we went ahead and defined
"#define ILUT_USE_OPENGL" that at our project right before including every header.

the function is now available but we get the following linker error:

Undefined symbols for architecture x86_64:
  "_ilutGLLoadImage", referenced from:
      Loader::LoadTexture(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in Loader.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

before we'd get prompted by Xcode to use iluLoadImage instead, but this would lead for our texture not to be loaded since it does not load into a OpenGL texture.

we're working on MacOS using Xcode DevIL was installed via hombrew command

brew install devil

During our research to try and fix this problem we added the following flags to the brew configure steps of the devil formula:

def install
    cd "DevIL" do
      system "cmake", ".", *std_cmake_args, >>"--enable-ILUT", "--enable-ILU"<<
      system "make", "install"
    end
  end

the parameters enclosed by >> and << are the ones we added, we're not familiar with how this actually works, but some had success fixing their problems, maybe we're missing another flag?

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.