Created
March 25, 2014 18:28
-
-
Save yeputons/9768113 to your computer and use it in GitHub Desktop.
This file contains 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 <cstdio> | |
#include "message.h" | |
void foo(); | |
int main() { | |
printf("main: %s\n", MESSAGE); | |
foo(); | |
return 0; | |
} |
This file contains 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 <cstdio> | |
#include "message.h" | |
void foo() { | |
printf("foo: %s\n", MESSAGE); | |
} |
This file contains 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: main.exe | |
main.exe | |
main.exe: a.o b.o | |
g++ -o $@ $^ | |
%.o: %.cpp | |
g++ -o $@ -c $< | |
a.cpp: message.h | |
b.cpp: message.h |
This file contains 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
namespace { | |
const char* MESSAGE = "WORLD"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment