Created
May 12, 2015 16:21
-
-
Save lemmi/2c1b7bd9d77b65a5fdb5 to your computer and use it in GitHub Desktop.
issue with #define stderr (stderr) + openmp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ make | |
gcc -fopenmp -o main-glibc main.c | |
musl-gcc -fopenmp -o main-musl main.c | |
In file included from main.c:1:0: | |
main.c: In function ‘main’: | |
main.c:4:43: error: expected identifier before ‘(’ token | |
#pragma omp parallel default(none) shared(stderr) | |
^ | |
Makefile:2: recipe for target 'all' failed | |
make: *** [all] Error 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(int argc, char *argv[]) { | |
#pragma omp parallel default(none) shared(stderr) | |
{ | |
fprintf(stderr, "test\n"); | |
} | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
gcc -fopenmp -o main main.c | |
musl-gcc -fopenmp -o main-musl main.c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment