Jump to content
  • Advertisement
Sign in to follow this  
wood_brian

OS X question

This topic is 2635 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Several months ago I got a (big-endian) Mac and built and tested the open-source parts of the software I've been working on. Since then I made an implementation change to a class -- replacing a std::vector with a segmented_array. Everything builds fine on Linux and Windows 7, but on the Mac, I got some compiler errors related to the implementation change. I was able to get everything building by going back to the older version of the class, but now am wanting to get the newer version working. I have OS X 10.5.8 installed on the machine and gcc/g++ 4.2. Is there reason to believe Apple will eventually make a more recent version of OS X available for free? Alternatively, I'm not sure how to install a newer version of the compiler on the Mac. Suggestions on how to deal with this appreciated.

Share this post


Link to post
Share on other sites
Advertisement
The newest free OSX is 10.6.
To install new compiler, just download and install the latest XCode which is compatible with 10.6

Share this post


Link to post
Share on other sites

The newest free OSX is 10.6.
To install new compiler, just download and install the latest XCode which is compatible with 10.6


This page
http://www.macworld....ow_leopard.html
talks about needing an Intel processor to install Snow Leopard. If that's the case maybe what I'll do is install Linux on the machine. Where to start with that?

Share this post


Link to post
Share on other sites
Just realized your Mac is big endian.
I only have experience with Intel based Mac (little endian).

And what do you mean about Linux? If you want to install Linux on Mac, try virtualbox the virtual machine? Don't know if it supports your Mac.

Share this post


Link to post
Share on other sites

Just realized your Mac is big endian.
I only have experience with Intel based Mac (little endian).

And what do you mean about Linux? If you want to install Linux on Mac, try virtualbox the virtual machine? Don't know if it supports your Mac.


I'm not sure if it would be easier/better to keep the version of OS X and install a newer version of a compiler or to install Linux on the Mac.

Share this post


Link to post
Share on other sites
Question. Exactly what are the compiler errors you're getting? And why do you expect upgrading XCode to solve it? Without knowing these kinds of details, there's a good chance we won't be able to tell you the real solution to your problem.

Share this post


Link to post
Share on other sites

Question. Exactly what are the compiler errors you're getting? And why do you expect upgrading XCode to solve it? Without knowing these kinds of details, there's a good chance we won't be able to tell you the real solution to your problem.


The files mentioned in the compiler output are here --
http://webEbenezer.n.../direct.tar.bz2 .


g++ -O3 -s -pedantic -W -Wall -I. -I ./loki-0.1.7/include/loki/flex -DMAKEFILES -DSYSLOG_AVAILABLE -DBIG_ENDIANS -c -o SendBuffer.o SendBuffer.cc
In file included from ./SendBuffer.hh:11,
from SendBuffer.cc:2:
./segmented_array.h:42:23: error: type_traits: No such file or directory
In file included from ./vecarray.h:45,
from ./segmented_array.h:43,
from ./SendBuffer.hh:11,
from SendBuffer.cc:2:
./align.h:51: error: ISO C++ does not support ‘long long’
In file included from ./segmented_array.h:43,
from ./SendBuffer.hh:11,
from SendBuffer.cc:2:
./vecarray.h:49: error: ‘true_type’ in namespace ‘std’ does not name a type
./vecarray.h:50: error: ‘false_type’ in namespace ‘std’ does not name a type
./vecarray.h:119: error: ‘true_type’ was not declared in this scope
./vecarray.h:119: error: template argument 2 is invalid
./vecarray.h:163: error: ‘is_scalar’ in namespace ‘std’ does not name a type
./vecarray.h:163: error: expected template-argument before ‘<’ token
./vecarray.h:163: error: expected ‘>’ before ‘<’ token
./vecarray.h:163: error: template argument 2 is invalid
./vecarray.h:163: error: expected `::' before ‘scalar_trait’
./vecarray.h:165: error: ‘scalar_trait’ is not a class or namespace
./vecarray.h:387: error: ‘false_type’ has not been declared
./vecarray.h:393: error: ‘true_type’ has not been declared
./vecarray.h:404: error: ‘false_type’ has not been declared
./vecarray.h:410: error: ‘true_type’ has not been declared
./vecarray.h: In member function ‘void neolib::vecarray<T, N, CheckPolicy>::insert(T*, InputIterator, InputIterator)’:
./vecarray.h:275: error: ‘is_integral’ in namespace ‘std’ does not name a type
./vecarray.h:275: error: expected `(' before ‘<’ token
./vecarray.h:275: error: expected primary-expression before ‘>’ token
./vecarray.h:275: error: ‘::type’ has not been declared
./vecarray.h: In member function ‘void neolib::vecarray<T, N, CheckPolicy>::insert(T*, const T*, const T*)’:
./vecarray.h:291: error: invalid use of qualified-name ‘::uninitialized_copy’
./vecarray.h:298: error: invalid use of qualified-name ‘::uninitialized_copy2’
./vecarray.h:305: error: invalid use of qualified-name ‘::uninitialized_copy’
./vecarray.h: In member function ‘T* neolib::vecarray<T, N, CheckPolicy>::erase(T*)’:
./vecarray.h:314: error: invalid use of qualified-name ‘::destruct’
./vecarray.h: In member function ‘T* neolib::vecarray<T, N, CheckPolicy>::erase(T*, T*)’:
./vecarray.h:322: error: invalid use of qualified-name ‘::destruct’
./vecarray.h: In member function ‘void neolib::vecarray<T, N, CheckPolicy>::push_back(int)’:
./vecarray.h:332: error: ‘scalar_trait’ is not a class or namespace
./vecarray.h: In member function ‘void neolib::vecarray<T, N, CheckPolicy>::push_back_dispatch(int, int)’:
./vecarray.h:407: error: invalid use of qualified-name ‘::construct’
In file included from ./SendBuffer.hh:11,
from SendBuffer.cc:2:
./segmented_array.h: At global scope:
./segmented_array.h:47: error: ‘true_type’ in namespace ‘std’ does not name a type
./segmented_array.h:48: error: ‘false_type’ in namespace ‘std’ does not name a type
./segmented_array.h:538: error: ‘false_type’ has not been declared
./segmented_array.h:542: error: ‘false_type’ has not been declared
./segmented_array.h:547: error: ‘false_type’ has not been declared
./segmented_array.h:556: error: ‘true_type’ has not been declared
./segmented_array.h: In member function ‘void neolib::segmented_array<T, N, A>::insert(neolib::segmented_array<T, N, A>::iterator, InputIterator, InputIterator)’:
./segmented_array.h:420: error: ‘is_integral’ in namespace ‘std’ does not name a type
./segmented_array.h:420: error: expected `(' before ‘<’ token
./segmented_array.h:420: error: expected primary-expression before ‘>’ token
./segmented_array.h:420: error: ‘::type’ has not been declared
In file included from SendBuffer.cc:2:
./vecarray.h: At global scope:
./vecarray.h: In instantiation of ‘neolib::vecarray<unsigned char, 512ul, neolib::nocheck>’:
./segmented_array.h:63: instantiated from ‘neolib::segmented_array<unsigned char, 512ul, std::allocator<unsigned char> >’
./SendBuffer.hh:17: instantiated from here
./vecarray.h:393: error: ‘template<class Integer> void neolib::vecarray::insert_dispatch(T*, Integer, Integer, int) [with Integer = Integer, T = unsigned char, long unsigned int N = 512ul, CheckPolicy = neolib::nocheck]’ cannot be overloaded
./vecarray.h:387: error: with ‘template<class InputIterator> void neolib::vecarray::insert_dispatch(T*, InputIterator, InputIterator, int) [with InputIterator = InputIterator, T = unsigned char, long unsigned int N = 512ul, CheckPolicy = neolib::nocheck]’
./vecarray.h:410: error: ‘void neolib::vecarray<T, N, CheckPolicy>::push_back_dispatch(int, int) [with T = unsigned char, long unsigned int N = 512ul, CheckPolicy = neolib::nocheck]’ cannot be overloaded
./vecarray.h:404: error: with ‘void neolib::vecarray<T, N, CheckPolicy>::push_back_dispatch(int, int) [with T = unsigned char, long unsigned int N = 512ul, CheckPolicy = neolib::nocheck]’

Share this post


Link to post
Share on other sites

The newest free OSX is 10.6.
To install new compiler, just download and install the latest XCode which is compatible with 10.6


10.6 is free? You get free updates till the next major version of which 10.5.8 is the last which officially supports PPC CPUs IIRC.


[color=#1C2837][size=2]error: type_traits: No such file or directory[/quote]
[color=#1C2837][size=2]Yep your compiler does not support C++11, hence this error and some of the others.
[color=#1C2837][size=2]

[color=#1C2837][size=2]
error: ISO C++ does not support ‘long long’[/quote]
[color="#1c2837"]You have a number of options here:
[color="#1c2837"]Remove -Wall from the command line.
[color="#1c2837"]switch to int64_t
[color="#1c2837"]Use the pragma to tell g++ it is a system header and therefore be quiet about it.
[color="#1c2837"]

[color="#1c2837"]Final gcc for 10.5.8 http://www.opensource.apple.com/source/gcc_42/gcc_42-5531/
[color="#1c2837"]Final Xcode 3 version which run on PPC CPU, for this you need to login to apple and download Xcode 3.2.5
[color="#1c2837"]

[color="#1c2837"]

Share this post


Link to post
Share on other sites

[
[color="#1C2837"]error: type_traits: No such file or directory

[color="#1C2837"]Yep your compiler does not support C++11, hence this error and some of the others.
[color="#1C2837"][/quote]

I posted to humor Cornstalks.


[color="#1C2837"][quote
[color="#1c2837"]Final gcc for 10.5.8 http://www.opensourc...42/gcc_42-5531/
[/quote]
I'm not sure what to do with that link.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!