Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

eclipse clp prolog C code generation query
Hi  Everyone
I am using eclipse clp version 5.10 on fedora core 6.
I want to know that is there any way to see the C code generated by
tkeclipse after compiling prolog file.

Report this thread to moderator Post Follow-up to this message
Old Post
jitender001001@gmail.com
03-25-08 09:42 AM


Re: eclipse clp prolog C code generation query
jitender001001@gmail.com wrote:
> Hi  Everyone
>   I am using eclipse clp version 5.10 on fedora core 6.
>   I want to know that is there any way to see the C code generated by
>   tkeclipse after compiling prolog file.

ECLiPSe does not generate C code from Prolog.


-- Joachim

Report this thread to moderator Post Follow-up to this message
Old Post
Joachim Schimpf
03-26-08 12:23 AM


Re: eclipse clp prolog C code generation query
Joachim Schimpf wrote:
> jitender001001@gmail.com wrote: 
>
> ECLiPSe does not generate C code from Prolog.
>
>
> -- Joachim
As Joachim says, ECLiPSe does not compile its source programs into C,
which I think is what your question assumes. Instead, ECLiPSe compiles
source ECLiPSe programs into its own abstract machine code. You can view
the code generated for each predicate with als/1. [or you can load
lib(asm) and use wam/1, which produces listings that I find more
readable] This is probably not very helpful unless you have a reasonable
knowledge of WAM-like abstract machines.

-- Kish

Report this thread to moderator Post Follow-up to this message
Old Post
Kish Shen
03-26-08 12:23 AM


Re: eclipse clp prolog C code generation query
hi thanks for response
I want to know that how i can use C program in "tkeclipse". Actually
i have tried it in "eclipse" and program got terminated in ec_init()
function,  So i want to try it in tkeclipse.


Report this thread to moderator Post Follow-up to this message
Old Post
jitender001001@gmail.com
03-26-08 09:45 AM


Re: eclipse clp prolog C code generation query
i have compiled program doc/examples/eg_c_basic.c  like this

[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

Report this thread to moderator Post Follow-up to this message
Old Post
jitender001001@gmail.com
03-26-08 09:45 AM


Re: eclipse clp prolog C code generation query
jitender001001@gmail.com wrote:
> i have compiled program doc/examples/eg_c_basic.c  like this
>
> [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
Hi,

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/...o/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

Report this thread to moderator Post Follow-up to this message
Old Post
Kish Shen
03-26-08 01:13 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Prolog archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:47 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.