Hi, I'm fairly new to API's (and programming in general) and recently started on windows.
I'm attempting to use the OPENFILENAME struct, unfortunately I get an Undefined Reference error when I try to use the function GetOpenFileName: it seems that I need to link with comdlg32.lib.
I do so by specifying in "Build Options"-"Linker Settings" and Adding "..\..\..\..\..\watcom-1.3\lib386\nt\comdlg32.lib" to "Link Libraries."
However I now get this error:
..\..\..\..\..\watcom-1.3\lib386\nt\comdlg32.lib: file not recognized: File format not recognized
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 3 seconds)
0 errors, 0 warnings
Also, for learning purposes, I'd like to know if I understand this.
The reason I get undefined reference is because the header file <windows.h> only contains the declaration of the function, its definition lies inside of comdlg32.lib, which is a set of source of files put together more or less. Are these pre-compiled (already in object code, .o) and the linker just puts them together?