-
-
Notifications
You must be signed in to change notification settings - Fork 353
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
is it possible to compile and run on windows? #22
Comments
You can install it with cygwin on Windows. And if your git (or bash) setup comes with gcc src/shc.c -o shc Thus you will get a
You should compile for your platform (32, 64 or whatever). |
I tried, but it didn't work out. ` shc.c: In function ‘parse_an_arg’: shc.c:752:16: warning: ‘optarg’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
mv -f .deps/shc.Tpo .deps/shc.Po gcc -g -O2 -o shc.exe shc.o |
can't compile shc4.0.3 on win7 in msys2 taye@taye-PC MSYS /c/Users/taye/Downloads/New folder (5)/shc-4.0.3
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for struct stat.st_rdev... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for alarm... yes
checking for working mktime... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for memset... yes
checking for putenv... yes
checking for strchr... yes
checking for strdup... yes
checking for strrchr... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: executing depfiles commands
taye@taye-PC MSYS /c/Users/taye/Downloads/New folder (5)/shc-4.0.3
$ make
Making all in src
make[1]: Entering directory '/c/Users/taye/Downloads/New folder (5)/shc-4.0.3/s rc'
gcc -DPACKAGE_NAME=\"shc\" -DPACKAGE_TARNAME=\"shc\" -DPACKAGE_VERSION=\"4.0.3\" -DPACKAGE_STRING=\"shc\ 4.0.3\" -DPACKAGE_BUGREPORT=\"http://github.com/neurobi n/shc/issues\" -DPACKAGE_URL=\"\" -DPACKAGE=\"shc\" -DVERSION=\"4.0.3\" -DSTDC_H EADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRIN G_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_U NISTD_H=1 -DHAVE_STRUCT_STAT_ST_RDEV=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DTIME_ WITH_SYS_TIME=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ALARM=1 -DHAVE_STDL IB_H=1 -DHAVE_REALLOC=1 -DHAVE_MEMSET=1 -DHAVE_PUTENV=1 -DHAVE_STRCHR=1 -DHAVE_S TRDUP=1 -DHAVE_STRRCHR=1 -I. -g -O2 -MT shc.o -MD -MP -MF .deps/shc.Tpo -c - o shc.o shc.c
shc.c: In function ‘parse_an_arg’:
shc.c:752:16: warning: ‘optarg’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
extern char * optarg;
^
mv -f .deps/shc.Tpo .deps/shc.Po
gcc -g -O2 -o shc.exe shc.o
make[1]: Leaving directory '/c/Users/taye/Downloads/New folder (5)/shc-4.0.3/sr c'
make[1]: Entering directory '/c/Users/taye/Downloads/New folder (5)/shc-4.0.3'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/c/Users/taye/Downloads/New folder (5)/shc-4.0.3'
taye@taye-PC MSYS /c/Users/taye/Downloads/New folder (5)/shc-4.0.3
try again without MINGW64 :
result error:
change version since #133
commented out:
success!! download shc.exe of win7 64bit version from my https://github.com/jackusay/shc-for-windows |
hi
we have bash for windows when I install git, then i have bash.
is it possible to compile in bash and run in windows?
another question is, should I compile for each platform 32 and 64 bit on linux?
The text was updated successfully, but these errors were encountered: