Hello World - package name error

Trying to get the first Hello World example working on Windows. I have this error in VS Code:

Error: Could not process argument Main
Package name must start with a lowercase letter.

My compile.hxml file:
-cp src
-lib heaps
-js hello.js
-main Main
-debug

Haxe - 4.1.4
haxelib - 4.0.2
hashlink - 1.11.0

I guess you have an Haxe file where you defined a package with a name starting with an uppercase letter such as this example:

package Main;

Lowercase the name and this should solve your problem.

I got the same following the Hello World / Hello Hashlink examples.

There is no package defined in these examples. I did try adding one in case it was always expecting a package but the error persists.

Turned out the issue was the comments in the hxml file - for some reason it was not recognising the comment at the end of the -main line, and was trying to load “Main # Tells haxe to […]” as the entry point.

I just moved the comments on to their own lines and everything works (note this is the hashlink hxml):

# Tells haxe where to search for your code files
-cp src
# Tells haxe to import the heaps library
-lib heaps
# Tells haxe to import the hlsdl rendering library
-lib hlsdl
# Tells haxe to compile to hashlink bytecode in the project directory
-hl hello.hl
# Tells haxe that Main.hx is your entry point
-main Main
# Tells haxe to run in debug mode
-debug