Author: mysqlpp
Date: Sat Dec 29 02:46:38 2007
New Revision: 2046
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2046&view=rev
Log:
Reworked the userman section on running the examples (exrun and such)
for clarity.
Modified:
trunk/doc/userman/userman.dbx
Modified: trunk/doc/userman/userman.dbx
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/doc/userman/userman.dbx?rev=2046&r1=2045&r2=2046&view=diff
==============================================================================
--- trunk/doc/userman/userman.dbx (original)
+++ trunk/doc/userman/userman.dbx Sat Dec 29 02:46:38 2007
@@ -339,14 +339,14 @@
<sect2>
<title>Running the Examples</title>
- <para>All of the examples are complete running programs. If
- you built the library from source, the examples should
- have been built as well. If you installed it via the RPM
- package, the example source code and a simplified Makefile
- is in the examples subdirectory of the mysql++-devel
- package's documentation directory. (This is usually
- <filename>/usr/share/doc/mysql++-devel-*</filename>, but it can
- vary on different Linuxes.)</para>
+ <para>All of the examples are complete running programs. If you
+ built the library from source, the examples should have been built
+ as well. If you use RPMs instead, the example programs' source code
+ and a simplified <filename>Makefile</filename> are in the
+ <filename>mysql++-devel</filename> package. They are typically
+ installed in
+ <filename>/usr/share/doc/mysql++-devel-*/examples</filename>, but it
+ can vary on different Linuxes.</para>
<para>Before you get started, please read through any of the
<filename>README*</filename> files included with the MySQL++
@@ -354,22 +354,33 @@
all of that here.</para>
<para>Most of the examples require a test database, created by
- <filename>resetdb</filename>. You run it like so:</para>
-
- <screen> ./exrun resetdb [-s server_addr] [-u user] [-p
password]</screen>
-
- <para><filename>exrun</filename> is a shell script that ensures
- that the MySQL++ example program you give as its first argument
- finds the correct shared library version. If you run the example
- program directly, it will search the system directories for the
- MySQL++ shared library. That will only work correctly if you've
- installed the library before running the examples. You should
- run the examples before installing the library to ensure that the
- library is working correctly, thus <filename>exrun</filename>. See
- <filename>README.examples</filename> for more details. (We've
- been using POSIX file and path names for simplicity above, but
- there's a Windows version of <filename>exrun</filename>, called
- <filename>exrun.bat</filename>. It works the same way.)</para>
+ <filename>resetdb</filename>. You can run it like so:</para>
+
+ <screen>resetdb [-s server_addr] [-u user] [-p password]</screen>
+
+ <para>Actually, there's a problem with that. It assumes that the
+ MySQL++ library is already installed in a directory that the
+ operating system's dynamic linker can find. (MySQL++ is almost never
+ built statically.) Unless you're installing from RPMs, you've had to
+ build the library from source, and you should run at least a few of
+ the examples before installing the library to be sure it's working
+ correctly. Since your operating system's dynamic linkage system
+ can't find the MySQL++ libraries without help until they're
+ installed, we've created a few helper scripts to help run the
+ examples.</para>
+
+ <para>MySQL++ comes with the <filename>exrun</filename> shell script
+ for Unixy systems, and the <filename>exrun.bat</filename> batch file
+ for Windows. You pass the example program and its arguments to the
+ <filename>exrun</filename> helper, which sets up the library search
+ path so that it will find the as-yet uninstalled version of the
+ MySQL++ library first. So on a Unixy system, the above command
+ becomes:</para>
+
+ <screen>./exrun resetdb [-s server_addr] [-u user] [-p password]</screen>
+
+ <para>See <filename>README.examples</filename> for more
+ details.</para>
<para>All of the program arguments are optional.</para>
@@ -415,8 +426,9 @@
combination. If the name doesn't contain a colon, it uses the
default port, 3306.</para>
- <para>If you don't give <option>-u</option>, it uses your user
- name to log into the database server.</para>
+ <para>If you don't give <option>-u</option>, it assumes your user
+ name on the local machine is the same as your user name on the
+ database server.</para>
<para>If you don't give <option>-p</option>, it will assume
the MySQL user doesn't have a password, which had better not be
@@ -424,7 +436,7 @@
<para>A typical invocation is:</para>
- <screen> ./exrun resetdb -u mydbuser -p nunyabinness</screen>
+ <screen>exrun.bat resetdb -u mydbuser -p nunyabinness</screen>
<para>For <filename>resetdb</filename>, the user name needs to
be for an account with permission to create databases. Once
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits