Last active
August 29, 2015 14:24
-
-
Save mingwandroid/863a7a52ac614230012f 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
.PHONY: hello/libtest.a.in hello/libtest.a | |
DTLIB32 = /OUT:$@ /DEF:`echo $@ | $(SED) 's|/lib|/|;s|\.a|.def|'` | |
SED ?= sed | |
hello/libtest.a: hello/libtest.a.in | |
./test.exe $(DTLIB32) | |
all: hello/libtest.a |
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
$ make all | |
./test.exe "/OUT:hello/libtest.a "/DEF:`echo hello/libtest.a | sed 's|/lib|/|;s|\.a|.def|'` | |
Proggy arg[1] = /OUT:hello/libtest.a /DEF:hello/test.def |
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
// Compile with mingw-w64 GCC as: gcc test.c -o test.exe | |
#include <stdio.h> | |
int main(int argc, char * argv[]) { | |
int i; | |
for (i = 1; i < argc; ++i) { | |
printf("Proggy arg[%d] = %s\n", i, argv[i]); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment