suityou01 wrote:
Hi, I need to call the GetFileVersionInfoSize api from a C application. The above API is defined in Windows.h which is included and I also have to include the Version.lib. I have included both and yet when I compile I get a linker error "C:\Users\Admin\AppData\Local\Temp/cc6uH1bk.o:util.c:(.text+0x6e): undefined refe rence to `GetFileVersionInfoSizeA@8' collect2: ld returned 1 exit status" Which looks like its not picking up the lib. Can anyone give some tips on how to successfully include windows libs and reference apis?
You have to link against the appropriate import library. If that routine is not part of the default C runtime find out which DLL it's in and add that to your link statement.
[This is also not a gcc-help question] Tom