Lazarus

Free Pascal => FV/Textmode IDE => Topic started by: fractionite on January 27, 2018, 11:33:15 pm

Title: Linking error when compiling a minimal ncurses program with fp-ide on ubuntu
Post by: fractionite on January 27, 2018, 11:33:15 pm
I try to compile a very simple program using the ncurses library (uses ncrt)

My ide is fp-ide
My OS is Linux (Ubuntu)
I have ncurses installed and it is found in /usr/lib/fpc/3.3.0/units/x86_64-linux/ncurses.ppu

However, I am stuck with the lines
Quote
Using util /usr/bin/ld
Executing "/usr/binld.bfd" with command line "-b elf64-x86-64 -m elf64-x86-64 --dynamic-linker= /lib64/ld-linux-x86-64.so.2 -L. /home/hacking/test link.res"
test.pas(4,1) Error: Error while linking

All other programs just using crt compile just fine.
Title: Re: Linking error when compiling a minimal ncurses program with fp-ide on ubuntu
Post by: Ñuño_Martínez on January 29, 2018, 12:05:43 pm
May be there's a mistake in file "test.pas", line 4. ;D
Title: Re: Linking error when compiling a minimal ncurses program with fp-ide on ubuntu
Post by: Thaddy on January 29, 2018, 12:21:10 pm
Quote
/usr/lib/fpc/3.3.0/units/x86_64-linux/ncurses.ppu
FPC 3.3.0 does not exist. (Frankly, may never exist since trunk imho warrants a major release (like 4.0), but at least it would be in the future)
And trunk is still 3.1.1.

How did you install and from where?

Does line 4 refer to a library? Which one? libncurses?
Title: Re: Linking error when compiling a minimal ncurses program with fp-ide on ubuntu
Post by: marcov on January 29, 2018, 02:37:31 pm
Probably it can't find some library. Unfortunately your error output doesn't show it. Compiling on the commandline could make it easier.

As a precaution you could also make sure that you have ncurses and ncurses-dev(el) installed.
TinyPortal © 2005-2018