1

I'm trying to build a pre-existing HaxePunk project in sublime (switching away from FlashDevelop).

problem: Error: Could not process argument

Here's my .hxml file:

-neko
-cp "c:/path/to/project/src"
-main Main

I've read somewhere that you shouldn't use the /src convention for your src files. That's annoying, since I want assets and binaries in their own directories separate from src files. How do I properly configure this?

Jeff Ward
  • 16,563
  • 6
  • 48
  • 57
FlavorScape
  • 13,301
  • 12
  • 75
  • 117

1 Answers1

3

You really should use the the src convention and not stuff everything within the same directory. You also don't want to make the build specific to your machine, so in you example above you don't want an absolute path but a relative one. So try the following:

#content of c:/path/to/project/build.hxml
-neko bin/output.n
-cp src
-main Main

Note that for -cp you use the relative path. The path is relative to where haxe is executed. That usually coincides with where your build.hxml file is, but it is not mandatory.

Also, you didn't specify an output file for neko. Note that you will have to create the directory bin by hand because the compiler will not do that for you and will complain if it doesn't exist.

These information are general and in no way tied with Sublime. Sublime should play just nice with these settings.

Franco Ponticelli
  • 4,430
  • 1
  • 21
  • 24
  • I misread this: http://old.haxe.org/doc/haxelib/using_haxelib It's for making a user library, not an app. "Usually, a user should be able to compile your sources by simply adding to the haxe commandline -cp path/to/myproject. Do NOT put the sources intended to be used by the end-user into a src package or another convention. For instance, if you don't have any package, the sources should be in the same directory as haxelib.xml." – FlavorScape Apr 06 '15 at 18:25
  • thanks Franco, I made a noob mistake of leaving out the compile target binary altogether. Wow. I have it working. Now it's time to figure out loading OpenFL assets and the dreaded fonts situation =) – FlavorScape Apr 06 '15 at 18:35