c++ compiler returning undefined reference when referencing "CreateBitmap()"

38 Views Asked by At

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?

0

There are 0 best solutions below