Dev C++ Mysql.h



You probably have to declare the package to dev-c. Look in the project configuration for 'Add an external library' and declare it there. DevC needs this to know where to look for 1) the header file, and 2) the actual library. And that is has to link the library into the executable. Also, you might have to use #include h. I'm trying to add an header file to dev-C but when I compile it it doesn't work. Here are my exact steps (for my example, I'm trying to get mysql.h to work): copy 'mysql.h' into c:dev-cincludes; check that in dev-C tools compiler options directories c includes and c includes have the path to 'c:dev-cincludes'.

This section describes the prerequisites that must be satisifed before you work through the remaining tutorial sections, and shows how to set up the framework code that serves as the basis for the tutorial applications.

Boosie

These tutorials refer to tables and sample data from the world database, which you can download from the Example Databases section of the MySQL Documentation page.

Dev C++ Mysql.h

Each tutorial application uses a framework consisting of the following code. The examples vary at the line that says /* INSERT TUTORIAL CODE HERE! */ within the try block, which is replaced for each application with the application-specific code.

To try the framework code as a standalone program, use this procedure:

  1. Copy and paste the framework code to a file such as framework.cpp. Edit the #define statements to reflect your connection parameters (server, user, password, database). Also, because the file contains those parameters, set its access mode to be readable only to yourself.

  2. Compile the framework. For example, on macOS, the command might look like this (enter the command on one line):

    Adapt the command as necessary for your system. A similar command is needed for the tutorial applications that follow.

  3. To run the framework, enter the following: Civil 3d software.

    You will see a simple message:

You are now ready to continue to the tutorials.

Mysql c++ libraryC++
2011-07-13 19:45:48 UTC
Dev C++ Mysql.h

C++ Mysql Tutorial

I'm trying to build my first ODB example code for person.hxx, driver.cxx
and database.hxx
using per the Eclipse ODB documentation:
* ODB: 1.4.0
* Windows: 32Bit XP SP3
* Eclipse: Version: Helios Service Release 2 Build id: 20110218-0911
* MySQL Server 5.5
* mingw32 4.5.2
Using Eclipse - Index - Search for unresolved includes
I get this set of errors.
All of these .h files exist in the include directory
*/C:Program FilesMySQLMySQL Server 5.5include/* but not in the
*include/mysql* directory
This statement in mysql-types.hxx seems to be the cause, is there some
place I need to configure so that this attribute
(LIBODB_MYSQL_INCLUDE_SHORT) is set?
I'm I missing the mysql/*.h files? If so, then do you have a link to the
files I need?
#ifdef LIBODB_MYSQL_INCLUDE_SHORT
# include <mysql_time.h>
#else
# include <mysql/mysql_time.h>
#endif
------------------------------------------------------------------------
ERROR OUTPUT from Using Eclipse - Index - Search for unresolved includes:
D:/Development/C++/ODB/libodb-mysql-1.4.0/odb/mysql
mysql-types.hxx
Unresolved inclusion: mysql/mysql_time.h
mysql.hxx
Unresolved inclusion: mysql/errmsg.h
Unresolved inclusion: mysql/mysql.h
Unresolved inclusion: mysql/mysqld_error.h
version.hxx
Unresolved inclusion: mysql/mysql_version.h
D:/Development/C++/ODB/libodb-mysql-1.4.0/odb/mysql/details
config.hxx
Unresolved inclusion: odb/mysql/details/config.h
------------------------------------------------------------------------
Thanks,
Dan