I just tried building a windows program in mingw. I built mingw & msys off of auto installing exes.
It doesnt seem to be a library issue per-se. Rather, it seems the library is missing some definitions. I would put this in the C++ board/Windows board, but it seems more a problem with mingw.
Code:
C:/DOCUME~1/USER1~1/LOCALS~1/Temp/ccmqbaaa.o(.text+0x57):rpg.cpp: undefined reference to `DeleteObject@4'
C:/DOCUME~1/USER1~1/LOCALS~1/Temp/ccmqbaaa.o(.text+0xf0):rpg.cpp: undefined reference to `CreateCompatibleDC@4'
C:/DOCUME~1/USER1~1/LOCALS~1/Temp/ccmqbaaa.o(.text+0x10a):rpg.cpp: undefined reference to `SelectObject@8'
C:/DOCUME~1/USER1~1/LOCALS~1/Temp/ccmqbaaa.o(.text+0x12c):rpg.cpp: undefined reference to `GetObjectA@12'
C:/DOCUME~1/USER1~1/LOCALS~1/Temp/ccmqbaaa.o(.text+0x177):rpg.cpp: undefined reference to `BitBlt@36'
C:/DOCUME~1/USER1~1/LOCALS~1/Temp/ccmqbaaa.o(.text+0x18c):rpg.cpp: undefined reference to `SelectObject@8'
C:/DOCUME~1/USER1~1/LOCALS~1/Temp/ccmqbaaa.o(.text+0x19a):rpg.cpp: undefined reference to `DeleteDC@4'
It only bugs me about my paint procedures. But, not all of them seem to be bugged. Its a weird issue, it says nothing else. No missing libraries, nothing.
Heres my bugged code for reference:
Code:
case WM_CREATE:
ScreenDisplay_Object = LoadBitmap(GetModuleHandle(NULL),"C:\\ball.bmp");
if(ScreenDisplay_Object == NULL)
MessageBox(hwnd, "Could not load object!", "Error", MB_OK | MB_ICONEXCLAMATION);
break;
case WM_PAINT: {
BITMAP bm;
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hwnd, &ps); // 31
HDC hdcMem = CreateCompatibleDC(hdc);
HBITMAP hbmOld = (HBITMAP)SelectObject(hdcMem, ScreenDisplay_Object); //34
GetObject(ScreenDisplay_Object, sizeof(bm), &bm);
BitBlt(hdc, 0, 0, bm.bmWidth, bm.bmHeight, hdcMem, 0, 0, SRCCOPY);
SelectObject(hdcMem, hbmOld);
DeleteDC(hdcMem);
EndPaint(hwnd, &ps);
}
break;
default:
return DefWindowProc(hwnd, msg, wParam, lParam);
}
I looked in the mingw wiki / documentation. It didint mention this :/. Anyone have mingw do the same thing to them?