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 » Community » Newbie corner » linking has failed
linking has failed [message #49626] Sun, 18 March 2018 11:39 Go to next message
idkfa46 is currently offline  idkfa46
Messages: 153
Registered: December 2011
Experienced Member

Hi guys, linking has failed! Confused

What does it mean? Can you support me please?

Regards,
Matteo

 (): Linking has failed
 (): C:/upp/bin/mingw64/32/bin/../lib/gcc/i686-w64-mingw32/7.1.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lmysql
 (): collect2.exe: error: ld returned 1 exit status
Re: linking has failed [message #49627 is a reply to message #49626] Sun, 18 March 2018 12:05 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 830
Registered: September 2012
Location: Poland, Kraków
Experienced Contributor
Hello,

Some time ago I see similar problem in the past - https://www.ultimatepp.org/forums/index.php?t=msg&goto=4 9329&&srch=mysql#msg_49329.

In brief, you need to add path to mysql library (.dll or .so files) in your build method. More information how to do in properly, you will find in above forum thread.

Sincerely,
Klugier


Ultimate++ - one framework to rule them all.
Re: linking has failed [message #49628 is a reply to message #49627] Sun, 18 March 2018 12:33 Go to previous messageGo to next message
idkfa46 is currently offline  idkfa46
Messages: 153
Registered: December 2011
Experienced Member
Hallo Klugier,
thank you for your reply.

I already made it but seems to be not enough!

Here attached my current setting...

Where am I wrong?

Regards,
Matteo

  • Attachment: Cattura1.PNG
    (Size: 176.36KB, Downloaded 115 times)
Re: linking has failed [message #49629 is a reply to message #49628] Sun, 18 March 2018 13:52 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 830
Registered: September 2012
Location: Poland, Kraków
Experienced Contributor
Hello,

Probably you shouldn't use ".../MySQL Server 5.5/lib/debug" (Build method - LIB directories) in release mode. Please find the way how to change that value for the release build. Optimally when your setup is correct, you should build debug and release mode.

Can you link your application in debug mode?

Sincerely,
Klugier


Ultimate++ - one framework to rule them all.

[Updated on: Sun, 18 March 2018 13:52]

Report message to a moderator

Re: linking has failed [message #49630 is a reply to message #49629] Sun, 18 March 2018 15:52 Go to previous messageGo to next message
idkfa46 is currently offline  idkfa46
Messages: 153
Registered: December 2011
Experienced Member

No, I already tryed!

I receive the same error message in debug mode too Confused Confused Confused

Matteo

 (): Linking has failed
 (): C:/upp/bin/mingw64/32/bin/../lib/gcc/i686-w64-mingw32/7.1.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lmysql
 (): collect2.exe: error: ld returned 1 exit status
Re: linking has failed [message #49631 is a reply to message #49630] Mon, 19 March 2018 11:57 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 288
Registered: October 2008
Location: France
Experienced Member
Hi Matteo,

Did you settle the "Main Package Organization" to GUI.MYSQLDLL. This can be done through the TheIde main menu "Project".

When installing your application, libMySql.dll file must be copied in Windows\System32 directory or in the same directory as the application exe file for dynamic linkage.

Maybe it could help Razz

Cheers

Biobytes
Re: linking has failed [message #49633 is a reply to message #49628] Mon, 19 March 2018 12:47 Go to previous messageGo to next message
Giorgio is currently offline  Giorgio
Messages: 207
Registered: August 2015
Experienced Member
idkfa46 wrote on Sun, 18 March 2018 12:33

Here attached my current setting...


It seems to me that the path in the lib directory is wrong: just try removing "debug" from the path.
Re: linking has failed [message #49663 is a reply to message #49631] Sun, 25 March 2018 11:32 Go to previous messageGo to next message
idkfa46 is currently offline  idkfa46
Messages: 153
Registered: December 2011
Experienced Member
Hi guys,
thank you for your support but none of the solutions are working at the moment...

BioBytes wrote on Mon, 19 March 2018 11:57
Hi Matteo,
Did you settle the "Main Package Organization" to GUI.MYSQLDLL. This can be done through the TheIde main menu "Project"....


My current setting is GUY SSE2.MYSQLDLL. I tried to complile without SSE2 but the risult is the same....

BioBytes wrote on Mon, 19 March 2018 11:57

...When installing your application, libMySql.dll file must be copied in Windows\System32 directory or in the same directory as the application exe file for dynamic linkage...


I copied the libMySql.dll in the Windows\System32 directory but nothing change...

Giorgio wrote on Mon, 19 March 2018 12:47

It seems to me that the path in the lib directory is wrong: just try removing "debug" from the path.


I updated the path in the lib directory to:
"C:\Program Files\MySQL\MySQL Server 5.5\lib" but nothing change...

I always receive the same error message:
 (): Linking has failed
 (): C:/upp/bin/mingw64/32/bin/../lib/gcc/i686-w64-mingw32/7.1.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lmysql
 (): collect2.exe: error: ld returned 1 exit status


something else to do??? Sad

Regards,
Matteo
Re: linking has failed [message #49665 is a reply to message #49663] Sun, 25 March 2018 21:52 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 288
Registered: October 2008
Location: France
Experienced Member
Hi Matteo,

I realized that you compiled your project using MingW. Did you check that you have a libmysql.a in your ...\MySQLServer5.5\lib folder? MingW cannot use libmysql.lib library only MSC. Rolling Eyes

Regards

Biobytes
Re: linking has failed [message #49674 is a reply to message #49665] Thu, 29 March 2018 17:12 Go to previous messageGo to next message
idkfa46 is currently offline  idkfa46
Messages: 153
Registered: December 2011
Experienced Member
it workssssss!!!!!

Thank you guys... thank you Biobytes, you rock!


My question is... why this libraries are not included in lib folder as default?!

Regards,
Matteo

[Updated on: Thu, 29 March 2018 17:17]

Report message to a moderator

Re: linking has failed [message #49679 is a reply to message #49674] Sat, 31 March 2018 22:07 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 288
Registered: October 2008
Location: France
Experienced Member
Hi Matteo,

Quote:
My question is... why this libraries are not included in lib folder as default

See below
http://gluescript.sourceforge.net/?q=node/39

Would you post your libmysql.a ? I could be interested in comparing to my own installation. Nod

Thx in advance,
Biobytes
Re: linking has failed [message #49695 is a reply to message #49679] Wed, 04 April 2018 19:25 Go to previous messageGo to next message
idkfa46 is currently offline  idkfa46
Messages: 153
Registered: December 2011
Experienced Member
BioBytes wrote on Sat, 31 March 2018 22:07

Would you post your libmysql.a ? I could be interested in comparing to my own installation. Nod


Here it is.

link: https://www.dropbox.com/s/ut45zyhtwbu6v2z/libmysql.a?dl=0

Regards,
Matteo
Re: linking has failed [message #49697 is a reply to message #49695] Fri, 06 April 2018 11:32 Go to previous message
BioBytes is currently offline  BioBytes
Messages: 288
Registered: October 2008
Location: France
Experienced Member
Hi Matteo,

Thanks a lot Smile

Regards

Biobytes
Previous Topic: Simple progress bar example
Next Topic: Calculated column in a SqlArray
Goto Forum:
  


Current Time: Tue Jan 26 23:31:17 CET 2021

Total time taken to generate the page: 0.01313 seconds