Skip to content

Add header file for "hello world" example - #4413

Merged
bdbaddog merged 3 commits into
SCons:masterfrom
LiuYinCarl:master
Sep 16, 2023
Merged

bdbaddog merged 3 commits into
SCons:masterfrom
LiuYinCarl:master

Conversation

@LiuYinCarl

Copy link
Copy Markdown
Contributor

Add header file stdio.h to the example.Otherwise, writing the tests as documented will fail to compile.

@mwichmann

Copy link
Copy Markdown
Collaborator

Yes, agree. Most examples in the User Guide are encoded with special markup, so they're actually run as one of the doc build steps (and the output is captured for inclusion as well), and we see such omissions in those. However, this example is not... @bdbaddog, this looks good to me.

Comment thread doc/user/simple.xml Outdated
</para>

<programlisting>
#include <stdio.h>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to include proper markup for < and >
#include &lt;stdio.h&gt;

@LiuYinCarl LiuYinCarl Sep 15, 2023 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will fix it soon, thanks.

I am learning scons for the use of godot, and is learing scons's latest User Guide. Actually, the design of scons is very interesting to me, and I like the intuitive design. I will read the guide thoroughly. I might find additional typos that need to be fixed, so I reviewed the Github test failure report to learn how to run tests on my local computer and found the following commands.

# set up environment
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install ninja psutil

# run document tests
python3 bin/docs-update-generated.py
python3 bin/docs-validate.py
python3 bin/docs-create-example-outputs.py

python3 runtest.py test/import.py test/ninja

I want to know if these commands is right for me, any reply is valuable, thanks.

@jcbrill

jcbrill commented Sep 14, 2023

Copy link
Copy Markdown
Contributor

FYI: also mentioned in #4320 (comment) concerning configure and lack of include for header resulting in linker error for some targets because there was no inline code generation (e.g., redefining printf to a different exported symbol) by the c preprocessor.

@LiuYinCarl
LiuYinCarl requested a review from bdbaddog September 15, 2023 12:27
@bdbaddog

Copy link
Copy Markdown
Contributor

Thanks for the PR. Merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants