LINK : warning LNK4089: all references to "GDI32.dll" discarded by /OPT:REF
The warning means that your program contains functions that call GDI, but the functions are never called, so the link to GDI is never actually used. For exmaple, this program will raise the
warning:
void CallGDI() { GetStockObject(WHITE_BRUSH); }
int main(int argc, char**argv) { // notice that this function never calls the CallGDI function return 1; }
The linker is saying, "Um, you wrote some functions that use GDI, but you never called those functions, so I'm not sure what you're trying to do here."