Page 1 of 2

NOOB trying to build Hello World - help please..

Posted: Tue May 02, 2023 5:23 pm
by gfroberts
i'm struggling to get a working zcc configuration. hoping someone can point me to the solution.

I started with the links here:
https://nabu.ca/homebrew-c-tutorial

clicked on "get z88dk" and that installs ok but then when I try to compile hello world i get a message complaining that there's no lib\config\nabu

and sure enough there isn't. but I note that the Github repository (https://github.com/z88dk/z88dk) has one so I download all of that by clicking on the pull down in the Code box and downloading the Zip. now i see the nabu config file in lib\config, but there's no bin directory - this is strictly the source tree. so i suppose i could go about trying to build everything but this is on Windows and I'm not set up with even a Windows C compiler, plus i know this shouldn't be necesary.

so i look back on the c-tutorial page and see the comment "At this time, we include custom NABU libraries. However, we're working to integrate NABU as a native target into z88dk." so i guess i need to know more about where to find these "custom NABU libraries" and how to install them? i presume they could include the missing nabu config file?

thanks for any help!

- glenn

Re: NOOB trying to build Hello World - help please..

Posted: Tue May 02, 2023 6:55 pm
by TechCowboy
I assume you're doing this on Windows?

Are you getting the zip from here?
https://sourceforge.net/projects/z88dk/

Re: NOOB trying to build Hello World - help please..

Posted: Tue May 02, 2023 8:20 pm
by gfroberts
Yes windows

I think I tried the sourceforge link. Built in July 2022 ? Before the NABU work got popular? I will take a fresh look tonight. Could be a novice mistake since I don't see others screaming...

Re: NOOB trying to build Hello World - help please..

Posted: Tue May 02, 2023 9:55 pm
by DJ Sures
When you download z88dk it says always use the nightly build. This is why

Re: NOOB trying to build Hello World - help please..

Posted: Tue May 02, 2023 11:16 pm
by productiondave
yes, get the Nightly build AND make sure you have the correct environment variables set up.

Re: NOOB trying to build Hello World - help please..

Posted: Wed May 03, 2023 1:21 am
by gfroberts
Ok. I thought I followed the Nightly Build link but maybe not. Sounds like that’s my problem. I’ll retrace my steps. Thanks all…

Re: NOOB trying to build Hello World - help please..

Posted: Wed May 03, 2023 3:25 am
by DJ Sures
yeah its' weird that they have a "release" download and the nightly downloads - it was confusing for me at first. There doesn't seem to be a reason for the "release" because it's 104 years old :)

Re: NOOB trying to build Hello World - help please..

Posted: Wed May 03, 2023 1:38 pm
by gfroberts
so thanks all, i have had success with Hello World! for the sake of others who might stumble upon this thread here's what i learned

first of all start with the video at:
https://nabu.ca/homebrew-c-tutorial
(i couldn't find a link to here from the main page but it's probably there somewhere)

but note that the "homebrew" tab mentioned in the video is no longer there - lost or relocated in one of the updates to the site I suppose. some of that information now seems to be in the "quiver" (Downloads ... NABU Quiver)

but what you do need to get at the homebrew-c-tutorial site is the zip file with the hello world code and associated libraries. If you only get the "hello world.c" file from DJ's github you'll be missing the NABU Lib and TMS9918 pieces.

if you're looking for the z88dk code i couldn't find any direct link to it off the nabu.ca site so just go to github.com/z88dk/z88dk and scroll down to read the instructions. in step 2 there's a link to "Nightly build" which takes you to nightly.z88dk.org. that is the one you want. other links you find may take you to source forge, which is an older copy (July 2022) so it won't have the NABU stuff. i even found one link that said "nightly build" but the version it sent me to was an older version (pre-NABU).

also if you're using the default .BAT file you'll need to create a folder "C:\NABU Segments" and point your NABU network server there.

the instructions to all of this are all out there but it was a bit of an easter egg hunt to find all the pertinent information. if you get confused, as I was, feel free to post here or PM me and I'll see if i can help...

- Glenn

Re: NOOB trying to build Hello World - help please..

Posted: Wed May 03, 2023 2:24 pm
by DJ Sures
The GitHub has the demo and the nabulib. It’s all been relocated there. The only trouble is the GitHub is messy as production Dave pointed out a while ago :) I’ve just been a bit preoccupied with some other things lately. Glad to see you were able to work around my mess hah

Re: NOOB trying to build Hello World - help please..

Posted: Wed May 03, 2023 3:44 pm
by gfroberts
No need to apologize. Growing pains… stay focused on the good stuff you’re doing.

Seems like you need to figure out how to staff out some of this work…