can't compile hope

English forum for http://www.nedopc.org/nedopc

Moderator: Shaos

markos
Junior
Posts: 2
Joined: 23 Feb 2012 11:21
Location: 67.161.213.87

can't compile hope

Post by markos »

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
User avatar
Shaos
Admin
Posts: 24079
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Post by Shaos »

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
Я тут за главного - если что шлите мыло на me собака shaos точка net
markos
Junior
Posts: 2
Joined: 23 Feb 2012 11:21
Location: 67.161.213.87

Post by markos »

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.
User avatar
Shaos
Admin
Posts: 24079
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Post by Shaos »

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
Я тут за главного - если что шлите мыло на me собака shaos точка net