I find a way to use the GDI + library with the g ++ compiler, I read several guild lines on the Internet and still encounter a problem ...
Here is my code:
#include "gdiplus.h" using namespace Gdiplus;
And I already used the compiler switch as shown below:
g++ -Wall -mwindows -lgdiplus -I"C:\MinGW\include" -I"C:\MinGW\include\gdiplus" -L"C:\MinGW\lib" -g3 -finput-charset=GBK "$(FilePath)" -o "$(FileDir)\$(FileNameNoExt).exe"
However, I got the following errors:
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccjX3mCb.o: In function ` WinMain@16 ': D:/Projects/cyau/cyau_pre4_20120226/cyau_main.cpp:65: undefined reference to ` GdiplusStartup@12 ' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccjX3mCb.o: In function `Z15ExitApplicationP6HWND__jjl': D:/Projects/cyau/cyau_pre4_20120226/cyau_main.cpp:128: undefined reference to ` GdiplusShutdown@4 '
And what's wrong with that? Is there anything else I need?
Thanks for the help...
source share