问题
main.cpp:
#include <iostream>
#include <cmath>
#include <windows.h>
using namespace std;
int main(){
SetPixel(NULL, 0, 0, RGB(255, 255, 255));
return 0;
}
errors:
main.cpp|6|undefined reference to `__imp_SetPixel`
ld returned 1 exit status
linked libraries: libgdi32.a
and Gdi32.dll in execution directory
compiler: GNU GCC
I'm using codeblocks
来源:https://stackoverflow.com/questions/64048724/undefined-reference-to-imp-setpixel