I purged libgmp10-dev from Debian 12 Bookworm and then installed GMP 6.3.0 from source with debug options :
I want to compile my program as :
but GCC gives error :
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 .....
Code:
./configure --disable-shared --enable-assert --enable-alloca=debug --host=none CFLAGS=-g
Code:
gcc -o -g ~/program ~/program.c -lgmp -L/usr/local/lib/libgmp.a
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
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