libstdc++.a / C++ & Xcode newbie

Anonymous_Lion

Registered
I just upgraded from Panther to Tiger. I am in the very newbie stages of learning both C++ and Xcode. Unfortunately code that worked before I upgraded is no longer working after the upgrade.

The error messages that I get, leaving the code exactly as it was, are:
Code:
Command /usr/bin/gcc-4.0 failed with exit code 1
powerpc-apple-darwin8-gcc-4.0.0: /usr/lib/libstdc++.a: No such file or directory

From some other sources, it looks like I should be removing my
Code:
using namespace std;
line, but when I do that I get the following errors:
Code:
error: 'cout' was not declared in this scope
error: 'cin' was not declared in this scope

Any suggestions?

(Cross posted in the Tiger forum .)
 
I don't have tiger yet, but I believe you no longer need to link to libstdc++ with the latest version of g++ for darwin. Try removing references to it from your project (and putting the using namespace std; back in of course).

To do this, just delete the "file" in your project called "libstdc++.a". It's probably in a "directory" called "External Frameworks and Libraries". When prompted say you want to delete just the reference, not the reference and the file.

Hope it works! If not, it's easy enough to include the framework again.
 
Back
Top