-
Notifications
You must be signed in to change notification settings - Fork 31
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
Compiling error for the Week0 Hello World Example #1
Comments
Andriano,
Thank you. I will put a note in the notes.
Robert
… On Apr 13, 2019, at 4:17 AM, Adriano Cortes ***@***.***> wrote:
There is an incompatibility between using "struct timespec" in the GNU compiler with the -std=c99 option (Linux OS). The compiler complains that
FLA_Clock.c: In function ‘FLA_Clock_helper’:
FLA_Clock.c:41:21: error: storage size of ‘ts’ isn’t known
struct timespec ts;
A quick fix that worked is using -std=gnu99 instead.
|
Adriano,
Can you do me a favor. Can you see what happens if the -std=c99 option is simply removed? (I don’t think specifying it for our course material is particularly important.)
Thanks
Robert
… On Apr 13, 2019, at 4:17 AM, Adriano Cortes ***@***.***> wrote:
There is an incompatibility between using "struct timespec" in the GNU compiler with the -std=c99 option (Linux OS). The compiler complains that
FLA_Clock.c: In function ‘FLA_Clock_helper’:
FLA_Clock.c:41:21: error: storage size of ‘ts’ isn’t known
struct timespec ts;
A quick fix that worked is using -std=gnu99 instead.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#1>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AFa8J4p5ZswTITm3_EvTrxEup2m8slvyks5vgT43gaJpZM4ctypb>.
|
Robert, It compiled fine removing -std=c99. Best. |
Thank you very much. I am copying Field, who can insert this into libflame as well, if appropriate.
We appreciate the feedback.
… On Apr 13, 2019, at 11:26 PM, Adriano Cortes ***@***.***> wrote:
Robert,
It compiled fine removing -std=c99.
My GCC is the newest version (8.3), and according to the man page by default it uses the -std=gnu17 ("GNU dialect of ISO C17. This is the default for C code"). I found an explanation of the compiling error here https://gcc-help.gcc.gnu.narkive.com/8xCaKI6r/problem-with-struct-timespec-and-c99-standard <https://gcc-help.gcc.gnu.narkive.com/8xCaKI6r/problem-with-struct-timespec-and-c99-standard>
Following it I put #define _POSIX_C_SOURCE 199309L in the beginning of FLA_Clock.c and it worked fine with the -std=c99 options.
Best.
Adriano.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#1 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AFa8JwdqU3_Ysc_p1lZnhs9LaJDur9mMks5vgkuXgaJpZM4ctypb>.
|
There is an incompatibility between using "struct timespec" in the GNU compiler with the -std=c99 option (Linux OS). The compiler complains that
FLA_Clock.c: In function ‘FLA_Clock_helper’:
FLA_Clock.c:41:21: error: storage size of ‘ts’ isn’t known
struct timespec ts;
A quick fix that worked is using -std=gnu99 instead.
The text was updated successfully, but these errors were encountered: