Hello,

I'm new to SOCI and looking for some help on getting it working with
Visual Studio 2005. I've downloaded "soci-3.1.0.zip", built it with
CMake and got some dll's (not even sure why, I need only header and
resource files?) and tried to build the VS2005 project...

After building very simple example:

#include "soci.h"
#include "soci-postgresql.h"
#include <iostream>
#include <exception>
#include <string>

using namespace soci;
using namespace std;

int main()
{
    try
    {
                string some_connect_string;
        session sql(postgresql, some_connect_string);
    }
    catch (exception const &e)
    {
        cerr << "Error: " << e.what() << '\n';
    }
}

I receive LNK2019 and LNK2001 errors:

1>main.obj : error LNK2019: unresolved external symbol "public:
__thiscall soci::session::~session(void)" (??1session@soci@@QAE@XZ)
referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public:
__thiscall soci::session::session(struct soci::backend_factory const
&,class std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &)"
(??0session@soci@@QAE@ABUbackend_factory@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
referenced in function _main
1>main.obj : error LNK2001: unresolved external symbol "struct
soci::postgresql_backend_factory const soci::postgresql"
(?postgresql@soci@@3Upostgresql_backend_factory@1@B)

I'm quite sure that the problem lies in my project properties, could
somebody help me in setting my VS2005 project to work with SOCI? Maybe
there is a web article describing this issue?

Thanks in advance,
Mat

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to