1

(I know it is similar to questions previously asked, but I tried for hours and failed to successfully use advice like the one written HERE and in related threads; I'm too inexperienced and a slow learner).

I'm Using:

  • Code::Blocks 13.12 IDE,
  • GNU GCC Compiler,
  • MinGW's folders for holding GLUT and other libraries + files (like GLAux.h).
  • Windows 7 OS

Error message:

In function `Z7LoadBMPPc':
undefined reference to `auxDIBImageLoadA@4'
=== Build failed: 1 error(s), 5 warning(s) (0 minute(s), 3 second(s)) ===

(Testing one of the proposed solutions, when I additionelly add a Glaux library to the linker's libraries, dozens of other undefined reference errors pop up.)

The above function's declaration is in the <gl\GLAux.h> header file:

AUX_RGBImageRec * APIENTRY auxDIBImageLoadA(LPCSTR);

But naturally I can't go further, and look into the Glaux library itself.

I only know how to solve (some) undefined reference problems if they refer to the code I've written. Here it is not the case.

.

Which version of the undefined reference problem am I dealing with?

What to do?

Community
  • 1
  • 1
dziadek1990
  • 277
  • 2
  • 10
  • 2
    "Linker can't find declared function in Glaux library" That's probably for the best. You should not be using the GLaux library for *anything*. There are [plenty of tools out there for loading images into textures](https://www.opengl.org/wiki/Portal:Development_Tools); you don't have to use a crappy one that's 20 years out of date. – Nicol Bolas Jan 10 '16 at 17:56
  • @Nicol Thanks. (I wonder why my uni insists on recommending us outdated stuff...) – dziadek1990 Jan 10 '16 at 18:09
  • 1
    When you added the library, and got other undefined symbols, that means that you were on the right track. Particularly if the previously undefined symbol is not undefined anymore. Then you just need to add the libraries that contain the remaining undefined symbols. – Reto Koradi Jan 10 '16 at 19:46

1 Answers1

-1

Project → Build options → Linker Settings → Add → GLAUX → OK. Also you need to specify the full link to the picture. And pucture must be BMP 24 bit.

double-beep
  • 5,031
  • 17
  • 33
  • 41
Ruslan
  • 1