MacMusic.org  |  PcMusic.org  |  440Software  |  440Forums.com  |  440Tv  |  Zicos.com  |  AudioLexic.org
Loading... visitors connected
Welcome Guest
 
Reply to this topicStart new topic
> Hello Cruel World, C++ compile, no can do.
lastmachine
post Fri 10 Jan 2003, 06:51
Post #1


Newbie


Group: Members
Posts: 14
Joined: 26-Nov 02
From: Hayama - JP
Member 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 Fri 10 Jan 2003, 10:04
Post #2


Advanced Member
*****

Group: Members
Posts: 351
Joined: 12-Aug 02
From: London - UK
Member 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 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version - Fri 29 Mar 2024, 10:12
- © MacMusic 1997-2008