Closed samschr closed 6 years ago
Could cygwin be relatively old on Win7? What does g++ --version print?
Cygwin is up to date; I just ran the installer this morning.
GCC/g++ is 6.4.0
EDIT: Here's the log of the failed compilation https://pastebin.com/raw/Y5wqTKdS
+@profelis do you know which GCC version your change requires? Any ideas how to make this work independently of the GCC version? Does this work on Win10 as it is?
@samschr Add -fpermissive
param to g++ in makefile
Hi, sorry for the delay. Should be fixed at head O:)
Hi, just to complement, I had to pass -lstdc++fs
to the linker, to avoid an error complaining about not finding std::experimental::filesystem
, when compiling with cygwin/g++. The commands to compile were:
g++ -Wall -fexceptions -O2 -c tiv.cpp -o tiv.o
g++ tiv.o -o tiv -pthread -s -lstdc++fs
Also, the gcc-g++
package must be installed in cygwin. If one forgets to install the package, then cygwin will happily use any version of gcc found in the path, even the native version for windows, which can't compile this source code.
Check that you have that installed using:
cygcheck -p bin/g++
If you don't have it, then install it using the cygwinsetup.exe
located inside the cygwin folder.
I followed the install instructions in the readme, but running "make" gave me a bunch of errors relating to pclose(file) and failed (I can paste the log if need be). I git checked out commit d543b3b and after going through the same steps found that it compiles just fine. After looking at a git diff between d543b3b and master I noticed some differences in the makefile. Namely, the parameter std=c++11 was added on commit 9ec066f. So I reset back to master, removed the -std=c++11 option, and compiled successfully.
It looks like that option was added to fix compilation on mac and Linux, but it seems to break it on windows. I don't know much about programming so I'm not sure if there's a different way to set the standard and fix compatibility with all OS's, but it looks like there may need to be a windows only branch with that option removed.
Here's exactly what I did to fix my error: