2 years ago
#12589

Dusty Berkley
c++ compiler returning undefined reference when referencing "CreateBitmap()"
I am very new to c++ and I cant seem to get this code to work:
#include <iostream>
#include <windows.h>
using namespace std;
int main() {
HBITMAP hbm = CreateBitmap(100, 100, 1, 24, NULL);
return 0;
}
The console outputs: "undefined reference to `__imp_CreateBitmap'" whenever I try to compile it. Am I forgetting a #include statement or is it something else?
c++
undefined-reference
hbitmap
createbitmap
0 Answers
Your Answer