iwongu / sqlite3pp

SQLite3++ - C++ wrapper of SQLite3 API
MIT License
609 stars 177 forks source link

Compiling on Ubuntu error #41

Closed pabloaotero closed 7 years ago

pabloaotero commented 7 years ago

Hi! Nice library. I have used it on windows (VS 2015) and now I'm using on Ubuntu (Netbeans 8.1). When I try to compile it i get this error:

sqlite3pp.h:191:40: error: call of overloaded ‘bind(int&, long int&)’ is ambiguous

Any idea about it?

Thank you very much.

ntfshard commented 7 years ago

Hello

As far as I understand you trying to call operator << with variable type=long int; As you can see in sqlite3pp.h:147-163 there are no overload for int, long int

You can try to use static_cast<int>(your_variable)

BTW do you really need in a long modifier? It could lead to some compatibility issues. On the http://en.cppreference.com/w/cpp/language/types page you can found that a long int has at least 32 bit on Win32/64 && Linux32 except Linux64.

iwongu commented 7 years ago

Try 'long long int' or 'int' instead of 'long int'. Sorry for very late response.