FAQ
A header that is needed by the examples is not included. Trying to compile
the first example results in error...

$ g++ -o resetdb resetdb.cpp
resetdb.cpp:30:21: fatal error: cmdline.h: No such file or directory
compilation terminated.

I copied all of /usr/share/doc/libmysql++-doc/
examples to a directory in my home.

At first I thought this was a shortfall of the debian package. So I got
MySQL++ 3.0 from the project website and noticed the example is missing in
your tarball and so the problem (amazingly) isn't downstream.

I really hope someone can provide me with everything I need to use the
examples. Also trying to build your tarball on Debian Wheezy (testing)
produced the following errors...

$ make
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_beemutex.o -I.
-fPIC -DPIC -I/usr/include/mysql -g -O2 ./lib/beemutex.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_cmdline.o -I.
-fPIC -DPIC -I/usr/include/mysql -g -O2 ./lib/cmdline.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_connection.o -I.
-fPIC -DPIC -I/usr/include/mysql -g -O2 ./lib/connection.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_cpool.o -I. -fPIC
-DPIC -I/usr/include/mysql -g -O2 ./lib/cpool.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_datetime.o -I.
-fPIC -DPIC -I/usr/include/mysql -g -O2 ./lib/datetime.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_dbdriver.o -I.
-fPIC -DPIC -I/usr/include/mysql -g -O2 ./lib/dbdriver.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_field_names.o -I.
-fPIC -DPIC -I/usr/include/mysql -g -O2 ./lib/field_names.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_field_types.o -I.
-fPIC -DPIC -I/usr/include/mysql -g -O2 ./lib/field_types.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_manip.o -I. -fPIC
-DPIC -I/usr/include/mysql -g -O2 ./lib/manip.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_myset.o -I. -fPIC
-DPIC -I/usr/include/mysql -g -O2 ./lib/myset.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_mysql++.o -I.
-fPIC -DPIC -I/usr/include/mysql -g -O2 ./lib/mysql++.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_mystring.o -I.
-fPIC -DPIC -I/usr/include/mysql -g -O2 ./lib/mystring.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_null.o -I. -fPIC
-DPIC -I/usr/include/mysql -g -O2 ./lib/null.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_options.o -I.
-fPIC -DPIC -I/usr/include/mysql -g -O2 ./lib/options.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_qparms.o -I. -fPIC
-DPIC -I/usr/include/mysql -g -O2 ./lib/qparms.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_query.o -I. -fPIC
-DPIC -I/usr/include/mysql -g -O2 ./lib/query.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_result.o -I. -fPIC
-DPIC -I/usr/include/mysql -g -O2 ./lib/result.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_row.o -I. -fPIC
-DPIC -I/usr/include/mysql -g -O2 ./lib/row.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_scopedconnection.o
-I. -fPIC -DPIC -I/usr/include/mysql -g -O2 ./lib/scopedconnection.cpp
/home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_sql_buffer.o -I.
-fPIC -DPIC -I/usr/include/mysql -g -O2 ./lib/sql_buffer.cpp
In file included from ./lib/sql_buffer.h:31:0,
from ./lib/sql_buffer.cpp:26:
./lib/refcounted.h:258:2: error: ‘size_t’ does not name a type
./lib/refcounted.h: In constructor ‘mysqlpp::RefCountedPointer<T,
Destroyer>::RefCountedPointer()’:
./lib/refcounted.h:89:2: error: class ‘mysqlpp::RefCountedPointer<T,
Destroyer>’ does not have any field named ‘refs_’
./lib/refcounted.h: In constructor ‘mysqlpp::RefCountedPointer<T,
Destroyer>::RefCountedPointer(T*)’:
./lib/refcounted.h:100:2: error: class ‘mysqlpp::RefCountedPointer<T,
Destroyer>’ does not have any field named ‘refs_’
./lib/refcounted.h:104:4: error: ‘refs_’ was not declared in this scope
./lib/refcounted.h:104:16: error: expected type-specifier before ‘size_t’
./lib/refcounted.h:104:16: error: expected ‘;’ before ‘size_t’
./lib/refcounted.h: In constructor ‘mysqlpp::RefCountedPointer<T,
Destroyer>::RefCountedPointer(const ThisType&)’:
./lib/refcounted.h:112:2: error: class ‘mysqlpp::RefCountedPointer<T,
Destroyer>’ does not have any field named ‘refs_’
./lib/refcounted.h:115:8: error: ‘refs_’ was not declared in this scope
./lib/refcounted.h: In destructor ‘mysqlpp::RefCountedPointer<T,
Destroyer>::~RefCountedPointer()’:
./lib/refcounted.h:125:7: error: ‘refs_’ was not declared in this scope
./lib/refcounted.h: In member function ‘void mysqlpp::RefCountedPointer<T,
Destroyer>::swap(mysqlpp::RefCountedPointer<T, Destroyer>::ThisType&)’:
./lib/refcounted.h:246:13: error: ‘refs_’ was not declared in this scope
make: *** [mysqlpp_sql_buffer.o] Error 1

John Tate

--
www.johntate.org

Search Discussions

  • Chris Morgan at Dec 17, 2011 at 6:34 am
    On Fri, Dec 16, 2011 at 22:14, John Tate wrote:
    <snip>
    /home/john/build/mysql++-3.1.0/bk-deps g++ -c -o mysqlpp_sql_buffer.o -I.
    -fPIC -DPIC -I/usr/include/mysql -g -O2 ./lib/sql_buffer.cpp
    In file included from ./lib/sql_buffer.h:31:0,
    from ./lib/sql_buffer.cpp:26:
    ./lib/refcounted.h:258:2: error: ‘size_t’ does not name a type
    <snip>
    See this thread (and many others):

    http://lists.mysql.com/plusplus/9215
  • Warren Young at Dec 17, 2011 at 9:59 am

    On Dec 16, 2011, at 11:14 PM, John Tate wrote:

    A header that is needed by the examples is not included. Trying to compile
    the first example results in error...

    $ g++ -o resetdb resetdb.cpp
    resetdb.cpp:30:21: fatal error: cmdline.h: No such file or directory
    compilation terminated.
    cmdline.h isn't part of the examples, it's part of the library proper. So, you're probably missing a -I flag for the MySQL++ header directory.

    This is a Frequently Asked Question:

    http://tangentsoft.net/mysql++/#hownottobuild

    That directory you copied should have contained a Makefile that handles all this for you.


    --
    MySQL++ Mailing List
    For list archives: http://lists.mysql.com/plusplus
    To unsubscribe: http://lists.mysql.com/plusplus

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupplusplus @
categoriesmysql
postedDec 17, '11 at 6:15a
activeDec 17, '11 at 9:59a
posts3
users3
websitemysql.com
irc#mysql

People

Translate

site design / logo © 2022 Grokbase