The appropriate build dependencies are for your project that will be
making use of the SimpleDB API. For example, if you wanted to compile
one of the examples, create an example project that depends on the
SimpleDB project and included one of the example source files in the
example project.
Some of the errors you are getting are because you are trying to
create an application without a main function. SimpleDB is just a
library and needs to be linked to an application that includes a main
function. Perhaps the other errors are also related and hopefully
creating a project as described above will fix your problems.
I'd be interested in your feedback as to weather you manage to get
this working under Windows 7 and Visual Studio 2008.
Cheers,
RW
> I am trying to develop a very simple C++ database program using SimpleDB. I am developing on Windows 7 using Microsoft Visual Studio 2008. I am familiar with SQL and everything, but I am relatively new to C++. I followed the steps in the INSTALL file up to adding the SimpleDB project file in my solution. However the next step says to "set up appropriate project dependencies and additional include directories". I did not know what dependencies there were, so I tried to go ahead and try out the "simple.cpp" example. I got the following errors:
>
> 1>------ Build started: Project: SimpleDBTest, Configuration: Debug Win32 ------
> 1>Linking...
> 1>SimpleDBTest.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall SimpleDB::Database::~Database(void)" (??1Database@SimpleDB@@UAE@XZ) referenced in function _main
> 1>SimpleDBTest.obj : error LNK2019: unresolved external symbol "public: __thiscall SimpleDB::Query::~Query(void)" (??1Query@SimpleDB@@QAE@XZ) referenced in function _main
> 1>SimpleDBTest.obj : error LNK2019: unresolved external symbol "public: bool __thiscall SimpleDB::Query::fetchRow(void)" (?fetchRow@Query@SimpleDB@@QAE_NXZ) referenced in function _main
> 1>SimpleDBTest.obj : error LNK2019: unresolved external symbol "public: void __thiscall SimpleDB::Query::execute(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?execute@Query@SimpleDB@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main
> 1>SimpleDBTest.obj : error LNK2019: unresolved external symbol "public: void __thiscall SimpleDB::Query::bind(class SimpleDB::Column * * const,int)" (?bind@Query@SimpleDB@@QAEXQAPAVColumn@2@H@Z) referenced in function _main
> 1>SimpleDBTest.obj : error LNK2019: unresolved external symbol "public: __thiscall SimpleDB::IntColumn::IntColumn(void)" (??0IntColumn@SimpleDB@@QAE@XZ) referenced in function _main
> 1>SimpleDBTest.obj : error LNK2019: unresolved external symbol "public: __thiscall SimpleDB::Query::Query(class SimpleDB::Database &)" (??0Query@SimpleDB@@QAE@AAVDatabase@1@@Z) referenced in function _main
> 1>SimpleDBTest.obj : error LNK2019: unresolved external symbol "public: __thiscall SimpleDB::Database::Database(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,enum SimpleDB::Database::ConnectionMethod)" (??0Database@SimpleDB@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4ConnectionMethod@01@@Z) referenced in function _main
> 1>SimpleDBTest.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall SimpleDB::Column::~Column(void)" (??1Column@SimpleDB@@UAE@XZ) referenced in function "public: virtual __thiscall SimpleDB::IntColumn::~IntColumn(void)" (??1IntColumn@SimpleDB@@UAE@XZ)
> 1>C:\Users\Brad\Documents\Visual Studio 2008\Projects\SimpleDBTest\Debug\SimpleDBTest.exe : fatal error LNK1120: 9 unresolved externals
>
> I figure this is because of those dependencies I am missing. What are they? Or is there some other reason there are unresolved externals?
>
> Thank you,
> Brad Justice
|