Errors when executing linked program

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamesGE
    New Member
    • Apr 2008
    • 1

    Errors when executing linked program

    HI i have inherited a Tool at work and when i go to compile this is the errors i am getting

    Linking...
    Creating library ..\..\..\VCProj ect32\common\Dl ls_Libs/Release/dsdev32.lib and object ..\..\..\VCProj ect32\common\Dl ls_Libs/Release/dsdev32.exp
    devices.lib(Dev ices.obj) : error LNK2001: unresolved external symbol "public: int __thiscall CSQL::BindStrin g(char *,int,int,int)" (?BindString@CS QL@@QAEHPADHHH@ Z)
    devices.lib(dev defdl.obj) : error LNK2001: unresolved external symbol "public: int __thiscall CSQL::BindStrin g(char *,int,int,int)" (?BindString@CS QL@@QAEHPADHHH@ Z)
    devices.lib(DEV DICT.OBJ) : error LNK2001: unresolved external symbol "public: int __thiscall CSQL::BindStrin g(char *,int,int,int)" (?BindString@CS QL@@QAEHPADHHH@ Z)
    C:\VCProject32\ common\Dlls_Lib s\Release/dsdev32.dll : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.


    I have link all the .lib files and all of the setting seem to be correct.
  • pootle
    New Member
    • Apr 2008
    • 68

    #2
    Originally posted by jamesGE
    HI i have inherited a Tool at work and when i go to compile this is the errors i am getting

    Linking...
    Creating library ..\..\..\VCProj ect32\common\Dl ls_Libs/Release/dsdev32.lib and object ..\..\..\VCProj ect32\common\Dl ls_Libs/Release/dsdev32.exp
    devices.lib(Dev ices.obj) : error LNK2001: unresolved external symbol "public: int __thiscall CSQL::BindStrin g(char *,int,int,int)" (?BindString@CS QL@@QAEHPADHHH@ Z)
    devices.lib(dev defdl.obj) : error LNK2001: unresolved external symbol "public: int __thiscall CSQL::BindStrin g(char *,int,int,int)" (?BindString@CS QL@@QAEHPADHHH@ Z)
    devices.lib(DEV DICT.OBJ) : error LNK2001: unresolved external symbol "public: int __thiscall CSQL::BindStrin g(char *,int,int,int)" (?BindString@CS QL@@QAEHPADHHH@ Z)
    C:\VCProject32\ common\Dlls_Lib s\Release/dsdev32.dll : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.


    I have link all the .lib files and all of the setting seem to be correct.

    Hi James,

    The error is quite clear, the linker is complaining because it cannot find the definitions of the mentioned symbols. Are you sure you have the linker settings correct? Check that all .lib files are specified, but also check that the linker can find the .lib files (library path).

    Regards.

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      Not only must the lib files be listed as linker input in the project properties, the paths to those libraries must be defined as addtional linker dependencies in the project properties.

      Comment

      Working...