Lnk1104
error i have added the lib and the settings are correct
BluePin fatal error LNK1104: cannot open file '..\..\sdk\release\WidcommSdklib.lib'
i dont have any clue
[189 byte] By [
mohamed123] at [2007-11-20 1:38:37]

# 1 Re: Lnk1104
Well what can I say! Check the settings again particularly the search path. Have you added the path to the search path for library files? Pardon me if you have already done so.
# 2 Re: Lnk1104
Another options is :
1. Go to the "C/C++ - General - Additional Include directories" and add the path to your static libraries header files. Then, got to the "Linker / General / Additional Library Directories" and add the path to the static librarys .lib files.
2a. Go to "Linker / Input / Additional Dependencies" and add all the .lib files you need. ( Ex. MyLib.lib )
2b. Instead of step 2a you can use the #pragma comment(lib, "...")statement in you code file:
#pragma comment(lib, "yourstaticlib.lib")
i did all the above
it throws the same error in
VS.net 2003 and VS6.0
# 3 Re: Lnk1104
Or, maybe you can try with an absolute path (instead of a relative one).
- petter
# 4 Re: Lnk1104
This is what MSDN says about the error
Possible causes
Not enough disk space.
File does not exist. For example, you will get this error if you try to use the PGINSTRUMENT parameter to the /LTCG linker option on a machine with a 32-bit operating system.
When specifying libraries in a project's property pages dialog box, library names should be separated by spaces (and not commas).
Incorrect filename or path.
Invalid drive specification.
Insufficient file permissions.
Path for filename expands to more than 260 characters.
If the given file is named LNKn, which is a filename generated by the linker for a temporary file, the directory specified in the TMP environment variable may not exist, or more than one directory is specified for the TMP environment variable. (Only one directory path should be specified for the TMP environment variable.)
If the error message occurs for a library name, and you recently ported the .mak file from a previous Microsoft Visual C++ development system, the library may no longer be valid. Ensure that the library still exists in this circumstance.
Another program may have the file open and the linker cannot write to it.
Incorrect LIB environment variable. For information on how to update the LIB environment variable, see VC++ Directories, Projects, Options Dialog Box. Make sure any directories with libraries you need are listed here.
The linker uses temporary files in several cases. Even if you have sufficient disk space, a very large link can deplete or fragment the address space. To address this issue:
Use /opt:noref; doing transitive comdat elimination reads all the object files multiple times.
Upgrade to Windows XP.
# 5 Re: Lnk1104
As WildFrog Suggested you have to do that Only.Absolute Path.
# 6 Re: Lnk1104
i am using only absolute path
and where to use this "/opt:noref;" ?
# 7 Re: Lnk1104
Dont you have insufficient disk space? If so do this go to linker optin. Alt + F7 (vc 6.0) linker options.
# 8 Re: Lnk1104
I have attached two header files from widcomm stack from which i want to create an object myObj from class CBtIf and theres a lib called WidcommSdklib.lib
I have also attached the sample apps two file BondDialog.cpp .h which works
i dont know why when i
CBtIf btIf; declare as private in my class ( BtStart.cpp )
i get following error
inker-Vorgang luft...
BTStart.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CBtIf::~CBtIf(void)" (??1CBtIf@@UAE@XZ)
BTStartDlg.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CBtIf::~CBtIf(void)" (??1CBtIf@@UAE@XZ)
BTStartDlg.obj : error LNK2001: unresolved external symbol "public: __thiscall CBtIf::CBtIf(void)" (??0CBtIf@@QAE@XZ)
Debug/BTStart.exe : fatal error LNK1120: 2 unresolved externals
# 9 Re: Lnk1104
Hi
why is there no replies for my question ?
BTStart.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CBtIf::~CBtIf(void)" (??1CBtIf@@UAE@XZ)
BTStartDlg.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CBtIf::~CBtIf(void)" (??1CBtIf@@UAE@XZ)
BTStartDlg.obj : error LNK2001: unresolved external symbol "public: __thiscall CBtIf::CBtIf(void)" (??0CBtIf@@QAE@XZ)
Debug/BTStart.exe : fatal error LNK1120: 2 unresolved externals
Regards
mohamed
# 10 Re: Lnk1104
LNK2001 (http://msdn2.microsoft.com/en-US/library/f6xx1b1z.aspx)
Add the source code that contains the implementation of 'CBtIf::~CBtIf(void)' to your project, or change your link settings to link with the library that contains the implementation of 'CBtIf::~CBtIf(void)'.
Viggy
# 11 Re: Lnk1104
Yes i pointed to the correct header but
now a linker error from lib
WidcommSdklib.lib(BtIf.obj) : error LNK2001: unresolved external symbol _VerQueryValueA@16
# 12 Re: Lnk1104
VerQueryValue is located in 'Version.lib', so you'll have to link in that library aswell.
- petter
# 13 Re: Lnk1104
error i have added the lib and the settings are correct
BluePin fatal error LNK1104: cannot open file '..\..\sdk\release\WidcommSdklib.lib'
i dont have any clue
The problem is that the BtwLib.h file includes the library by doing:
#pragma comment(lib, "..\\..\\sdk\\release\\BtWdSdkLib.lib")
I fixed it by removing all occurences of "..\\..\\sdk\\release\\".
The resulting pragma is:
#pragma comment(lib, "BtWdSdkLib.lib")
You also need to have the location of the WidcommSdklib.lib (probably: "C:\Program Files\Widcomm\BTW DK\SDK\Release\") in the library path.