MacMusic.org  |  PcMusic.org  |  440Software  |  440Forums.com  |  440Tv  |  Zicos.com  |  AudioLexic.org
Loading... visiteurs connectés
 
Reply to this topicStart new topic
> Hello Cruel World, C++ compile, no can do.
lastmachine
posté ven. 10 janv. 2003, 06:51
Message #1


Newbie


Groupe : Members
Messages : 14
Inscrit : 26 nov. 02
Lieu : Hayama - JP
Membre no 9,572




Howdy,
I have some controller ideas, neato stuff I promise. Problem is, I can't even compile. I have ProjectBuilder, but that's hopeless. Not the *introduction* I need. I can use gcc/g++ at the CLI, but not for C++. I can compile straight C, but no combination of #includes will get me the right headers (I think this is the problem) for compiling C++. As soon as I try to change a printf() to a cout<<, upon compile I get 'cout' unrecognized, etc...

Is this a matter of telling G++ where the headers are located? How? Other ideas?

I realize that this might be considered "too basic" for this forum, but I haven't found anywhere that would seem more appropriate, and I can't get to newsgroups from behind this miserable firewall.

I'll sure appreciate any assistance.

Hawk
Go to the top of the page
 
+Quote Post
BusError
posté ven. 10 janv. 2003, 10:04
Message #2


Advanced Member
*****

Groupe : Members
Messages : 351
Inscrit : 12 août 02
Lieu : London - UK
Membre no 6,795




There are many tutorials for c++ around the net; Maybe you should hunt for some that suits you!

For your particular problem, telling the compiler your source is C++ can be done two ways on the mac:
+ Name it '.cpp'
+ Compile it with 'c++' (or g++) instead of cc (aka gcc)

If it doesn't build, you are probably missing the c++ headers for cout/cin etc. And there, and I can't help you because I always refused to use those: they are just an abomination and abuse of the operators anyway.

printf() works laugh.gif


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 utilisateur(s) sur ce sujet (1 invité(s) et 0 utilisateur(s) anonyme(s))
0 membre(s) :

 

Bienvenue invité
Contribute
PcMusic est VOTRE site! Participez à son évolution...
Version bas débit - samedi 28 déc. 2024, 23:15
- © PcMusic 1997-2007