Does Exult compile with GCC 4?

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
Thomas Lecomte

Does Exult compile with GCC 4?

Post 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
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: Does Exult compile with GCC 4?

Post 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
Thomas Lecomte

Re: Does Exult compile with GCC 4?

Post 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
Thomas Lecomte

Re: Does Exult compile with GCC 4?

Post 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
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Does Exult compile with GCC 4?

Post 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
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Locked