You are not logged in.

#1 2015-04-30 00:22:31

azaroma
Member
Registered: 2015-02-08
Posts: 5

Where is ncurses_g?

I encountered an issue with some code that uses ncurses, a function (werase(WINDOW * win)) is causing a seg fault but i can't see what happened because i don't have the debugging symbols wich one get by compiling with -lncurses_g or -lcurses_g, wich i tried, causing an error: /usr/bin/ld: cannot find -lcurses_g. I checked the packages in AUR and it seems to be that curses_g.h is not included anywhere. What should i do?

Offline

#2 2015-04-30 01:21:08

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Where is ncurses_g?

http://www.cbs.dtu.dk/cgi-bin/nph-runsafe?man=ncurses

A  program  using  these  routines  must  be  linked with the -lncurses
       option, or (if it  has  been  generated)  with  the  debugging  library
       -lncurses_g.   (Your  system  integrator  may also have installed these
       libraries under the names  -lcurses  and  -lcurses_g.)   The  ncurses_g
       library  generates  trace logs (in a file called 'trace' in the current
       directory) that describe curses  actions.   See  also  the  section  on
       ALTERNATE CONFIGURATIONS.

Offline

#3 2015-04-30 01:46:21

azaroma
Member
Registered: 2015-02-08
Posts: 5

Re: Where is ncurses_g?

Yeah, i've read that but, as i said, compiler does not find that library:

alejandro with 0 @ src 
 > make
clang -c -o obj/main.o main.c -g -I../include
clang -o puzzle obj/main.o -g -I../include -lncurses -lncurses_g
/usr/bin/ld: cannot find -lncurses_g
clang: error: linker command failed with exit code 1 (use -v to see invocation)
makefile:21: recipe for target 'puzzle' failed
make: *** [puzzle] Error 1
alejandro with 0 @ src 
 > make
clang -o puzzle obj/main.o -g -I../include -lncurses -lcurses_g
/usr/bin/ld: cannot find -lcurses_g
clang: error: linker command failed with exit code 1 (use -v to see invocation)
makefile:21: recipe for target 'puzzle' failed
make: *** [puzzle] Error 1

Offline

#4 2015-04-30 07:44:44

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: Where is ncurses_g?

Let me add some emphasis:

karol wrote:

http://www.cbs.dtu.dk/cgi-bin/nph-runsafe?man=ncurses

A  program  using  these  routines  must  be  linked with the -lncurses
       option, or (if it  has  been  generated)  with  the  debugging  library
       -lncurses_g.   (Your  system  integrator  may also have installed these
       libraries under the names  -lcurses  and  -lcurses_g.)   The  ncurses_g
       library  generates  trace logs (in a file called 'trace' in the current
       directory) that describe curses  actions.   See  also  the  section  on
       ALTERNATE CONFIGURATIONS.

PKGBUILD has --without-debug

Last edited by Raynman (2015-04-30 07:45:15)

Offline

#5 2015-04-30 10:28:05

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Where is ncurses_g?

Rebuild ncurses with debug symbols etc


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB