[odb-users] Compile Error using Hello Example

Sukhbir Singh linux_sle at yahoo.co.uk
Thu Jul 19 14:05:56 EDT 2012


From: Boris Kolpackov <boris at codesynthesis.com>

To: Sukhbir Singh <linux_sle at yahoo.co.uk> 
Cc: "odb-users at codesynthesis.com" <odb-users at codesynthesis.com> 
Sent: Thursday, 19 July 2012, 8:41
Subject: Re: [odb-users] Compile Error using Hello Example
 
Hi Sukhbir,

Sukhbir Singh <linux_sle at yahoo.co.uk> writes:

> This error also results if the example in "hello" folder is compiled 
> following the instructions in the manual. Running "c++ -c person-odb.cxx"
> compiles with no error. However, running "c++ -c driver.cxx" results in
> an error with the message 'db' is out of scope.

Can you show the complete error message that you see (i.e., everything
from the "c++ -c driver.cxx" command until the shell prompt).

The output is:

1) sudhir at LinuxServer:~/Downloads/dump/odb/odb-examples-2.0.0/hello> c++ -c driver.cxx
2) In file included from driver.cxx:10:0:
2) database.hxx: In function ‘std::auto_ptr<odb::database> create_database(int&, char**)’:
2) database.hxx:89:10: error: ‘db’ was not declared in this scope


Also, can you send the output of these two commands:

c++ --version

c++ (SUSE Linux) 4.6.2
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

g++ --version

g++ (SUSE Linux) 4.6.2
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Hope this helps.


More information about the odb-users mailing list