-
August 28th, 2006, 11:33 AM
#1
GetFileVersion Linker error
Hi,
in my application i try to read the file version of an .exe file.
If i try to compile i receive this error:
Code:
1>PICSAnalyseReport.obj : error LNK2019: reference to a undefined external symbol "_GetFileVersionInfoA@16" in Funktion ""public: class ATL::CStringT<char,class StrTraitMFC<char,class ATL::ChTraitsCRT<char> > > __thiscall CPICSAnalyseReport::GetPICSProgramVersion(int)" (?GetPICSProgramVersion@CPICSAnalyseReport@@QAE?AV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@H@Z)".
How can I handle this?
I use Visual Studio 2005 and mfc.
thanks for your efforts.
Greets Hubibi
-
August 28th, 2006, 12:00 PM
#2
Re: GetFileVersion Linker error
You need to add version.lib file as input libraries
-
August 29th, 2006, 02:59 AM
#3
Re: GetFileVersion Linker error
Ok.
How can I link .lib files in my project?
#include doesn´t work.
Greets Hubibi
-
August 29th, 2006, 03:25 AM
#4
Re: GetFileVersion Linker error
you can use
Code:
#pragma comment(lib, "version.lib")
The above pragma causes the linker to search for the version.lib library while linking. The
linker searches first in the current working directory and then in the path specified in the LIB
environment variable.
thanx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|