Created
June 24, 2011 02:36
-
-
Save mikeando/1044114 to your computer and use it in GitHub Desktop.
Example for failing compile on system symbol usage
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
void not_thread_safe(); | |
void puts() { not_thread_safe(); } |
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: should_work.x should_fail.x | |
should_fail.x : should_fail.o fncheck.o | |
gcc should_fail.o fncheck.o -Xlinker -dead_strip -o should_fail.x | |
should_work.x : should_work.o fncheck.o | |
gcc should_work.o fncheck.o -Xlinker -dead_strip -o should_work.x | |
should_fail.o : should_fail.c | |
gcc -c should_fail.c | |
should_work.o : should_work.c | |
gcc -c should_work.c | |
fncheck.o : fncheck.c | |
gcc -c fncheck.c |
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[]) { | |
printf ("Hello, world.\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
#include <stdio.h> | |
int main (int argc, char *argv[]) { | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment