1. Compliing eu 4.1 programs to C
- Posted by ChrisB (moderator) Feb 08, 2023
- 1076 views
Hi
At some point in the past, IIRC, eu could compile to an executable program by just using euc.ex euprog.exw. (and a dll by adding -dll to the command line)
Does this capability still exist.
If not is there a set of steps to follow in order to do so. Including installing the compiler (whether GCC or Watcom).
Why? SDL does not have pixel perfect collision, got it working quite well with Eu, but doing many collision checks is going to take some time, which would hopefully be faster with a dll.
Cheers
Chris
2. Re: Compliing eu 4.1 programs to C
- Posted by ghaberek (admin) Feb 09, 2023
- 881 views
Hi
At some point in the past, IIRC, eu could compile to an executable program by just using euc.ex euprog.exw. (and a dll by adding -dll to the command line)
Does this capability still exist.
Yes, there are quite a few features for the translator now.
If not is there a set of steps to follow in order to do so. Including installing the compiler (whether GCC or Watcom).
We dropped support for Watcom a while ago in favor of GCC. If you're on Windows, I'd recommend using TDM-GCC.
Why? SDL does not have pixel perfect collision, got it working quite well with Eu, but doing many collision checks is going to take some time, which would hopefully be faster with a dll.
Your best bet would probably be to use a library written in C for this purpose. You'll gain a speed-up by using the translator, but if speed is important a native C library can be optimized and accelerated with things like assembly and SIMD.
-Greg
3. Re: Compliing eu 4.1 programs to C
- Posted by ChrisB (moderator) Feb 09, 2023
- 843 views
Yup, on it. Cut my teeth on basic and C long time ago, it's just that Eu is so much simpler to use.
Downloading and MinGW an installing onto visual code studio as we speak, getting that set up, and then making baby steps to create a dll.
Chris
4. Re: Compliing eu 4.1 programs to C
- Posted by ghaberek (admin) Feb 09, 2023
- 845 views
Yup, on it. Cut my teeth on basic and C long time ago, it's just that Eu is so much simpler to use.
Downloading and MinGW an installing onto visual code studio as we speak, getting that set up, and then making baby steps to create a dll.
FYI I made a Euphoria extension for VS Code a while ago. It's... okay, but we need better tooling for debugging, linting, error checking, etc. to make it shine.
If you decide to use it, please let me know what you think. I don't give it a lot of attention because I can't compel myself to use VS Code over Notepad++.
-Greg
5. Re: Compliing eu 4.1 programs to C
- Posted by ChrisB (moderator) Feb 09, 2023
- 800 views
Yup, on it. Cut my teeth on basic and C long time ago, it's just that Eu is so much simpler to use.
Downloading and MinGW an installing onto visual code studio as we speak, getting that set up, and then making baby steps to create a dll.
FYI I made a Euphoria extension for VS Code a while ago. It's... okay, but we need better tooling for debugging, linting, error checking, etc. to make it shine.
If you decide to use it, please let me know what you think. I don't give it a lot of attention because I can't compel myself to use VS Code over Notepad++.
-Greg
Hi, yeah, like you it's ok, but I use editplus, and somehow, for what I do VS just feels too 'much', too many options, too much fiddling.
Cheers
Chris
6. Re: Compliing eu 4.1 programs to C
- Posted by axtens_bruce Feb 10, 2023
- 709 views
I can't compel myself to use VS Code over Notepad++.
I wish there was a Notepad++ mode for VS Code. I use VS Code (and Visual Studio for that matter) for a lot of stuff but there are still many areas where Notepad++ shines. Does VS Code do keyboard macros? Maybe it does but I'll keep using Notepad++ for that.
-Bruce
7. Re: Compliing eu 4.1 programs to C
- Posted by ghaberek (admin) Feb 11, 2023
- 560 views
Does VS Code do keyboard macros? Maybe it does but I'll keep using Notepad++ for that.
The marketplace is saturated with extensions for pretty much anything. There are several available for creating macros:
-Greg