Recent

Author Topic: Added a package to a project and then fail in the linker.  (Read 3006 times)

iru

  • Sr. Member
  • ****
  • Posts: 331
Added a package to a project and then fail in the linker.
« on: December 31, 2015, 10:54:23 am »
Gentlefolk,

Environment: Linux Mint 17.3, LAZ 1.4, a  project with TKDBGrid, FireBird embedded.

Loaded the mouseandkeyinput.lpk package. Compiled (no errors), added it to the project(only choice).

Tried to compile my project which has compiled correctly numerous times. It failed with  the following error:

     /usr/bin/ld: warning: link.res contains output sections; did you forget -T?

I have had a look at things but no luck. Any help appreciated Ian. Happy New year....




ChrisF

  • Hero Member
  • *****
  • Posts: 542
Re: Added a package to a project and then fail in the linker.
« Reply #1 on: December 31, 2015, 11:53:23 am »
It's not an error; just a warning.

And I'm afraid you'll have to compose with it. See: http://www.freepascal.org/faq.var#unix-ld219

So, just ignore it.

iru

  • Sr. Member
  • ****
  • Posts: 331
Re: Added a package to a project and then fail in the linker.
« Reply #2 on: December 31, 2015, 11:02:17 pm »
Thank you for the response.

I miss-read the warning and error messages, what is displayed is:

Compile Project, Target: Layout: Exit code 1, Errors: 1, Hints: 1 <<<<<<< The real error!!!!! (Layout is the project name).
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/usr/bin/ld: cannot find -lXtst
Error: Error while linking

I have used the project inspector to remove the "mouseandkeyinput" from the "required packages".

The project now compiles!!!

So I have a problem with "mouseandkeyinput" and perhaps something in the project.

I have created an empty project and added "mouseandkeyinput".

The compile fails on the "end."  in the Project1.LPR file with the same error message as before.

If I remove "lazmouseandkeyinput" from the "Uses" statement the project compiles clean.

So there is a problem with "lazmouseandkeyinput"???

Thanks once again, Ian.

ChrisF

  • Hero Member
  • *****
  • Posts: 542
Re: Added a package to a project and then fail in the linker.
« Reply #3 on: January 01, 2016, 01:48:32 am »
Ah sorry: my knowledge concerning all the various Linux distro is not sufficient to answer to your question.

Though, clearly the Xtst library seems to be needed for the MouseAndKeyInput package. See: http://wiki.lazarus.freepascal.org/MouseAndKeyInput#Gtk1.2F2

It may be a problem of library not installed (sudo apt-get install libxtst-dev ?), of wrong path for the library in the make file, of I-just-dont-know ...


But I'm sure someone else might be able to help you. May be you should post a more precise question specific to this question (i.e. error with MouseAndKeyInput package and Xtst library for a Linux Mint distro) in the Linux part of the forum : http://forum.lazarus.freepascal.org/index.php/board,32.0.html. Or at least renamed the current topic, to focus it on the Xtst library trouble ...

Happy New Year (we are already in 2016, here) to you and all the other people.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4679
  • I like bugs.
Re: Added a package to a project and then fail in the linker.
« Reply #4 on: January 01, 2016, 01:40:56 pm »
Though, clearly the Xtst library seems to be needed for the MouseAndKeyInput package. See: http://wiki.lazarus.freepascal.org/MouseAndKeyInput#Gtk1.2F2

It may be a problem of library not installed (sudo apt-get install libxtst-dev ?), of wrong path for the library in the make file, of I-just-dont-know ...

Yes, the Xtst dependency is clearly mentioned in the wiki page.
@iru, did you try to install it?
 $ sudo apt-get install libxtst-dev
Does it not work?
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018