Error: Multiple targets *Fixed*

Hello, I am new to Haxe. I am trying to use the raylib library but it’s giving me the “Error: Multiple targets” error.

This is how the build.hxml file look’s like:
build

-cpp bin is for the C++ target
--interp is for the Haxe Eval target

So you have two targets in this hxml, both C++ and Eval. You have to remove one of these or move it into a different build.

Everytime I remove one of them I get more errors. What should I do?

What errors does it give when you remove them?

When I remove --interp it gives me this:

Unknown identifier : BLUE
Missing fields for this
Unknown identifier : BLACK
Missing fields for this

And when I remove -cpp bin:
Module Raylib does not define type Raylib
Module Raylib does not define type Raylib

You can separate different targets in the .hxml by using --next:

Something like

-cp src
-lib hxRaylib
-D analyzer-optimize
-main Main

-cpp bin

--next

--interp

should work.

Thank you for the reply, but this still gives me errors.

hmme

You’ve corrected the compiler argument error, the next errors are in the code itself, is your Main.hx on github somewhere for us to look at?

1 Like

Yes, Here:

Scroll down a bit tho. It’s from the library I’m using :smiley:

Wait I think I just fixed it.

I just got it running! Thanks for making me take a look at the github page. I didn’t really read through it when I installed it due me being tired. Thanks a lot!
:smile: :mage:

1 Like