Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to compile hello-world with mes-m2? #6

Closed
pts opened this issue Jun 7, 2020 · 1 comment
Closed

How to compile hello-world with mes-m2? #6

pts opened this issue Jun 7, 2020 · 1 comment

Comments

@pts
Copy link

pts commented Jun 7, 2020

I'm trying to compile a hello-world with mes-m2 by running these commands:

$ git clone https://github.com/oriansj/mes-m2
$ cd mes-m2
$ make CFLAGS=-m32 mes-m2
$ (echo '#include <libmes-mini.h>'
   echo 'int main(int argc, char **argv) { return eputs("Hello, World"); }'
  ) >hello.c
$ bin/mes-m2 scripts/mescc.scm hello.c
error: unrecognized switch scripts/mescc.scm
...

I was trying some other command-line flags to mes-m2, but nothing worked.

What is the correct command to run to compile hello-world with mes-m2?

Please note that I'm a newbie to Mes and M2-Planet. I haven't run Guile, Mes or any other Scheme implementation in my life. I have experience with standard Unix tools (e.g. Make and GCC).

@pts pts changed the title How to compile hello-world with mes-m2 How to compile hello-world with mes-m2? Jun 7, 2020
@oriansj
Copy link
Owner

oriansj commented Oct 10, 2020

Here is exactly the steps to build hello world with mescc:
guile --no-auto-compile -L module -e main scripts/mescc.scm -I include -S scaffold/exit-42.c -o foo.S

Good luck and happy hacking

@oriansj oriansj closed this as completed Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants