C++ Programming for Lich...where to start?

Hey, THAT WORKS :slight_smile:

I have to enter
export PATH=C:\MinGW\msys\1.0\bin\
every time I open the Bash console.

that may not apply to every Windows user, they may be able to put it on the system PATH,
I can’t do that because I can’t risk conflicting with Delphi, which I use for commercial programming.

Thanks for all your help,

Glad to know that it ended up with a success. Normally it takes less effort, but whatever. You might be able to configure bash to add any necessary variables when it starts if you add export PATH=C:\MinGW\msys\1.0\bin\ to .bashrc file in your home directory, so at least it would be less annoying. Generally on Linux you would modify this variable rather then replace it complitely, so it would be something like export PATH=C:\MinGW\msys\1.0\bin\:$PATH

There isn’t a .bashrc, and bizarrely windows won’t let me make one with that name.
Just a note for future explorers:-
On windows export PATH=C:\MinGW\msys\1.0\bin\ won’t work, must be.
export PATH=C:\MinGW\msys\1.0\bin\
or
export PATH=“C:\MinGW\msys\1.0\bin”

There’s a bash.bat instead, but doesn’t look promising at first glance. It’s really not a problem to set the PATH once at the start of a session.

Well if there is a “something like” that works I didn’t find it yet. I suspect the problem is with the : which is used as a de-limiter in Linux, burt also as part of the path ( C:\ ) in windows.

I’m still trying to find a way round this so I can put EMCC on the path.
Maybe that’s not the place to put EMCC on the path though, I wonder if it’s it’s possible to edit web.mk to tell it where to find emcc?

I know this has taken a while, I appreciate your help.
There’s a couple of other things I did to make it work, would you like me to document here?

Not having .bashrc is fine - the point is that it gets read if it exists, but it doesn’t have to exist for bash to work. Bash.bat is just windows shell file that runs bash, however you could try to modify it to replace .bashrc with a different name that can be created. Then you would have something like bash ...current_arguments... --rcfile /path/to/new_rc_file.

Regarding emcc, you could add it’s directory to PATH the same way. Another option is to change web.mk to use absolute path like EMCC = C:\path\to\emcc. Also note that EMCC ?= x just sets default value to environment variable EMCC to x, but you can define EMCC outside of Makefile i.e. in .bashrc or another profile file using export or in bash.bat (probably using set command for windows shell)

Yeah, I think this may help someone else trying to use Windows, so feel free to add more info.

OK.

"open compile.mk
and point TOOLROOT to your gcc installation directory, using a path string without
spaces (such as using 8.3 filenames)."

In my case

TOOLROOT ?=C:\GNUArm\bin is now location of arm-none-eabi-gcc.exe

In the directory I made for the OwlProgram stuff I created a shortcut to run bash.exe.
On my system it’s
C:\OwlProgram-develop\OwlProgram-develop
I put that directory as “Start In” for the shortcut.

FirmwareSender.exe needs to be put in the Tools folder
C:\OwlProgram-develop\OwlProgram-develop\Tools on my system
downloaded from
https://github.com/pingdynasty/FirmwareSender/releases/download/v0.1/FirmwareSender-windows.zip
as recommended above.

I run Bash, it then needs to be told where to find the stuff it needs:-

export PATH=C:\\MinGW\\msys\\1.0\\bin\\

(the double backslash is essential)
This has to be done every session, but could be added to the windows system path ( just can’t do that on my system because I already have a different ‘make’ used by Delphi)

Once that’s done things like
make libs
and
make clean load PATCHNAME=MidiModular
work as expected, and windows specific issues are over.

EMCC …I stopped bothering with it as I don’t need it. Running make loads the binary direct to the Lich.