Xx2ixX
Xx2ixX

Reputation: 21

Undefined reference to 'fprintf' - glewinfo.c (building glew makefile with MSYS/Mingw)

Build errors but working so far

I'm getting all these undefined reference errors when building glew 2.0 with MSYS/mingw (mingw-developer-toolkit-2013072300-msys-bin.meta)

I'm not very familiar with building makefiles, but have followed the instructions on their documentation: https://github.com/nigels-com/glew#msysmingw

$ mingw32-make
$ mingw32-make install
$ mingw32-make install.all

The odd thing is that glew appears to be working fine with this build after adding the generated .dll / .a / .h files to their respective folders & running a basic openGL test (couldn't get it to work previously because the library / binaries are built for visual studio).

Should I be worried about these errors ?

If you need additional info to help just let me know.

Upvotes: 2

Views: 3471

Answers (1)

elrat
elrat

Reputation: 80

The Makefile references files in the config-subfolder. I digged my way through, and ended up commenting a line out (by prepending a #).

in file: 
    glew_2.0.0/config/Makefile.mingw

in line 9:
    LDFLAGS.EXTRA += -nostdlib

However, I have yet to work with the libs built this way. I do not know if you will run into other problems with that approach. I can imagine that there's a reason for excluding stdlib.

Compiling worked fine besides the following errors. Don't know if they're relevant.

$ mingw32-make
process_begin: CreateProcess(NULL,mktemp -d /tmp/glew.XXXXXX, ...) failed.
[...]
$ mingw32-make install
process_begin: CreateProcess(NULL,mktemp -d /tmp/glew.XXXXXX, ...) failed.
[...]
$ mingw32-make install.all
process_begin: CreateProcess(NULL,mktemp -d /tmp/glew.XXXXXX, ...) failed. 

Following files have been produced:

bin/visualinfo.exe
bin/glewinfo.exe
lib/glew32.dll
lib/libglew32.a
lib/libglew32.dll.a

Upvotes: 3

Related Questions