markcwm / openb3d.mod

OpenB3D BlitzMax wrapper, see openb3d.docs for examples
18 stars 7 forks source link

Completely unlinkable #8

Closed starfrost013 closed 5 years ago

starfrost013 commented 5 years ago

I can't link anything using openb3dmax.

Building Vibranium [ 97%] Processing:Vibranium.bmx [ 98%] Compiling:Vibranium.bmx.gui.release.win32.x64.c [100%] Linking:Vibranium.exe C:/BMXNG/BlitzMax/mod/openb3dmax.mod/openb3dlib.mod/openb3dlib.release.win32.x64.a(geosphere.cpp.release.win32.x64.o):geosphere.cpp:(.text+0x5a09): undefined reference tostbi_load' C:/BMXNG/BlitzMax/mod/openb3dmax.mod/openb3dlib.mod/openb3dlib.release.win32.x64.a(material.cpp.release.win32.x64.o):material.cpp:(.text+0x3c53): undefined reference to stbi_load' C:/BMXNG/BlitzMax/mod/openb3dmax.mod/openb3dlib.mod/openb3dlib.release.win32.x64.a(terrain.cpp.release.win32.x64.o):terrain.cpp:(.text+0x4791): undefined reference tostbi_load' C:/BMXNG/BlitzMax/mod/openb3dmax.mod/openb3dlib.mod/openb3dlib.release.win32.x64.a(texture.cpp.release.win32.x64.o):texture.cpp:(.text+0xfb0): undefined reference to stbi_load' C:/BMXNG/BlitzMax/mod/openb3dmax.mod/openb3dlib.mod/openb3dlib.release.win32.x64.a(texture.cpp.release.win32.x64.o):texture.cpp:(.text+0x21dd): undefined reference tostbi_load' collect2.exe: error: ld returned 1 exit status Build Error: Failed to link C:/@Vibranium/Client/Src/Vibranium.exe Process complete `

is all I get.

markcwm commented 5 years ago

Thanks Cosmo,

sorry I missed this. So what compiler are you using? Openb3d won't build past gcc 7.x. I've never seen this stbi_load error before. Are you sure stb_image.c is in src?

markcwm commented 5 years ago

This may be resolved now in the latest commit c660131fc248f89c2ecfba984dc669695c10c834, stb_image.c was not imported from the lib as I had moved it to a separate module, this probably caused that error with a later compiler, presumably > gcc 5.x. It is now imported in the lib again.