[odb-users] warning: ignoring #pragma db object [-Wunknown-pramas]
Menashe Rosemberg
rosemberg at ymail.com
Thu Sep 15 06:15:35 EDT 2016
Hi Boris,
Thanks for the fast response man.
I installed the odb from command line and it didn't install "apt-get install odb" and I didn't find the libodb and libobd-mysql... at least I didn't find it on my pc.
I checked the libodb-dev andlibodb-mysql-dev packages and the apt-get says I have installed the newest version.
I know I can download the libs from ODB Download, but it a good practice to keep using the Ubuntu default installation in my opinion.
|
|
|
| | |
|
|
|
| |
ODB Download
ODB download page | |
|
|
Can you help with that? And how to link it using the Code::Blocks IDE?
May I suggest to include this solutions on your site? More specifically on Linux/UNIX?
I think you will reach more users if you describe step by step how to work with ODB on ubuntu/Code::Blocks environment.
Again, thanks for your attention and your work on this tool.
Best regards,
M.Rosemberg
Em Quinta-feira, 15 de Setembro de 2016 3:34, Boris Kolpackov <boris at codesynthesis.com> escreveu:
Hi Menashe,
Menashe Rosemberg <rosemberg at ymail.com> writes:
> /home/administrator/Desktop/ProjectS/ODBTest/Person.hxx|10|warning: ignoring #pragma db object [-Wunknown-pragmas]|
> /home/administrator/Desktop/ProjectS/ODBTest/Person.hxx|28|warning: ignoring #pragma db id [-Wunknown-pragmas]|
> /home/administrator/Desktop/ProjectS/ODBTest/Person.hxx|10|warning: ignoring #pragma db object [-Wunknown-pragmas]|
> /home/administrator/Desktop/ProjectS/ODBTest/Person.hxx|28|warning: ignoring #pragma db id [-Wunknown-pragmas]|
The C++ compiler should ignore ODB pragmas. They are only interpreted by the
ODB compiler. You may want to add -Wno-unknown-pragmas option to suppress
these warnings.
> obj/Debug/Person-odb.o||In function `odb::access::object_traits_impl<person, (odb::database_id)0>::grow(odb::access::object_traits_impl<person, (odb::database_id)0>::image_type&, char*)':|
> /home/administrator/Desktop/ProjectS/ODBTest/Person-odb.cxx|99|undefined reference to `odb::details::basic_buffer_base::capacity(unsigned long, unsigned long)'|
And this is your actual problem: I believe you are not linking to libodb-mysql
and libodb.
Boris
More information about the odb-users
mailing list