Hello,
My platform is Linux Debian sid x86-64 or Linux Ubuntu 22.10 x86-64.
Using package guile-3.0-dev (version 3.0.8-2).
I want to drive the Frama-C <https://frama-c.com/> static analyzer with
a C++ driving program which uses (optionally) Guile to run Frama-C.
My current code (GPLv3+) in on github. Inside the small
https://github.com/bstarynk/misc-basile/ repository (a small thing,
containing various unrelated programs and scripts).
For the commit
https://github.com/bstarynk/misc-basile/commit/6c478ca7cd2d43bc203d0f2b0881a0cdeabaf633
when I uncomment the lines 501 and 805 there is a link failure.
My guile_has_been_initialized is my global boolean flag.
I coded:
if (!guile_has_been_initialized)
{
guile_has_been_initialized=true;
#warning BUG here related to guile
//scm_init_eval();
and the build is failing
+ /usr/bin/g++ -O -g -I/usr/include/guile/3.0 -pthread -rdynamic
clever-framac.cc '-DGIT_ID="6c478ca7cd2d"' -ldl -lguile-3.0 -lgc
-lpthread -ldl -o clever-framac
clever-framac.cc:500:2: warning: #warning BUG here related to guile [-Wcpp]
500 | #warning BUG here related to guile
| ^~~~~~~
clever-framac.cc:503:2: warning: #warning do_evaluate_guile
unimplemented [-Wcpp]
503 | #warning do_evaluate_guile unimplemented
| ^~~~~~~
clever-framac.cc:720:2: warning: #warning unimplemented inner_guile [-Wcpp]
720 | #warning unimplemented inner_guile
| ^~~~~~~
clever-framac.cc:726:2: warning: #warning unimplemented do_use_guile [-Wcpp]
726 | #warning unimplemented do_use_guile
| ^~~~~~~
clever-framac.cc:804:2: warning: #warning BUG here related to guile [-Wcpp]
804 | #warning BUG here related to guile
| ^~~~~~~
clever-framac.cc:807:2: warning: #warning unimplemented use Guile here
[-Wcpp]
807 | #warning unimplemented use Guile here
| ^~~~~~~
/usr/bin/ld: /tmp/cc51HoPM.o: in function `do_evaluate_guile(char const*)':
/home/basile/misc-basile/clever-framac.cc:501: undefined reference to
`scm_init_eval'
collect2: error: ld returned 1 exit status
Where is my mistake? Notice that -lguile-3.0 is linked!
Thanks for your help.
NB. I might borrow some code from GUILE into http://refpersys.org/
--
Basile Starynkevitch<bas...@starynkevitch.net>
(only mine opinions / les opinions sont miennes uniquement)
92340 Bourg-la-Reine, France
web page: starynkevitch.net/Basile/