Skip to content

A library's addDefine gets ignored #204

@XANOZOID

Description

@XANOZOID

Basically, I was able to test that my flags were being ignored when they were declared in an added library.

The library khafile.js

let project = new Project('tests');
project.addDefine('hxp_test_message_lib');

resolve(project);

The project khafile.js

let project = new Project('tests');
project.addDefine('hxp_test_message');
project.addLibrary('HaxePunk');
resolve(project);

Theoretical haxe file:

class App 
{

	public static function main() 
	{
		#if (hxp_test_message)
				trace("message from project");
		#end
		#if (hxp_test_message_lib)
				trace("message from lib");
		#end
		System.start({title: "Project", width: 1024, height: 768, framebuffer: {frequency: 60}}, function(window)
		{
			// . . .
		});
	}
}

The output ignores the library's define, but it registers the projects own flag.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions