Skip to content
Browse files

Merge pull request #280 from edlebert/master

Issue #279: Can't install in cygwin
  • Loading branch information...
2 parents 86784d2 + 8c0e5ae commit 69151c3ebb3e4ecf2bb9b6e2fab2022dc34f8541 @tmm1 tmm1 committed Nov 20, 2011
Showing with 18 additions and 0 deletions.
  1. +9 −0 ext/extconf.rb
  2. +9 −0 ext/fastfilereader/extconf.rb
View
9 ext/extconf.rb
@@ -139,6 +139,15 @@ def manual_ssl_config
when /aix/
CONFIG['LDSHARED'] = "$(CXX) -shared -Wl,-G -Wl,-brtl"
+when /cygwin/
+ # For rubies built with Cygwin, CXX may be set to CC, which is just
+ # a wrapper for gcc.
+ # This will compile, but it will not link to the C++ std library.
+ # Explicitly set CXX to use g++.
+ CONFIG['CXX'] = "g++"
+ # on Unix we need a g++ link, not gcc.
+ CONFIG['LDSHARED'] = "$(CXX) -shared"
+
else
# on Unix we need a g++ link, not gcc.
CONFIG['LDSHARED'] = "$(CXX) -shared"
View
9 ext/fastfilereader/extconf.rb
@@ -77,6 +77,15 @@ def add_define(name)
# on Unix we need a g++ link, not gcc.
CONFIG['LDSHARED'] = "$(CXX) -shared -Wl,-G"
+when /cygwin/
+ # For rubies built with Cygwin, CXX may be set to CC, which is just
+ # a wrapper for gcc.
+ # This will compile, but it will not link to the C++ std library.
+ # Explicitly set CXX to use g++.
+ CONFIG['CXX'] = "g++"
+ # on Unix we need a g++ link, not gcc.
+ CONFIG['LDSHARED'] = "$(CXX) -shared"
+
else
# on Unix we need a g++ link, not gcc.
CONFIG['LDSHARED'] = "$(CXX) -shared"

0 comments on commit 69151c3

Please sign in to comment.
Something went wrong with that request. Please try again.