GetFileVersion Linker error
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: GetFileVersion Linker error

  1. #1
    Join Date
    Jun 2006
    Location
    Erlangen, Germany
    Posts
    57

    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

  2. #2
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: GetFileVersion Linker error

    You need to add version.lib file as input libraries

  3. #3
    Join Date
    Jun 2006
    Location
    Erlangen, Germany
    Posts
    57

    Re: GetFileVersion Linker error

    Ok.
    How can I link .lib files in my project?
    #include doesn´t work.

    Greets Hubibi

  4. #4
    Join Date
    May 2005
    Location
    Oregon
    Posts
    3,716

    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center