Building error on Windows10
DvDriel opened this issue · 1 comments
First of all, many thanks for the book. I am new to many concepts and it's helping me a lot. I am trying to build the software with minGW, but I'm getting the following error:
C:/MinGW/bin/gcc -g -Wl,-subsystem,windows -obmdebug.exe bmdebug.o bmp-scan.o bmp-script.o dwarf.o elf.o guidriver.o minIni.o nuklear_mousepointer.o nuklear_tooltip.o rs232.o specialfolder.o strlcpy.o tcpip.o usb-support.o svd-support.o decodectf.o parsetsdl.o swotrace.o xmltractor.o nuklear.o nuklear_gdip.o noc_file_dialog.o -lm -lcomdlg32 -lgdi32 -lgdiplus -lsetupapi -lshlwapi -lws2_32
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: nuklear_gdip.o: in function nk_gdip_load_image_from_memory': C:\Users\Daan\Documents\Google Drive\Archive\Courses\Embedded C\Downloads\Black-Magic-Probe-Book-master\source/nuklear_gdip.c:612: undefined reference to
_imp__SHCreateMemStream@8'
collect2.exe: error: ld returned 1 exit status
make: *** [bmdebug.exe] Error 1
What could be the problem? I have to say I'm new to compiling natively and to make as well, so maybe I did something wrong?
Thanks in advance.
(Toch maar in het Engels...)
The error means that a library is missing on the linker line. You may need to add "-lshlwapi" on the lines that start with the $(LNK) macro.
In my testing, I do not have this error. I am using MingW-w64 version 8 with gcc 8.1. In general, I recommend MingW-w64 over the older MingW. The forked project has better support for modern Windows versions.