Re: eclipse clp prolog C code generation query
- From: Kish Shen <kishshen@xxxxxxxxx>
- Date: Wed, 26 Mar 2008 12:17:55 +0000
jitender001001@xxxxxxxxx wrote:
i have compiled program doc/examples/eg_c_basic.c like thisHi,
[anonymous@localhost Eclipse_5.10_103]$ gcc -g -Iinclude/i386_linux
doc/examples/eg_c_basic.c -Llib/i386_linux -leclipse
and it got terminated in ec_init()
so plz tell how can i compile it in tkeclipse ?
thanks
You asked about this about a month ago in the comp.constraints Newsgroup. I replied to you then, and suggested for such ECLiPSe-specific question, you might want to use the ECLiPSe mailing list at:
http://www.eclipse-clp.org/mailman/listinfo/eclipse-users
I asked several questions in my previous reply to you: I asked if you could run tkeclipse. It seems that you can -- this calls ec_init(), like in the example program you are compiling above. So it seems that ec_init() works, so the problem is not with your ECLiPSe system.
From the way you are compiling your example above, and if you run the resulting a.out from your <ECLiPSe> (where <ECLiPSe> is where you placed ECLiPSe) toplevel directory, you need to set LD_LIBRARY_PATH environment variable to include <ECLiPSe>/lib/i386_linux when you run the a.out executable. This seems to be the most likely reason why you are having problems running the a.out.
However, you should get an error message if LD_LIBRARY_PATH was not set correctly:
kish@bodgerix:~/Eclipse> a.out
a.out: error while loading shared libraries: libeclipse.so: cannot open shared object file: No such file or directory
but in your previous postings, you said you did not get any messages. I am not sure why this is so.
As for your specific question about `compiling C programs in tkeclipse', there may be some confusion here -- you can embed ECLiPSe into a C program, which you compile and run -- this is what the example you are trying to compile, and also tkeclipse, is doing. So you don't compile a C program from tkeclipse as such.
On the other hand, you can call C from within ECLiPSe, by calling `external' predicates that are written in C. You can do this from any ECLiPSe, but this is not what you are trying to do.
Cheers,
Kish
.
- References:
- eclipse clp prolog C code generation query
- From: jitender001001
- Re: eclipse clp prolog C code generation query
- From: Joachim Schimpf
- Re: eclipse clp prolog C code generation query
- From: Kish Shen
- Re: eclipse clp prolog C code generation query
- From: jitender001001
- Re: eclipse clp prolog C code generation query
- From: jitender001001
- eclipse clp prolog C code generation query
- Prev by Date: Re: eclipse clp prolog C code generation query
- Next by Date: Re: multisets
- Previous by thread: Re: eclipse clp prolog C code generation query
- Index(es):
Relevant Pages
|
|