Cannot build dll file within source directory

42 views
Skip to first unread message

Luke Selman

unread,
May 16, 2015, 12:13:24 PM5/16/15
to haxe...@googlegroups.com
Hello, all.

I have a hxml file which contains the following:

-cs build
-D dll
-D haxe3

However, when I do
haxe build.hxml

the compiler just comes up with a list of options, as if it does not recognise the command. Is there something I am missing? I am using Haxe 3.1.3 and have hxcs installed.

Thanks in advance.

michael solomon

unread,
May 16, 2015, 1:47:51 PM5/16/15
to haxe...@googlegroups.com
Maybe you miss - main attribute?

Luke Selman

unread,
May 16, 2015, 2:07:16 PM5/16/15
to haxe...@googlegroups.com
I'm targeting it to compile to DLL, not EXE, so it doesn't need to -main, at least that's what the Haxe website is telling me.

Although, I did a search and came across this article on Stack overflow. Unfortunately the accepted answer accepts just one file to pass as the code to compile, not an entire directory so I'm not sure how you would go about compiling an entire directory, would it have to be a XML project instead I suppose

Simon Krajewski

unread,
May 16, 2015, 2:16:21 PM5/16/15
to haxe...@googlegroups.com
Am 16.05.2015 um 20:07 schrieb Luke Selman:
I'm targeting it to compile to DLL, not EXE, so it doesn't need to -main, at least that's what the Haxe website is telling me.

Although, I did a search and came across this article on Stack overflow. Unfortunately the accepted answer accepts just one file to pass as the code to compile, not an entire directory so I'm not sure how you would go about compiling an entire directory, would it have to be a XML project instead I suppose

Try compiling with `--macro include('your.pack')`.

Simon

michael solomon

unread,
May 16, 2015, 2:35:24 PM5/16/15
to haxe...@googlegroups.com
From what I know - main attribute define the start point of your project so it don't matter if you compile it to dll nor exe

Luke Selman

unread,
May 16, 2015, 3:47:46 PM5/16/15
to haxe...@googlegroups.com
Okay, I've managed to get the compiler to build the project, although I don't think it's done it correctly:

--macro include('lime')
-cp openfl
-cs openflbuild
-D dll

(Yes, I am attempting to build the OpenFL project to the C#, mainly to make a visual editor for video game development)

The output dll is 47KB, and the source files include just the Haxe source, none of the OpenFL source files are found no where, which is unusual since I did use the "-cp openfl" to target that folder as the folder to build with all the haxe source code files.

Although maybe there is another way to parse files in the Haxe compiler...

Simon Krajewski

unread,
May 16, 2015, 3:52:06 PM5/16/15
to haxe...@googlegroups.com
Don't you mean `-lib openfl`?

Simon

michael solomon

unread,
May 16, 2015, 4:04:05 PM5/16/15
to haxe...@googlegroups.com
It's possible to compile openfl to c# ?
Reply all
Reply to author
Forward
0 new messages