Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

[Linker Error] Error: Unresolved external SQLSetPos.... (borland c++)

I now have the linker error
[Linker Error] Error: Unresolved external 'SQLSetPos' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\RESULTSET.OBJ
I have sql.h but think there may be a lib file I am missing or not including?
anybody know?
[275 byte] By [Chris H Baker] at [2007-11-11 10:11:58]
# 1 Re: [Linker Error] Error: Unresolved external SQLSetPos.... (borland c++)
Try including odbc32.lib to your project settings.
dcwexter at 2007-11-11 20:59:21 >
# 2 Re: [Linker Error] Error: Unresolved external SQLSetPos.... (borland c++)
Hi that helped and got rid of 30 errors...

... but if you have the time can you please shed some light on these....

I'm getting about 80 of these...

[C++ Warning] ??.cpp(?): W8058 Cannot create pre-compiled header: write failed

And these...

[Linker Error] Error: Unresolved external 'std::_BADOFF' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\ERRORHANDLER.OBJ
[Linker Error] Error: Unresolved external 'std::_Fpz' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\ERRORHANDLER.OBJ
[Linker Error] Error: Unresolved external '__Unlocksyslock' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\ERRORHANDLER.OBJ
[Linker Error] Error: Unresolved external '__Locksyslock' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\ERRORHANDLER.OBJ
[Linker Error] Error: Unresolved external 'std::_String_base::_Xlen() const' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\DM_LINGUSERVER.OBJ
[Linker Error] Error: Unresolved external 'std::_String_base::_Xran() const' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\LINGUBOTSERVER.OBJ
[Linker Error] Error: Unresolved external 'std::locale::id::_Id_cnt' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\ERRORHANDLER.OBJ
[Linker Error] Error: Unresolved external 'std::locale::_Getfacet(unsigned int) const' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\ERRORHANDLER.OBJ
[Linker Error] Error: Unresolved external 'std::_Locinfo::~_Locinfo()' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\ERRORHANDLER.OBJ
[Linker Error] Error: Unresolved external 'std::_Locinfo::_Locinfo(const char *)' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\ERRORHANDLER.OBJ
[Linker Error] Error: Unresolved external 'std::locale::facet::_Register()' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\ERRORHANDLER.OBJ
[Linker Error] Error: Unresolved external 'std::ios_base::_Init()' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\ERRORHANDLER.OBJ
[Linker Error] Error: Unresolved external '__Getctyptab' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\ERRORHANDLER.OBJ
[Linker Error] Error: Unresolved external 'std::ios_base::clear(std::_Iosb<int>::_Iostate, bool)' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\ERRORHANDLER.OBJ
[Linker Error] Error: Unresolved external 'std::ios_base::_Addstd()' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\ERRORHANDLER.OBJ
[Linker Error] Error: Unresolved external 'std::_Fiopen(const char *, std::_Iosb<int>::_Openmode, int)' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\ERRORHANDLER.OBJ
[Linker Error] Error: Unresolved external '_gzopen' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\KFILE.OBJ
[Linker Error] Error: Unresolved external '_gzgets' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\KFILE.OBJ
[Linker Error] Error: Unresolved external '_gzeof' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\KFILE.OBJ
[Linker Error] Error: Unresolved external '_gzclose' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\KFILE.OBJ
[Linker Error] Error: Unresolved external 'std::ExeOrDllPath(const kstring&)' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\HTTPHANDLER.OBJ
[Linker Error] Error: Unresolved external 'localtime_r(const long *, std::tm *)' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\KDATE.OBJ
[Linker Error] Error: Unresolved external '_gzputs' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\KFILE.OBJ
[Linker Error] Error: Unresolved external '__Stoulx' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\SAVER.OBJ
[Linker Error] Error: Unresolved external '__Stolx' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\SAVER.OBJ
[Linker Error] Error: Unresolved external '__Stollx' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\SAVER.OBJ
[Linker Error] Error: Unresolved external '__Stoullx' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\SAVER.OBJ
[Linker Error] Error: Unresolved external '__Stofx' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\SAVER.OBJ
[Linker Error] Error: Unresolved external '__Stodx' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\SAVER.OBJ
[Linker Error] Error: Unresolved external '__Stoldx' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\SAVER.OBJ
[Linker Error] Error: Unresolved external 'std::strstreambuf::seekoff(long, std::_Iosb<int>::_Seekdir, std::_Iosb<int>::_Openmode)' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\SCRIPTPARSER.OBJ
[Linker Error] Error: Unresolved external 'std::strstreambuf::seekpos(std::fpos<int>, std::_Iosb<int>::_Openmode)' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\SCRIPTPARSER.OBJ
[Linker Error] Error: Unresolved external 'std::strstreambuf::_Init(int, char *, char *, int)' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\SCRIPTPARSER.OBJ
[Linker Error] Error: Unresolved external 'CScriptScanner::StringToTable(kstring)' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\SCRIPTSCANNER_GEN.OBJ
[Linker Error] Error: Unresolved external 'CScriptScanner::Init()' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\SCRIPTPARSER.OBJ
[Linker Error] Error: Unresolved external 'odbc::ErrorHandler::_checkErrorODBC3(long, void *, short, const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\PREPAREDSTATEMENT.OBJ
[Linker Error] Error: Unresolved external 'SQLSetStmtAttr' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\STATEMENT.OBJ
[Linker Error] Error: Unresolved external 'odbc::ErrorHandler::~ErrorHandler()' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\RESULTSET.OBJ
[Linker Error] Error: Unresolved external 'odbc::ErrorHandler::clearWarnings()' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\STATEMENT.OBJ
[Linker Error] Error: Unresolved external 'odbc::ErrorHandler::ErrorHandler(bool)' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\RESULTSET.OBJ
[Linker Error] Error: Unresolved external 'SQLColAttribute' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\RESULTSETMETADATA.OBJ
[Linker Error] Error: Unresolved external 'SQLGetStmtAttr' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\STATEMENT.OBJ
[Linker Error] Error: Unresolved external 'SQLFreeHandle' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\STATEMENT.OBJ
[Linker Error] Error: Unresolved external 'SQLAllocHandle' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\DRIVERMANAGER.OBJ
[Linker Error] Error: Unresolved external 'SQLSetEnvAttr' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\DRIVERMANAGER.OBJ
[Linker Error] Error: Unresolved external 'SQLSetConnectAttr' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\CONNECTION.OBJ
[Linker Error] Error: Unresolved external 'SQLFetchScroll' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\RESULTSET.OBJ
[Linker Error] Error: Unresolved external 'SQLGetConnectAttr' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\CONNECTION.OBJ
[Linker Error] Error: Unresolved external 'SQLEndTran' referenced from C:\PROJECTS\WS_B\SERVER\VERSION.EXE\OBJ\CONNECTION.OBJ
[Linker Error] Error: Unresolved external '__fastcall Graphics::TFont::SetColor(Graphics::TColor)' referenced from C:\PROGRAM FILES\BORLAND CBUILDER6 EVALUATION\INSTALL\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\CGAUGES.CPP
[Linker Error] Error: Unresolved external '__fastcall System::LoadResourceString(const System::ResourceString * const)' referenced from C:\PROGRAM FILES\BORLAND CBUILDER6 EVALUATION\INSTALL\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\CGAUGES.CPP
Chris H Baker at 2007-11-11 21:00:21 >
# 3 Re: [Linker Error] Error: Unresolved external SQLSetPos.... (borland c++)
Chris, these are allo linkage errors, not compilation errors. This means that the project still misses one or more .lib or .obj files that contain the definitions (as opposed to declarations, which are placed in header files) of these symbols. Some of these apprea to be standard I/O components, so you need to make sure that your linker knows where the relevant CRTs are located (however, I suspect that the project uses outdated standard features, and that the current standard librray components override these classes and functions, hence the linker error). The rest of the symbols have to do with ODBC and SQL, so you need to locate (or install!) these binaries too.
Danny at 2007-11-11 21:01:16 >
# 4 Re: [Linker Error] Error: Unresolved external SQLSetPos.... (borland c++)
I don't suppose anybody can tell (off the top of their head) which libs they might be?
Chris H Baker at 2007-11-11 21:02:16 >
# 5 Re: [Linker Error] Error: Unresolved external SQLSetPos.... (borland c++)
You want to start with odbc32.lib and vcl.lib
Normally, they should be under C:\Program Files\Borland\CBuilder4\Lib
Danny at 2007-11-11 21:03:26 >