Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Installation, Compiling and Running of theide » Compiling issue with MySQL and GCC
Compiling issue with MySQL and GCC [message #46311] Sat, 16 April 2016 09:39 Go to next message
BioBytes is currently offline  BioBytes
Messages: 284
Registered: October 2008
Location: France
Experienced Member
Hello,

I opened a new topic as Function4U package bug with MingW has solved by Koldo.

The issue now is with RichEdit and MySQL too. I obtained the following errors (Win7 and Upp-9596-MingW). Iwould add that y poject compiles with no error with MSC15. Razz

Upp::RichEdit::DefaultBar(Upp::Bar&, bool)'
 (): D:/Installations/Compilateurs/upp/out/MyApps-bazaar/IVDManager/MINGW.Debug.Debug_Full.Gui.Main.Mt.Mysqldll.Sse2\$blitz.o: In function `ZN12IVDReportDlgC2Ev':
E:/Data/Projets Ultimate/IVDManager/IVDReport.cpp (76): undefined reference to `Upp::RichEdit::RichEdit()'
E:/Data/Projets Ultimate/IVDManager/IVDReport.cpp (76): undefined reference to `Upp::RichEdit::~RichEdit()'
 (): D:/Installations/Compilateurs/upp/out/MyApps-bazaar/IVDManager/MINGW.Debug.Debug_Full.Gui.Main.Mt.Mysqldll.Sse2\$blitz.o: In function `ZN3Upp8RichEdit6SetQTFEPKc':
D:/Installations/Compilateurs/upp/uppsrc/RichEdit/RichEdit.h (782): undefined reference to `Upp::RichEdit::Pick(Upp::RichText)'
 (): D:/Installations/Compilateurs/upp/out/MyApps-bazaar/IVDManager/MINGW.Debug.Debug_Full.Gui.Main.Mt.Mysqldll.Sse2\$blitz.o: In function `ZN12IVDReportDlgD1Ev':
E:/Data/Projets Ultimate/IVDManager/IVDReport.h (13): undefined reference to `Upp::RichEdit::~RichEdit()'
 (): D:/Installations/Compilateurs/upp/out/MyApps-bazaar/MySql/MINGW.Debug.Debug_Full.Gui.Mt.Mysqldll.Sse2\MySql.o: In function `s__s49_fn':
D:/Installations/Compilateurs/upp/uppsrc/MySql/MySql.cpp (50): undefined reference to `mysql_server_init@12'
 (): D:/Installations/Compilateurs/upp/out/MyApps-bazaar/MySql/MINGW.Debug.Debug_Full.Gui.Mt.Mysqldll.Sse2\MySql.o: In function `s__s53_fn':
D:/Installations/Compilateurs/upp/uppsrc/MySql/MySql.cpp (54): undefined reference to `mysql_server_end@0'
 (): D:/Installations/Compilateurs/upp/out/MyApps-bazaar/MySql/MINGW.Debug.Debug_Full.Gui.Mt.Mysqldll.Sse2\MySql.o: In function `ZN3Upp12MySqlSession9DoConnectEv':
D:/Installations/Compilateurs/upp/uppsrc/MySql/MySql.cpp (66): undefined reference to `mysql_set_character_set@8'
 (): collect2.exe: error: ld returned 1 exit status


I did not forget to add libmysqll.a Library in MySQL lib folder. Maybe the Library is too old Sad

Waiting your comments

Thanks in advance

Biobytes
Re: Compiling issue with MySQL and GCC [message #46312 is a reply to message #46311] Sun, 17 April 2016 01:28 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 893
Registered: December 2006
Experienced Contributor
Looks like you put your libraries in wrong order.

Regards,
Novo
Re: Compiling issue with MySQL and GCC [message #46319 is a reply to message #46312] Sun, 17 April 2016 22:15 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 284
Registered: October 2008
Location: France
Experienced Member
Hi Novo,

Thanks for your advice but what do you mean by "wrong order". Rolling Eyes

I just add the paths to MySQL installation for the include and libs files as I did for MSC15

Regards
Biobytes
Re: Compiling issue with MySQL and GCC [message #46322 is a reply to message #46319] Mon, 18 April 2016 20:40 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 284
Registered: October 2008
Location: France
Experienced Member
The problem is the mysqldll.a which fails to link.

I tried to build the a lib with the MingW dlltool.exe tool but I get only an empty mysqldll.a although the *.def file is obtained from MySQL download. Crying or Very Sad

No more idea ? Razz

Regards
Biobyte
Re: Compiling issue with MySQL and GCC [message #46330 is a reply to message #46322] Thu, 21 April 2016 22:17 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 284
Registered: October 2008
Location: France
Experienced Member
Hi,

I solved partially the issue. RichEdit error disappeared as I forgot Embarassed to add "#include <Richtext\RichText.h>" before "#include <RichEdit\RicheEdit.h>" in my header file.

Still remains the link problem with libmysql.a lib Under MingW.

I tried to create the libmysql.a using reimp.exe and dlltool.exe Tools but the built-in libmysql.a file still generates linking error

(): Linking has failed
 (): D:/Logiciels/Dvt/upp/out/MyApps-bazaar/MySql/MINGW.Debug.Debug_Full.Gui.Mt.Mysqldll.Noblitz.Sse2\MySql.a(MySql.o): I
n function `s__s49_fn':
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (50): undefined reference to `mysql_server_init@12'
 (): D:/Logiciels/Dvt/upp/out/MyApps-bazaar/MySql/MINGW.Debug.Debug_Full.Gui.Mt.Mysqldll.Noblitz.Sse2\MySql.a(MySql.o): I
n function `s__s53_fn':
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (54): undefined reference to `mysql_server_end@0'
 (): D:/Logiciels/Dvt/upp/out/MyApps-bazaar/MySql/MINGW.Debug.Debug_Full.Gui.Mt.Mysqldll.Noblitz.Sse2\MySql.a(MySql.o): I
n function `ZN3Upp12MySqlSession9DoConnectEv':
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (59): undefined reference to `mysql_init@4'
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (61): undefined reference to `mysql_real_connect@32'
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (66): undefined reference to `mysql_set_character_set@8'
 (): D:/Logiciels/Dvt/upp/out/MyApps-bazaar/MySql/MINGW.Debug.Debug_Full.Gui.Mt.Mysqldll.Noblitz.Sse2\MySql.a(MySql.o): I
n function `ZN3Upp12MySqlSession5CloseEv':
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (143): undefined reference to `mysql_close@4'
 (): D:/Logiciels/Dvt/upp/out/MyApps-bazaar/MySql/MINGW.Debug.Debug_Full.Gui.Mt.Mysqldll.Noblitz.Sse2\MySql.a(MySql.o): I
n function `ZN3Upp12MySqlSession10MysqlQueryEPKc':
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (153): undefined reference to `mysql_query@8'
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (155): undefined reference to `mysql_errno@4'
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (160): undefined reference to `mysql_error@4'
 (): D:/Logiciels/Dvt/upp/out/MyApps-bazaar/MySql/MINGW.Debug.Debug_Full.Gui.Mt.Mysqldll.Noblitz.Sse2\MySql.a(MySql.o): I
n function `ZN3Upp15MySqlConnection12EscapeStringERKNS_6StringE':
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (254): undefined reference to `mysql_real_escape_string@16'
 (): D:/Logiciels/Dvt/upp/out/MyApps-bazaar/MySql/MINGW.Debug.Debug_Full.Gui.Mt.Mysqldll.Noblitz.Sse2\MySql.a(MySql.o): I
n function `ZN3Upp15MySqlConnection7ExecuteEv':
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (314): undefined reference to `mysql_store_result@4'
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (315): undefined reference to `mysql_affected_rows@4'
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (317): undefined reference to `mysql_more_results@4'
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (318): undefined reference to `mysql_next_result@4'
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (322): undefined reference to `mysql_num_fields@4'
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (326): undefined reference to `mysql_fetch_field_direct@8'
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (364): undefined reference to `mysql_insert_id@4'
 (): D:/Logiciels/Dvt/upp/out/MyApps-bazaar/MySql/MINGW.Debug.Debug_Full.Gui.Mt.Mysqldll.Noblitz.Sse2\MySql.a(MySql.o): I
n function `ZN3Upp15MySqlConnection5FetchEv':
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (388): undefined reference to `mysql_fetch_row@4'
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (390): undefined reference to `mysql_fetch_lengths@4'
 (): D:/Logiciels/Dvt/upp/out/MyApps-bazaar/MySql/MINGW.Debug.Debug_Full.Gui.Mt.Mysqldll.Noblitz.Sse2\MySql.a(MySql.o): I
n function `ZN3Upp15MySqlConnection10FreeResultEv':
D:/Logiciels/Dvt/upp/uppsrc/MySql/MySql.cpp (453): undefined reference to `mysql_free_result@4'
 (): collect2.exe: error: ld returned 1 exit status


Keep on trials to get the correct libmysql.a Library Very Happy

Regards
Biobytes
Re: Compiling issue with MySQL and GCC [message #46331 is a reply to message #46311] Fri, 22 April 2016 03:10 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 893
Registered: December 2006
Experienced Contributor
This info should be useful: http://gluescript.sourceforge.net/?q=node/39

Regards,
Novo
Re: Compiling issue with MySQL and GCC [message #46338 is a reply to message #46331] Sat, 23 April 2016 15:07 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 284
Registered: October 2008
Location: France
Experienced Member
Thanks Novo,

I did exactly as indicated in the link you mention but still got same errors when compiling my projetct with MINGW. Sad

The libmysql.a was properly generated. The linking problem could maybe come from linkage settings in Upp

http://www.fixweb.free.fr/uploads/img_f1cb544a24f7cd49f067b6b13386f6f7.png

I tried to replace with -lmysql aand I got the following error:

 (): D:/Installations/Compilateurs/upp/bin/mingw64/32/bin/../lib/gcc/i686-w64-mingw32/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -l-lmysql


I must say that my knowledge is quite limited on that subject. Perhaps you or somebody else could help.

Once again, thank you for your help Smile

Regards

Biobytes
Re: Compiling issue with MySQL and GCC [message #46340 is a reply to message #46338] Sat, 23 April 2016 18:32 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 893
Registered: December 2006
Experienced Contributor
BioBytes wrote on Sat, 23 April 2016 09:07

I tried to replace with -lmysql aand I got the following error:

Do not put "-lmysql" directly. What you need is just "mysql".

Hope this helps.


Regards,
Novo
Re: Compiling issue with MySQL and GCC [message #46341 is a reply to message #46340] Sun, 24 April 2016 21:11 Go to previous message
BioBytes is currently offline  BioBytes
Messages: 284
Registered: October 2008
Location: France
Experienced Member
Thanks Novo for advice in linkage parameter.

I got better results with a libmysql.a found on Web and dated April 15th 2005 which size is 108Ko. However I still got few errors. See below

(): Linking has failed
 (): D:/Installations/Compilateurs/upp/out/MyApps-bazaar/MySql/MINGW.Debug.Debug_Full.Gui.Mt.Mysqldll\MySql.o: In function `s__s49_fn':
D:/Installations/Compilateurs/upp/uppsrc/MySql/MySql.cpp (50): undefined reference to `mysql_server_init@12'
 (): D:/Installations/Compilateurs/upp/out/MyApps-bazaar/MySql/MINGW.Debug.Debug_Full.Gui.Mt.Mysqldll\MySql.o: In function `s__s53_fn':
D:/Installations/Compilateurs/upp/uppsrc/MySql/MySql.cpp (54): undefined reference to `mysql_server_end@0'
 (): D:/Installations/Compilateurs/upp/out/MyApps-bazaar/MySql/MINGW.Debug.Debug_Full.Gui.Mt.Mysqldll\MySql.o: In function `ZN3Upp12MySqlSession9DoConnectEv':
D:/Installations/Compilateurs/upp/uppsrc/MySql/MySql.cpp (66): undefined reference to `mysql_set_character_set@8'
 (): collect2.exe: error: ld returned 1 exit status


Do you any other idea ? I begin to be lost now Sad

Regards
Biobytes

[Updated on: Mon, 25 April 2016 10:14]

Report message to a moderator

Previous Topic: Compilation error with GCC
Next Topic: Compiling theide - what is the purpose ??
Goto Forum:
  


Current Time: Fri Dec 13 17:30:46 CET 2019

Total time taken to generate the page: 0.02270 seconds