Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated example.c to work with newer versions of g++ #38

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

janbridley
Copy link
Contributor

As in #37, example.c cannot be compiled as written on g++ versions 10 or newer. The following error results from attempting to compile the script:

g++ -I../main example.C -o example -O3
>Undefined symbols for architecture arm64:
>  "Seb::Timer::lapse(char const*)", referenced from:
>      _main in example-897173.o
>  "Seb::Timer::start(char const*)", referenced from:
>      _main in example-897173.o
>  "Seb::Timer::instance()", referenced from:
>      _main in example-897173.o
>ld: symbol(s) not found for architecture arm64

A very similar error is raised on x86-64 linux systems as well. The change proposed in 7532079 works for g++-11, g++-12, g++-13, and g++-14 on macOS arm64 and g++-10 on Red Hat linux x86-64.

The line #include "Seb_debug.h" is not required for proper function on any of the versions of g++ tested, but has been left in to improve backwards compatibility.

@hbf
Copy link
Owner

hbf commented Aug 10, 2023

Thanks for the fix, @janbridley.

If you'd like to be mentioned in the contributors section (https://github.com/hbf/miniball#authors--acknowledgements), feel free to submit a PR.

@hbf hbf merged commit e32693e into hbf:master Aug 10, 2023
@janbridley janbridley mentioned this pull request Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants