[odb-users] Re: segmentation error on the hello example(w.r.t auto_ptr<database> db (new odb::mysql::database (argc, argv));)

ys C youngsunhere at gmail.com
Wed Mar 24 09:56:44 EDT 2021


*auto_ptr<database> db (new odb::mysql::database (argc, argv));)*

*->Sorry, please ignore the extra ) at the end, it was my typo while
writing this email!.*



On Wed, Mar 24, 2021 at 10:55 PM ys C <youngsunhere at gmail.com> wrote:

> Hi,
>
> I was able to compile the driver executable, with the following command in
> README,
>
>
> *c++ -c person-odb.cxx*
> *c++ -DDATABASE_MYSQL -c driver.cxx*
> *c++ -o driver driver.o person-odb.o -lodb-mysql -lodb*
>
> I also created the schema by,
> mysql --user=root --database=cpp_test < person.sql
> I checked that cpp_test was created with the people table.
>
> However when driver  is run as below, I get segmentation error.
>
> *./driver --user root --database cpp_test*
>
>
> My debugging only got so far as finding out that it was due to L 62 in
> *database.hxx*
>
>
> *auto_ptr<database> db (new odb::mysql::database (argc, argv));)*
>
> I am running on Ubuntu 18.04, using mysql for db, as mentioned.
> Could this be installation issue?
>
> Thanks for the help!
>
> --
> Best regards,
> Youngsun Cho
>


-- 
Best regards,
Youngsun Cho


More information about the odb-users mailing list