XboxDev / nxdk

The cross-platform, open-source SDK to develop for original Xbox: *new* xdk
439 stars 66 forks source link

`lld: error: libpdclib.lib(crt0.obj): undefined symbol: _main` #277

Open JayFoxRox opened 4 years ago

JayFoxRox commented 4 years ago

We have been getting a couple of reports for this problem lately (See #276, #245).

We should somehow detect that this is a top-level make and finish with success (either no-op, or building the libraries). Maybe check for empty SRCS and SHADER_OBJS?

Additionally, we should improve the README. It should contain the command line for building a sample, so users don't just make. We should also slim down the README and direct users more cleanly to the wiki (which we should improve, too).

thrimbor commented 4 years ago

I'm wondering whether we should rename the Makefile, maybe to something like Makefile.inc. It would provide a hint that this is not the Makefile to directly use, and we could trivially check whether someone uses it incorrectly by checking if that filename is the first entry in MAKEFILE_LIST.

JayFoxRox commented 4 years ago

That sounds good to me. I'd like to add that if we rename the Makefile, then we should be using Makefile_xbe.inc. Or we should also refactor how we built binaries at the same time so we can support projects trying to build multiple XBE files or projects that built a DXT. We could do this later, but I assume that the Makefile rename would be a breaking change (although we could support backwards compatibility for a while).

glebm commented 2 years ago

You can build just the Makefile if you pass NXDK_ONLY=1. Useful to build NXDK only, e.g. when the project itself uses CMake instead of make