nedoPC.org

Community of electronics hobbyists established in 2002

...
Atom Feed | View unanswered posts | View active topics It is currently 19 Dec 2018 02:16



Reply to topic  [ 4 posts ] 
can't compile hope 
Author Message
Junior

Joined: 23 Feb 2012 12:21
Posts: 2
Location: 67.161.213.87
Reply with quote
Hello,

Can you please help me compile Hope.
I'm trying to compile with VS Express 2010, it compiles without error messages but if I run the program I get the error 'can't read module 'standard' so there's a problem with hopelib.h

What is the proper way to specify the directory?

Thank for any info.

I really like Hope and would like to also enhance it. I tried Hopeless, but I can't run any application with it (using read) I always get an error that a temporary directory cannot be read.

Again thanks for any help.

Markos


12 Mar 2012 17:58
Profile
Admin
User avatar

Joined: 09 Jan 2003 00:22
Posts: 17240
Location: Colorado
Reply with quote
Post 
I'm surprised that you were able to compile it in VisualStudio :)
Source code expects to be compiled in POSIX environment (for Windows I tested it in CYGWIN)
If VS Express supports POSIX API now then you can try to put all libs including Standard.hop in the same folder where hopless.exe is located and where you launch it

_________________
:eugeek: https://twitter.com/Shaos1973


13 Mar 2012 09:52
Profile WWW
Junior

Joined: 23 Feb 2012 12:21
Posts: 2
Location: 67.161.213.87
Reply with quote
Post 
Shaos wrote:
I'm surprised that you were able to compile it in VisualStudio :)
Source code expects to be compiled in POSIX environment (for Windows I tested it in CYGWIN)
If VS Express supports POSIX API now then you can try to put all libs including Standard.hop in the same folder where hopless.exe is located and where you launch it


Thank you for the reply.

I got a little further yet. Now it compiles and Hope is evaluating expressions.

What I did was in module.c there's a function called mod_read();

Hope opens the 'Standard.hop' file in that function so I hard coded the path to the 'Standard.hop' file and then copied the path to the variable 'file' just simply using strcpy();

It's the brute force approach but it works for now.

I haven't tested file input or output yet and I think that is the next problem.

So it's now compiling in VS without Cygwin, just a Windows .exe. There are just some preprocessor defines that need to be set such us; msdos, HOPELIB, etc...

I like Hope because it a simple, small functional language. A good way to learn functional programming. Haskell is so large and there are so many ways to do everything, it's takes much time to learn it.


15 Mar 2012 16:17
Profile
Admin
User avatar

Joined: 09 Jan 2003 00:22
Posts: 17240
Location: Colorado
Reply with quote
Post 
Files should work just fine because it uses standard fopen to open files

P.S. Yes, Hope is a good way to learn functional programming

_________________
:eugeek: https://twitter.com/Shaos1973


15 Mar 2012 17:56
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.