[Scons-users] First time scons user: Can't get a simple example working on windows machine

A A amine.aboufirass at gmail.com
Wed Aug 24 07:55:48 EDT 2022


Warning, I’m crossposting from stackexchange:
https://stackoverflow.com/questions/73471918/basic-scons-example-throwing-do-not-know-how-to-make-file-target-helloworld-e

I’m trying to follow this
<https://github.com/SCons/scons/wiki/SconsTutorial1> tutorial to build a
simple C program using SCons. I created a file called SConstruct which
contains the following:

env = Environment() # construction environment
env.Program(target='helloworld', source=['helloworld.c']) # build targets

I created a file called helloworld.c which includes the following:

#include <stdio.h>

int main()
{
    printf("Hello World.");
}

Then I tried building from Powershell as follows:

scons helloworld

Unfortunately I got the following output

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building terminated because of errors.
scons: *** Do not know how to make File target `helloworld`
(..\scons-tutorial\helloworld). Stop.

I followed the steps in the tutorial very closely, so I’m not sure what
else I can do at this point. What am I doing wrong here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20220824/ba194b0d/attachment.htm>


More information about the Scons-users mailing list