-
Link error
Hi,
I am using visual C++ Express 2005 edition.
While build the C++ project, i got those errors
1>Linking...
1>LINK : D:/Vembu/StoreGrid/bin/StoreGrid.Net.SP.exe not found or not built by the last incremental link; performing full link
1>StartStoreGridServer.obj : error LNK2019: unresolved external symbol "public: void __thiscall TimeBasedRetentionCheckThread::Initialize(void)" (?Initialize@TimeBasedRetentionCheckThread@@QAEXXZ) referenced in function "public: void __thiscall StartStoreGridServer::CallMain(void)" (?CallMain@StartStoreGridServer@@QAEXXZ)
1>StartStoreGridServer.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TimeBasedRetentionCheckThread::Run(void)" (?Run@TimeBasedRetentionCheckThread@@UAEXXZ)
1>ServerBackupObject.obj : error LNK2019: unresolved external symbol "public: void __thiscall VersionBasedRetentionCheckThread::Initialize(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int,bool,bool,long)" (?Initialize@VersionBasedRetentionCheckThread@@QAEXHV?$basic_string@DU?$char_traits@D@std@ @V?$allocator@D@2@@std@@000H_N1J@Z) referenced in function __catch$?Run@ServerBackupObject@@UAEXXZ$0
1>ServerBackupObject.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall VersionBasedRetentionCheckThread::Run(void)" (?Run@VersionBasedRetentionCheckThread@@UAEXXZ)
1>VSSApi.obj : error LNK2019: unresolved external symbol "void * __cdecl CreateVSSApiInstance(void)" (?CreateVSSApiInstance@@YAPAXXZ) referenced in function "public: void __thiscall VSSApi::Initialize(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?Initialize@VSSApi@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>VSSApi.obj : error LNK2019: unresolved external symbol "void __cdecl DeleteVSSApiInstance(void *)" (?DeleteVSSApiInstance@@YAXPAX@Z) referenced in function "public: void __thiscall VSSApi::DeInitialize(void)" (?DeInitialize@VSSApi@@QAEXXZ)
1>BackupScheduleConfiguration.obj : error LNK2019: unresolved external symbol _SQLFreeHandle@8 referenced in function "private: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall BackupScheduleConfiguration::GetBackupReportDetails(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?GetBackupReportDetails@BackupScheduleConfiguration@@AAE?AV?$basic_string@DU?$char_traits @D@std@@V?$allocator@D@2@@std@@V23@@Z)
1>DatabaseInfo.obj : error LNK2001: unresolved external symbol _SQLFreeHandle@8
1>ConnectionObject.obj : error LNK2001: unresolved external symbol _SQLFreeHandle@8
1>SQLServerLocator.obj : error LNK2001: unresolved external symbol _SQLFreeHandle@8
1>BackupScheduleConfiguration.obj : error LNK2019: unresolved external symbol _SQLFetch@4 referenced in function "private: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall BackupScheduleConfiguration::GetBackupReportDetails(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?GetBackupReportDetails@BackupScheduleConfiguration@@AAE?AV?$basic_string@DU?$char_traits @D@std@@V?$allocator@D@2@@std@@V23@@Z)
1>DatabaseInfo.obj : error LNK2001: unresolved external symbol _SQLFetch@4
1>BackupScheduler.obj : error LNK2001: unresolved external symbol _SQLFetch@4
1>BackupScheduler.obj : error LNK2001: unresolved external symbol _SQLBindCol@24
1>DatabaseInfo.obj : error LNK2001: unresolved external symbol _SQLNumResultCols@8
1>BackupScheduler.obj : error LNK2001: unresolved external symbol _SQLNumResultCols@8
1>BackupScheduleConfiguration.obj : error LNK2019: unresolved external symbol _SQLExecDirect@12 referenced in function "private: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall BackupScheduleConfiguration::GetBackupReportDetails(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?GetBackupReportDetails@BackupScheduleConfiguration@@AAE?AV?$basic_string@DU?$char_traits @D@std@@V?$allocator@D@2@@std@@V23@@Z)
1>DatabaseInfo.obj : error LNK2001: unresolved external symbol _SQLExecDirect@12
1>BackupScheduler.obj : error LNK2001: unresolved external symbol _SQLExecDirect@12
1>BackupScheduler.obj : error LNK2019: unresolved external symbol _SQLAllocHandle@12 referenced in function "public: void __thiscall BackupScheduler::UpdateBackupReport(void)" (?UpdateBackupReport@BackupScheduler@@QAEXXZ)
1>BackupScheduleConfiguration.obj : error LNK2001: unresolved external symbol _SQLAllocHandle@12
1>DatabaseInfo.obj : error LNK2001: unresolved external symbol _SQLAllocHandle@12
1>ConnectionObject.obj : error LNK2001: unresolved external symbol _SQLAllocHandle@12
1>SQLServerLocator.obj : error LNK2001: unresolved external symbol _SQLAllocHandle@12
1>ConnectionObject.obj : error LNK2001: unresolved external symbol _SQLGetDiagRec@32
1>ConnectionObject.obj : error LNK2019: unresolved external symbol _SQLDisconnect@4 referenced in function "public: int __thiscall ConnectionObject::TestConnection(void)" (?TestConnection@ConnectionObject@@QAEHXZ)
1>SQLServerLocator.obj : error LNK2001: unresolved external symbol _SQLDisconnect@4
1>ConnectionObject.obj : error LNK2019: unresolved external symbol _SQLDriverConnect@32 referenced in function "public: int __thiscall ConnectionObject::TestConnection(void)" (?TestConnection@ConnectionObject@@QAEHXZ)
1>ConnectionObject.obj : error LNK2019: unresolved external symbol _SQLSetEnvAttr@16 referenced in function "public: int __thiscall ConnectionObject::TestConnection(void)" (?TestConnection@ConnectionObject@@QAEHXZ)
1>SQLServerLocator.obj : error LNK2001: unresolved external symbol _SQLSetEnvAttr@16
1>ConnectionObject.obj : error LNK2019: unresolved external symbol _SQLGetDiagField@28 referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall ConnectionObject::GetSqlError(void *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,long,int)" (?GetSqlError@ConnectionObject@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D @2@@std@@PAXV23@JH@Z)
1>SQLServerLocator.obj : error LNK2019: unresolved external symbol _SQLBrowseConnect@24 referenced in function "public: class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > __thiscall SQLServerLocator::GetSQLServer(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?GetSQLServer@SQLServerLocator@@QAE?AV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$ allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@ std@@@2@@std@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@@Z)
1>SQLServerLocator.obj : error LNK2019: unresolved external symbol _SQLSetConnectAttr@16 referenced in function "public: class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > __thiscall SQLServerLocator::GetSQLServer(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?GetSQLServer@SQLServerLocator@@QAE?AV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$ allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@ std@@@2@@std@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@@Z)
1>D:/Vembu/StoreGrid/bin/StoreGrid.Net.SP.exe : fatal error LNK1120: 19 unresolved externals
1>Creating browse information file...
1>Microsoft Browse Information Maintenance Utility Version 8.00.50727
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Build log was saved at "file://d:\WorkingProjects\StoreGrid2.3\StoreGrid\Build\Windows\DotNet\SPEditionDeb\BuildLog.htm"
1>StoreGrid_Head - 35 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 3 up-to-date, 0 skipped ==========
how to solve that. Please explain me.
Thanks.
-
Hi,
obviously you are missing out a library, DLL or object file in your link.
You have to make sure you add this file (or files!) to your project to
link it.
If you do not know which library/DLL to add, I suggest you work backwards:
search your project for occurrences of the symbols (i.e. Initialize, CallMain, etc.)
and find out in which header the are defined. Then find the header in your
include - path and look for DLLs/LIBs in a directory in the area. It's not a
100% method, but helped me often enough.
Cheers,
D
DKyb
-------------------------------
Life is a short warm moment -
Death is the long cold rest.
Pink Floyd
-------------------------------
-
Thanks for ur information.
That two errors are solved. But the remaining errors not solved. I already include libraries and path for that.
Any idea.
Waiting for ur update.
Thanks.
-
which two errors were solved?
The linkage errors you got result from a missing lib or dll file that should have been included in the linker's list of folders. It's *not enough* to add missing headers; the headers are already included properly or else you would get compilation errors, not linkage errors. What's missing is a list of the matching .lib or .dll files that contain the functions that are declared in the header files.
Danny Kalev
-
Before that i didnot add RetentioncheckThread.cpp in my project. Now i add that cpp file in my project and the error
StartStoreGridServer.obj : error LNK2019: unresolved external symbol "public: void __thiscall TimeBasedRetentionCheckThread::Initialize(void)" (?Initialize@TimeBasedRetentionCheckThread@@QAEXXZ) referenced in function "public: void __thiscall StartStoreGridServer::CallMain(void)" (?CallMain@StartStoreGridServer@@QAEXXZ)
is solved. Now i add also the missing cpps in my project. But it's not solved
-
Before that i didnot add RetentioncheckThread.cpp in my project. Now i add that cpp file in my project and the error
StartStoreGridServer.obj : error LNK2019: unresolved external symbol "public: void __thiscall TimeBasedRetentionCheckThread::Initialize(void)" (?Initialize@TimeBasedRetentionCheckThread@@QAEXXZ) referenced in function "public: void __thiscall StartStoreGridServer::CallMain(void)" (?CallMain@StartStoreGridServer@@QAEXXZ)
is solved. Now i add also the missing cpps in my project. But it's not solved
Similar Threads
-
By mesh2005 in forum .NET
Replies: 1
Last Post: 03-06-2006, 09:16 AM
-
By Vicki Wysocki in forum Database
Replies: 0
Last Post: 10-25-2002, 02:55 PM
-
By clarence_rollins in forum .NET
Replies: 21
Last Post: 09-11-2002, 11:32 AM
-
By Patrick Comeau in forum VB Classic
Replies: 6
Last Post: 03-22-2001, 11:50 PM
-
By Murray Foxcroft in forum Web
Replies: 5
Last Post: 11-02-2000, 03:42 AM
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
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|