Bug #597 mysql++ obsolete include syntax
Submitted: 5 Jun 2003 8:43 Modified: 7 Jul 2003 4:35
Reporter: Eric Poinsignon Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL++ Severity:S1 (Critical)
Version:1.7.9 OS:Linux (linux RH7.3 with icc)
Assigned to: CPU Architecture:Any

[5 Jun 2003 8:43] Eric Poinsignon
Description:
I am trying to compile mysql++ on linux RH7.3 with the Intel c++ compilers: icc (32bits) and ecc (64bits).

Information about the icc compiler can be found here:
http://spi.cern.ch/extsoft/icc.html

The old syntax: #include <slist.h> 
found in this file for example: sqlplusint/connection1.hh
is accepted by gcc, but not by the intel compilers.
Moreover the include file in this line: #include <multiset.h>
is not known by the intel compilers.

This is the error message I get:
------------------------------------------------
icc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../sqlplusint -I/afs/cern.ch/sw/lcg/external/mysql/4.0.12/rh73_icc71/include/mysql -O3 -ww1,100 -Wp,-MD,.deps/connection.pp -c connection.cc -o connection.o
icc: Command line warning: ignoring option '-W'; no argument required
connection1.hh(14): catastrophic error: could not open source file "slist.h"
  #include <slist.h>
                    ^
compilation aborted for connection.cc (code 4)
------------------------------------------------

If I correct/remove the ".h", it crashes on multiset which is not known.

How to repeat:
Just compile mysql++ with the intel c++ compiler icc.

Here is the process I used:
http://cern.ch/service-spi/external/mysql++/1.7.9/_SPI/_icc_install.txt

And the log file:
http://cern.ch/service-spi/external/mysql++/1.7.9/_SPI/_icc_install_log.txt

Suggested fix:
I don't have a suggested fix, but is it possible to provide a patch to update the sources to the new include syntax?
Thanks.
[5 Jun 2003 8:57] MySQL Verification Team
Thank you very much for your bug report.

You are quite right regarding MySQL++ and Intel compiler.

MySQL++ is simply not designed to work with Intel compiler.

So far, it works with:

* GCC 2.95.* and 3.*
* Compaq compiler 6.2 and higher
* VC++ 6.0
* BC++ 5.* and 6.*

If you would like to port MySQL++ to Intel C++, I would gladly saned you a working version of MySQL++ 1.8.0, which has built in support for most of the above compilers. 

If you would like, you could add into it (with conditional compilation) a support for Intel C++.
[11 Jun 2003 1:36] Eric Poinsignon
Hello Sinisa,

Thanks for your proposition, I discussed with the developers who are using mysql++ and they are interested to patch MySQL++ version 1.8.0.
Can you please send me this version?

Regards.
[17 Jun 2003 6:54] MySQL Verification Team
You can fetch it from:

http://work.mysql.com/~sinisa/plus_1.8.0.tgz
[22 Jul 2004 21:48] Kalabizo Magued
Hi,

I have installed the mysql+= on redhat 9, it compiled ok and istalled ok.

Now when I create a simple application in which I include the <mysql++> or the <sqpplus.hh> header files I cannot complie and build the application , i get all kind of errors.

I think it is the way I build my application here is the syntax I do it.

g++ test.C -o test

In file included from /usr/local/include/mysql++:9,
                 from test.C:2:
/usr/local/include/defs:5:19: mysql.h: No such file or directory
In file included from /usr/local/include/mysql++:9,
                 from test.C:2:
/usr/local/include/defs:19: syntax error before `;' token
In file included from /usr/local/include/coldata1.hh:8,
                 from /usr/local/include/mysql++:12,
                 from test.C:2:
/usr/local/include/type_info1.hh:10:19: mysql.h: No such file or directory
In file included from /usr/local/include/coldata1.hh:8,
                 from /usr/local/include/mysql++:12,
                 from test.C:2:
/usr/local/include/type_info1.hh:76: `enum_field_types' was not declared i