Question

I'm getting the folling linker errors when compiling with gcc:

undefined reference to `SetStretchBltMode@8' 
undefined reference to `StretchDIBits@52' 
undefined reference to `SetDIBitsToDevi

Are these functions defined in the windows libs?

If so do they come installed with Vista, or do I need to install them, and if so where can i download them.

Thanks

Was it helpful?

Solution

I know you solved your problem long ago, but for reference, I think you should be able to run g++ with -mwindows and that'll link gdi32.dll and comdlg32.dll with your binary automatically.

This page has a tutorial for Win32 on MinGW

OTHER TIPS

Ok - worked this out:

libgdi32.a comes with mingw.

You need to add -lgdi32 to the g++ command!

Make sure that the path to mingw/lib is also provided to g++ eg: -Lc:/mingw/lib

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top