List:MySQL++« Previous MessageNext Message »
From:kwerickson Date:January 11 2012 5:30am
Subject:RE: new to mysql++, can't get example database set up
View as plain text  
I uninstalled the ubuntu packages and downloaded the tarball and extracted it into my user
directory.

I ran ./configure, then make, but got the error:


{info about file ~/mysql++3.1.0/lib/refcounted.h}
./lib/refcounted.h:246:13: error: 'refs_' was not declared in this scope
make: *** [mysqlpp_sql_buffer.o] Error 1

I looked around and found that someone had this problem (or a problem like it) in
september, and the recommended fix was adding #include <stddef.h> to refcounted.h
and #include <cstring> to genv2.cpp. I implemented the same fix, but I am now
running into an error:

//cut out several lines of what looks like things going smoothly
./libmysqlpp_ssqls2parse.a(ssqls2parse_parsev2.o): In function `Type':
/home/~/mysql++-3.1.0/./ssx/parsev2.cpp:256: undefined reference to
`mysqlpp::internal::str_to_lwr(std::basic_string<char, std::char_traits<char>,
std::allocator<char> >&)'
./libmysqlpp_ssqls2parse.a(ssqls2parse_parsev2.o): In function
`ParseV2::Field::parse(std::vector<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::allocator<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > const&, bool, ParseV2::File const&)':
/home/~/mysql++-3.1.0/./ssx/parsev2.cpp:192: undefined reference to
`mysqlpp::internal::str_to_lwr(std::basic_string<char, std::char_traits<char>,
std::allocator<char> >&)'
./libmysqlpp_ssqls2parse.a(ssqls2parse_parsev2.o): In function
`ParseV2::Option::parse_bool(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)':
/home/~/mysql++-3.1.0/./ssx/parsev2.cpp:579: undefined reference to
`mysqlpp::internal::str_to_lwr(std::basic_string<char, std::char_traits<char>,
std::allocator<char> >&)'
./libmysqlpp_ssqls2parse.a(ssqls2parse_parsev2.o): In function
`ParseV2::Table::parse(std::vector<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::allocator<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > const&, bool, ParseV2::File const&)':
/home/~/mysql++-3.1.0/./ssx/parsev2.cpp:625: undefined reference to
`mysqlpp::internal::str_to_lwr(std::basic_string<char, std::char_traits<char>,
std::allocator<char> >&)'
./libmysqlpp_ssqls2parse.a(ssqls2parse_parsev2.o): In function
`ParseV2::Line::parse(std::vector<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::allocator<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > const&, bool, ParseV2::File const&)':
/home/~/mysql++-3.1.0/./ssx/parsev2.cpp:496: undefined reference to
`mysqlpp::internal::str_to_lwr(std::basic_string<char, std::char_traits<char>,
std::allocator<char> >&)'
collect2: ld returned 1 exit status
make: *** [test_ssqls2] Error 1

I looked around and found someone had that kind of problem on a windows setup august 2010,
but I didn't see anything about a clear fix for it. I can't make heads nor tails of the
problem.


________________________________
From: John Tate [john@stripped]
Sent: Saturday, January 07, 2012 8:43 PM
To: kwerickson
Cc: plusplus@stripped
Subject: Re: new to mysql++, can't get example database set up



On Sun, Jan 8, 2012 at 8:13 AM, kwerickson
<kwerickson@stripped<mailto:kwerickson@stripped>> wrote:
As the subject says, I'm trying to get the example database setup, but the only signs of
exrun or resetdb that I can find is a file called resetdb.cpp in
/usr/share/doc/libmysql++-doc/examples/

I looked around on the archives to see if I could find some help and it looks like I might
need to compile resetdb.cpp, but I think I'm running into the same problem someone else
(John Tate?) is having, and I have no idea where this '-I' is supposed to go (in the
compiling command, somewhere in resetdb.cpp, or in another file? ).

The examples shipped with distributions dont work, the examples are designed to be ran
from the directory where the source is. Just get the source tarball and use exrun instead
of the downstream examples which have not been modified to run there. This is because the
examples include headers from the source code that are not installed as includes nor are
they included with the downstream examples.

As I said, just use the source tarball and not distro packages and things are quite okay.


I also see no trace of a makefile. I think I found mention that there is supposed to be a
makefile somewhere.

All this and I have no idea where this exrun script is at.

I'm running kubuntu 11.10, have mysql 5.1.58 installed, and I installed mySQL++ packages
libmysql++-doc, libmysql++-dev, and libmysql++3  (all say they are version 3.1.0),
everything was installed from the standard ubuntu repositories. If this isn't the right
place to post this question, my apologies and please direct me to the proper place.



--
www.johntate.org<http://www.johntate.org>

Thread
new to mysql++, can't get example database set upkwerickson7 Jan
  • Re: new to mysql++, can't get example database set upJohn Tate8 Jan
    • RE: new to mysql++, can't get example database set upkwerickson11 Jan
      • Re: new to mysql++, can't get example database set upJohn Tate11 Jan
        • RE: new to mysql++, can't get example database set upkwerickson11 Jan
        • Re: new to mysql++, can't get example database set upWarren Young11 Jan
          • Re: new to mysql++, can't get example database set upJohn Tate11 Jan
            • Re: new to mysql++, can't get example database set upJohn Tate11 Jan
          • RE: new to mysql++, can't get example database set upkwerickson11 Jan