Dustin Berkley
Dustin Berkley

Reputation: 52

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?

Upvotes: 0

Views: 37

Answers (0)

Related Questions