ROOT 5.16 on Windows XP: how to use MySQL classes

Hello,

I have installed root 5.16 on my windows xp laptop (where I have VC++ 7.1) and I am trying to compile and use some classes I usually use on lxplus.
When I try to use one class which needs to open a MySQL DB I got an error about a missing RMySQL.dll . I have found it on the web and copied in my PC, modified the path to find the directory where I have placed it but then I got a different error: something about a wrong entry point (I try to remember it by heart since I do not have my pc with me now). So before trying something else randomly I’d like to know if there is a specific RMySQL.dll file I have to use instead of a random one picked up from the net.
I remember that in the past the requested library was libmysql.dll so it looks like something has changed.

                         Thanks in advance and regards

                                              Andrea

Hi Andrea,

  • which version of Root?
  • installed from source or binary tarball?

A few points:
If you build root yourself from source, you must specify:
–enable-mysql --with-mysql-incdir=your_mysql_install_dir/include --with-mysql-libdir=your_mysql_install_dir/lib
as parameters to ./configure
If you downloaded a binary tarball, libRMySQL.dll should be there (in $ROOTSYS/bin)…

Cheers,
Bertrand.

Hello Bertrand,

version is 5.16.00. I have installed using the installer which is here:

ftp://root.cern.ch/root/root_v5.16.00.win32gdk.msi

do you think it is complete? I can look more carefully in %ROOTSYS%/bin.
Let me know if you discover that the installer may not be ok.

                                         cheers

                                          Andrea

I think libRMySQL should be included in the msi file…can you check in root/bin, please?
On my side, I will take a look at the msi and let you know.

Bertrand.

I have found c:\root\libMySQL.dll but not libRMySQL.dll , which is what root is looking for.

                                        Andrea

OK, unfortunately, libRMySQL is not in the binary distribution of ROOT v5.16.00… We will fix it asap, and keep you in touch.

Cheers,
Bertrand.

Andrea,

I copied the libRMySQL files at this location:
bellenot.web.cern.ch/bellenot/Public/Andrea/
Can you try with these and let me know, please?
Just copy libRMySQL in root/bin and other files in root/lib
As I will have to build new binaries, may I suggest you to switch to the latest ROOT version?
(so I will not have to rebuild all versions of ROOT… :wink: )
I’ll let you know when new binaries will be available.

Cheers,
Bertrand.

We are not done yet. I copied your file, I have recompiled my classes and I tried again but now I got this error in a window:

“The procedure entry point ?SetError@TSQLStatement@@IAEXHPBD0@Z could not be located in the dynamic link library libCore.dll”

                            Andrea

OK, then I have to rebuild 5.16.00… I’ll let you know.
– Bertrand.

Andrea,

Can you try again with the same files (I replaced them)?
If it still doesn’t work, can you try the msi file (in the same directory)?
This version of ROOT has been built with MySQL 5.0.18.
And please let me know which solution works.

Cheers,
Bertrand.

we are not very lucky !! In my classes I use also TSAXParser which, now, looks missing in your private release. I had to try it because copying the new libs was not enough.
I can try to use the latest version if you prefer. Is it already ok for what concern MySQL or TSAXParser?

                                       Andrea

:cry: …No, not yet…I’ll check tomorrow and keep you in touch.
– Bertrand.

Andrea,

I replaced the msi file, which include xml now. Can you give it a try and let me know, please? I hope this time it will be OK :wink:

And FYI, there are still some issues with the version 5.17.04 on Windows. I’ll let you know as soon as everything is fixed.
(sorry for the trouble)

Cheers,
Bertrand.

I have copied the new msi but I got the same error as before:
“The procedure entry point ?SetError@TSQLStatement@@IAEXHPBD0@Z could not be located in the dynamic link library libCore.dll”

I had unistalled root before running the msi again.

By the way I am installing it using the “Typical” option. Is it ok for this not-so-common utilities like MySQL or XML parser?

                                       Andrea

Strange…
Can you check which version of MySQL you installed on your machine?

[quote]By the way I am installing it using the “Typical” option. Is it ok for this not-so-common utilities like MySQL or XML parser? [/quote]Yes, it is OK.

Bertrand.

I have version 5.0.23 but there is something I’d like to understand.

I have MySQL server 5.0.23 installed in my pc but I thought I did not need mysql server installed to use it (as a client) inside root. From your question it looks like root needs at least mysql client installed in the pc to work so my questions are:

  1. is mysql server good as well? I think so because I have just tried to connect to a remote mysql db (the one I’d like to connect to from root) using the line command and it works.

  2. Should I set the path in such a way that this mysql installation is “visible” by root? I have in the SYSTEM environment variable PATH the bin directory of the mysql installation where libMySQL.dll is . Is it enough?

                                     Andrea

ROOT has been built with MySQL version 5.0.18, but I think it should be OK…

[quote]1) is mysql server good as well?[/quote] I think so, if you manage to use it outside ROOT.

[quote]2) Should I set the path in such a way that this mysql installation is “visible” by root? I have in the SYSTEM environment variable PATH the bin directory of the mysql installation where libMySQL.dll is . Is it enough?[/quote] Yes, otherwise it would complains that it doesn’t find libMySQL.dll

It will be difficult for me to try, since I don’t have MySQL installed anywhere on Windows, and not much experience with it…
Anyway, I will try to investigate and let you know.

Cheers,
Bertrand.

Andrea,

One more thing: can you try to load libNet - just type ‘gSystem->Load(“libNet”)’ - at the beginning of your ROOT session to see if it solves the problem? (TSQLStatement is part of libNet…)

Bertrand.