Was wondering if it’s okay to ask a couple of noobish-sounding questions, I’ve been having a browse online and not seen anything conclusive so far, so maybe I’m looking in the wrong places. Is it alright if I keep this thread open for this purpose and add a few more as and when I find anything else to ask?
For internal code, i.e. the kernel, API, servers - anything considered part of Haiku itself, what are the rules/guidelines on the correct version of the language standard to support and write code for?
To give a little background, I hit a build error (64-bit, so GCC9, which will be stricter) for passing a size_t as %d to a format string; this code was disabled by default by the preprocessor so may be quite old but not have surfaced in a while, depending if anyone needed to have a play. I looked up to check that the correct token as of the present day is %zu, but this is a revision that features in the C99 or C++11 standards, which of course, GCC2 cannot target at all in the case of the latter. So I was wondering if there’s some official guidance on what standards version userspace/kernel components of Haiku have to target. I know it can be a bit more complicated too, since I’ve seen on various *nix platforms how the standard library falls back on the OS in question, meaning there can be quite a headache of compatibility for things like string handling between linux/BSD/solaris/whatever, where each is subtly different. Am I right though in that we sidestep quite a bit of that with a nice clean POSIX implementation of the standard library?
For developing within Haiku, what do I need to do for a basic compiler setup? I’ve used
haiku_devel(albeit in the iso) but the compiler can’t find the stdlib headers, which I don’t see in the tracker either - is there a guide for a standard setup just for userspace applications? It’s all changed since I last was writing stuff in 2010!!!
Should rerunning an original jam command, such as the example
jam -q -j2 @nightly-anybootfrom the docs, over the sources be all that’s required to pull in any changes? It seems to be a bit sporadic if my modifications to source files are detected and the files are recompiled, and/or if these are then included in the generated image. For a while I was seeing the changed file being recompiled in the output, but then, booting the image didn’t show any changes to the behaviour, even when the image’s checksum had been altered. Meanwhile I just switched to make the anyboot instead of the raw image, and a whole load of errors have come up, that should also have appeared for the raw image. I admit I haven’t really RTFM for jam yet, but I was hoping to get my feet a bit wet first as there’s wuite a lot of info to take in - I’m on Ubuntu ATM by the way, in case that’s relevant. IT has seemed that sometimes errors come and go away if I just rerun the build command so I don’t know if it’s a problem on the host side/toolchain cross-compatibilities in that setup.
Thanks for any help and sorry if these are basic things I should have found by google !