> > I'm building the WIC Viewer using Direct2D[1] sample from Microsoft, > > converted to C, and I'm getting some strange SIGSERV at the function > > ID2D1HwndRenderTarget_GetSize(m_pRT) when the program is compiled with > gcc > > 9.x on a x86_64 system. No problem occurs when compiled with any gcc 8.x > > x86_64 or gcc 9.x i686. All builds using MSYS2 toolchain packages. > > > > Please provide the exact commands that you used to invoke G++. I > compiled the sample program with the following commands and ran it but > observed no segmentation faults: > > ``` > windres WicViewerD2D.rc -o WicViewerD2D.o > g++ -municode -mwindows *.cpp *.o \ > -ld2d1 -lwindowscodecs -lole32 \ > -o WicViewerD2D.exe > ``` >
Below is the complete command used by the IDE. Please allow me to remind you that this program is a direct conversion to C from the sample, so no g++ is used. gcc.exe -c WicViewerD2D.c -o WicViewerD2D.o -I"C:/msys64/mingw64/include" -I"C:/msys64/mingw64/x86_64-w64-mingw32/include" -I"C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0/include" windres.exe -i WicViewer_private.rc --input-format=rc -o WicViewer_private.res -O coff gcc.exe WicViewerD2D.o WicViewer_private.res -o WicViewer.exe -L"C:/msys64/mingw64/lib" -L"C:/msys64/mingw64/x86_64-w64-mingw32/lib" -static-libgcc -mwindows -lole32 -ld2d1 Thank you. _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public