From: jblazi <jblazi@gmx.de>
Subject: Problem compiling .cpp file
Date: Tue, 5 Nov 2002 17:47:36 +0100 [thread overview]
Message-ID: <200211051747.36932.jblazi@gmx.de> (raw)
I have the following file:
#include <guile/gh.h>
#include <stdio.h>
SCM test_function(SCM n)
{
printf("Die Zahl ist %d\n",SCM_INUM(n));
return SCM_EOL;
}
void register_procs(void)
{
gh_new_procedure("test_function",test_function,1,0,0);
}
void inner_main(int argc, char **argv)
{
register_procs();
gh_repl(argc, argv);
}
main(int argc,char *argv[])
{
gh_enter(argc, argv, inner_main);
return(0); /* never reached */
}
I am compiling the file with
gcc -Iusr/include test2.c -o test2 -lguile -lm
This more or less works (it does not work really as I get error messages when
I call the function test_function from Guile, but at least after the first
call the text is displayed.)
But when I try to compile the same file as a .cpp file, it does not work:
Administrator@PAPUA-8ZRG78JQB ~/c-programme
$ mv test2.c test2.cpp
Administrator@PAPUA-8ZRG78JQB ~/c-programme
$ gcc -Iusr/include test2.cpp -o test2 -lguile -lm
test2.cpp: In function `void register_procs()':
test2.cpp:12: invalid conversion from `
scm_unused_struct*(*)(scm_unused_struct*)' to `scm_unused_struct*(*)()'
*/
I use the latest Cygwin (with gcc 3.2) on Win2K.
Can anybody help me?
TIA,
--
Janos Blazi
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
next reply other threads:[~2002-11-05 16:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-05 16:47 jblazi [this message]
2002-11-05 21:07 ` Problem compiling .cpp file Marius Vollmer
-- strict thread matches above, loose matches on Subject: below --
2002-11-05 16:41 jblazi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200211051747.36932.jblazi@gmx.de \
--to=jblazi@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).