Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3260

Programming • How use GDB for debugging GMP library-used program ?

$
0
0
I purged libgmp10-dev from Debian 12 Bookworm and then installed GMP 6.3.0 from source with debug options :

Code:

./configure --disable-shared --enable-assert --enable-alloca=debug --host=none CFLAGS=-g
I want to compile my program as :

Code:

gcc -o -g ~/program ~/program.c -lgmp -L/usr/local/lib/libgmp.a
but GCC gives error :

Code:

/usr/bin/ld: /home/lovelorn/program: stderr: invalid version 2 (max 0)/usr/bin/ld: /home/lovelorn/program: error adding symbols: bad valuecollect2: error: ld returned 1 exit status
How should I compile it ? and then debug it ?

Before these options my program got compiled successfully but didn't run and give : segfault error .....

Statistics: Posted by Hadi_Lovelorn — 2024-08-07 13:14 — Replies 0 — Views 20



Viewing all articles
Browse latest Browse all 3260

Trending Articles