Page 1 of 1

Does Exult compile with GCC 4?

Posted: Fri Mar 10, 2006 12:12 pm
by Thomas Lecomte
Greetings,

I'm trying to get Exult compiled on Sun Solaris 10 (SPARC). I tried with the Sun's compiler but it failed due to hash_map and hash_set headers missing.
Then I tried with GCC 4, and I still got the following errors:

../hash_utils.h:32: error: 'std::hash_map' has not been declared
../hash_utils.h:50: error: 'std::hash_set' has not been declared

So I was wondering if the problem is GCC-specific or Solaris-specific?
Thanks,

Thomas

Re: Does Exult compile with GCC 4?

Posted: Fri Mar 10, 2006 1:10 pm
by wjp
Strangely, this specific line is in an #if which should take care of that. (Line 32 is the one between the #else and the #endif below). Can you check what __GNUC__ and __GNUC_MINOR__ are set to in your gcc 4?

Code: Select all

#  if (defined(__GNUC__) && (__GNUC__ >= 3) && ( __GNUC_MINOR__ >= 0))
using __gnu_cxx::hash_map;
#  else
using std::hash_map;
#  endif

Re: Does Exult compile with GCC 4?

Posted: Sat Mar 11, 2006 2:51 am
by Thomas Lecomte
It's strange:

__GNUC__: 4
__GNUC_MINOR__: 0

So std::* shouldn't be used...
I'll continue investigations. I'll tell you if there's any news.
Thanks,

Thomas

Re: Does Exult compile with GCC 4?

Posted: Sat Mar 11, 2006 6:10 am
by Thomas Lecomte
Problem solved: The version I'm compiling wasn't testing for GCC > 3.x. I had to change the preprocessor tests to what you've paste. Thanks!

Thomas

Re: Does Exult compile with GCC 4?

Posted: Sat Mar 11, 2006 2:28 pm
by Wizardry Dragon
Compiling from source with the latest version of gcc with cgywin doesn't produce any problems for me.

--------
Peter M Dodge aka Wizardry Dragon
Lead Designer
Ultima VII: The Feudal Lands