How can I compile in Xcode?

I'm obviously very new at this. I don't know how to compile my Hello World C++ code. Every option in the Build menu is disabled except for Allow ZeroLink. I'm extremely frustrated. I used TurboC before in Windows when I was studying C and though it's primitive-looking, it worked for me. Now, studying C++ is such a pain because the first code that I want to compile doesn't work. I tried Eclipse and used their own Hello World code and yet, Eclipse said "'cout' was not declared in this scope." then for iostream, it said "no such file or directory." What to do??? Which compiler to use so I could get over Hello World?

You remember TurboC!?
Yes, but I didn't fully disclose. I actually used Turbo Pascal much more than TurboC
The Borland stuff was really nice for its time - very
fast compilers, and lots of paper documentation.
Loved it!
I completely agree. I still have a copy of Borland C++ Builder. The Xcode and IB developers could learn a thing two there.
Then MS won the war.
I'm not entirely sure about that. On the Mac, I definitely know what my development environment is going to look like for the next few years. However you may feel about Xcode, it is fairly useable and generally not unpleasant. Personally, I'm quite happy with it. On Windows, I have no idea what I'm going to use.
VC++ with those funky .NET C++ extensions? (.NET is much better than MFC, but MS doesn't use it for themselves) C#? (I've never used it)
VB? (I think MS is killing it in favor C#)
Java/J++? At least with Java I could use Eclipse and have Linux compatibility.
All in all, I'm not even sure I will be doing any Windows development in the future. And I can't really say that bothers me much:)

Similar Messages

  • How can i compile the program?

    hi,everybody:
    I have a program which include the next statments:
    public void println(boolean flag)
    throws IOException
    Object obj = lock;
    obj;
    JVM INSTR monitorenter ;
    print(flag);
    newLine();
    obj;
    JVM INSTR monitorexit ;
    break MISSING_BLOCK_LABEL_26;
    Exception exception;
    exception;
    obj;
    JVM INSTR monitorexit ;
    throw exception;
    how can i compile the program?
    thanks

    Hi,
    I'm trying to figure out how to use this decompiler, I have downloaded it to windows 2000 platform and it unzips to 1 file with extension "1-bin" - OS doesn.'t know what to do with and neither do I ;) - I'm starting out on something here and this tool would be useful.
    Thanks for any install instructions you might have.
    mufc1999
    Hi,
    I've had a similiar problem with decompiling certain
    classes. Try the following decompiler,
    http://jrevpro.sourceforge.net, after using this one,
    the code decompiled fine, this tool is also a
    disassembler and quite a nifty one i might add. :)
    Hope this helps!
    Have Fun!

  • How can I compile Javascript from Java??

    Hi all,
    I am facing a problem, problem is I have to compile JavaScript code in Java. JavaScript code will given in Text field, those code i have to compile and i should display a message saying this is valid Java script code or Invalid code.Can anyone help on this...

    JavaScript code interpreting but not compiling... I need to compile, but not Interpret the code. How can i Compile the JavaScript Code...

  • How can I compile all functions, procedures and packages with a script?

    I need to compile all functions, procedures and packages of 5 schemas (users) with a script.
    How can I do it?
    Thanks!

    you can create a script to select all invalid objects in those schemas Since Oracle 8 introduced NDS this approach has struck me as a trifle old fashioned. It's much simpler to loop round the query in PL/SQL and use EXECUTE IMMEDIATE to fire off the DDL statements. No scripts, no muss, no fuss.
    Having said that, the problem with this approach and also with using DBMS_UTILITY.COMPILE_SCHEMA is that they do not compile all the invalid objects in dependency order. This may result in programs being invalidated by the subsequent compilation of dependencies. This is due to the introduction of Java into the database.
    The UTLRP script is much better, because it (usually) avoids cyclic references. But you still may need to run it more than once.
    In general it is better to avoid sledgehammer recompilations (like DBMS_UTILITY.COMPILE_SCHEMA, which starts by invalidating all the objects). If we have twenty invalid objects, nineteen of which are dependencies of the twentieth, we actually only need to recompile the master object, as recompiling it will trigger the recompilation of all the others.
    Cheers, APC

  • How can i restore my xcode to write code

    Hello,
    I am a new user for xcode. I did some changes which cause my xcode to look like [IMG]http://i47.tinypic.com/4ptax0.png[/IMG]
    I will be very gateful if you tell me how can i resote it back to write codes.
    thankyou in advance
    gaurav

    Just click on one of the source files in the left hand view.

  • How can we combine our xCode projects into one?

    My classmates and I had to make an  app as a group assignment in xCode. We were told that we could make  them seperatley and combine them later on, but with time ticking on and a  otherwise-located tutor we are stuck. None of us are used to using  XCode - we understand just the very basics. We have all created our  individual projects in single-view application templates and wish to  combine them into one tabbed app (the kind of app like facebook or  twitter that has a dock or navigation bar at the bottom). Some of our  individual projects have more than one ViewController which are linked  together; I do hope this doesn't make things even more complicated. I  have read something mentioning sub-projects in a new tabbed application  but as a whole, we are unsure how to do this, or even if it is the right  way to solve the problem. Can anybody help us please?
    I  realise I've put this in the wrong community but there's no Xcode  community and I felt this was my best bet. As i said we are not experts  with Xcode and a dummed down explanation would be really appriciated.  Thanks in advance!

    Sorry, but that really isn't going to work. I suggest you create a GitHub account for the project. Start a new project that has the basic structure you want and placeholders for the content. Then, everyone can check out the project and port their single-view app into the final version, replacing a placeholder. Everyone can work independently for a while. But when it comes time to synchronize the changes, everyone should probably be in the same room to collaborate. Do that part one subproject at a time.

  • How can I compile BaseResource.java on iAS 6.0 SP4 on Solaris 8?

    I'm trying to upgrade our application server to SP4 but I can't until I am able to compile a couple hundred AppLogics in SP4. I posted about this last week but got no answer. Here's a simple compile that succeeds in SP2 and fails in SP4 :
    wwwtest% /export/home/iplanet/ias6/ias/usr/java/bin/javac -classpath .:/export/home/iplanet/ias6/ias/classes/java/nab25.jar:/export/home/iplanet/ias6/ias/classes/java/kfcjdk11.jar TBG/BaseResource.java
    TBG/BaseResource.java:0: The method void setSessionTimeout(int) declared in class com.netscape.server.nas.BaseResource cannot override the method of the same signature declared in interface com.kivasoft.ISession2. They must have the same return type.
    package TBG;
    ^
    1 error
    Here's the problem. kfcjdk11.jar was changed btwn
    SP2 and SP4 but nab25.jar wasn't. com.kivasoft.ISession2.setSessionTimeout (in kfcjdk11.jar) changed but com.netscape.server.nas.BaseResource (in nab25.jar) wasn't updated to conform to the new interface declaration. The old nab25.jar is included in the SP4 distribution but it's useless. Any recommendations on how to resolve this issue?

    Hi,
    Greetings to you. I'm interested to know the following.
    1. Are you able to run cxs engine ?. This means, just start the cxs engine
    without any errors before invoking any components with app server.
    2. Does cxs engine crash after you start and kas keeps restarting the cxs
    engine.
    Thanks & Regards
    Raj

  • How can i compile a C program to run solaris 9 and 10?

    Hi,
    I need to compile a small C program to run on solaris 9 and 10. There is no C compiler on the target servers. I have compiled and tested the program on Linux over x86.
    I hope you can advise on the way forward. I see the following options:
    - install a C compiler, the lightest possible, on the target servers and compile the program
    or
    - set-up a sparc solaris (9 or 10) on top of virtualbox on my windows laptop, install the c compiler and then compile the program
    Thanks in advance.
    Gaby

    To run an application on both Solaris 9 and 10, you need to build it on Solaris 9. The application will then run on Solaris 9 and 10. (If you build on Solaris 10, you cannot expect the application to work on 9.)
    The most recent Studio version that can be run on Solaris 9 is Studio 12 (but not updates 1, 2, or 3).
    You can still get Studio 12 here, but since it dates from 2007, I don't know for how much longer.
    http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/ss12-136026.html
    Studio does not do cross-compilation, so you need to build on a system of the same type as the target system -- SPARC or x86. I don't know whether Solaris 9 can be installed on Virtual Box, but you can try. If it works, you can install the compiler, build on that system, then deploy on other Solaris 9 and 10 x86 systems.
    You can of course build the application on each of Solaris 9 and 10, but usually that is not necessary, and it complicates deployment and support.
    I believe Solaris 9 is End Of Life, so it would be a good idea to upgrade S9 systems to S10 or S11. I realize that such a change might not be up to you. :-)

  • How can I compile an entire package  ??

    Hi
    I've downloaded about 20 .java files (these files build a package) and I want to compile them now with javac. Compiling the files one after the other produces unfortunately many errors. The owner of the code told me I've to "compile the entire package" and I should use Borland's JBuilder for that. Installing JBuilder makes trouble so I want to compile the code with javac.
    Do you know how I can compile an entire package with javac ?
    javac *.java doesn't work (produces lots of errors).
    Thanks in advance,
    Marcel

    Hi
    I've downloaded about 20 .java files (these files
    build a package) and I want to compile them now with
    javac. Compiling the files one after the other
    produces unfortunately many errors. The owner of the
    code told me I've to "compile the entire package" and
    I should use Borland's JBuilder for that. Installing
    JBuilder makes trouble so I want to compile the code
    with javac.
    Do you know how I can compile an entire package with
    javac ?
    javac *.java doesn't work (produces lots of errors).
    I doubt it.
    "javac *.java" will compile any dependent class files in the same package.
    There are several possibilities.
    1. There is more than one package.
    2. The class path is wrong. (The class path must have the root of the directory and obviously the java files must exist in a directory tree that mirrors the package.)
    3. Something is wrong with the java files. Or perhaps something is missing.

  • How can I compile servlets?  I'm still having problems...

    Ok, I've installed J2SE and it's been working perfectly using command-line compiling (javac) and also with the Eclipse IDE.
    Now I want to start using Servlets and JSP so I installed the JWSDP (Java Web Services Developer Pack). I couldn't quite figure it out, so I installed J2EE on top of everything.
    Eclipse doesn't recognize "import javax.servlet.*;" and neither does the command-line compiler javac.
    Am I doing something wrong?

    I don't know anything about ServletExec or how it expects you to deploy a Web app. You're on your own there. I don't know if ServletExec supports WAR files or even follows the specifications for directory structures.
    Look, there are two separate issues here: compiling and running.
    Whatever you do, however you do it, you've got to have a JAR in your CLASSPATH that has the javax.servlet and javax.servlet.http packages in it when you compile. You don't need the whole J2EE app server, just the JAR with those packages.
    When you deploy and run the app, you'll do it on the server. It'll have the appropriate JARs.
    To me, app server and J2EE are synonymous. Yes, the j2ee.jar comes with Sun ONE if that's what you've downloaded.
    You can use Tomcat, which is a free servlet/JSP engine. I believe that Sun ONE has Tomcat bundled inside. If so, it'll have the servlet.jar in there somewhere. Tomcat stores it in TOMCAT_HOME/common/lib.
    MOD

  • How can I compile program which uses packages?

    Hi,
    I'm building a program using JBuilder9. I can successfully run using that IDE, but after I try to run it manually (run class file which compiled from JBuilder) by typing "javac myMainClass" it cannot find serveral packages which I put those packages' folder on the same root directory of myMainClass. Thank you.

    Man, you should probably read the following:
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html
    Anyways, the first thing to do is to determine the current value of CLASSPATH (that is a system variable and it depends on your OS how you change/get its value).
    Next thing is to determine WHAT you need to add:
    For each used package check if its (root directory/jar) is in your CLASSPATH. If not add it, e.g.
    - you have a package my.test.package in C:\temp\myJar.jar then add C:\temp\myJar.jar
    - you have a package my.test.package in C:\temp, i.e. your fs structure is C:\temp\my\test\package, then add C:\temp
    For beginners, it's usually a good idea to have your CLASSPATH contain a dot (".") ...

  • How can I compile and run other java classes from within an application?

    Hello there everyone! I really hope that someone can help me. I am writing a program that must be able to compile and run other java classes that are in different files, much like development environments like Kawa or Forte allow you to do.
    There has to be a way of doing this ( I hope!! ), but i can't seem to find it!!
    I have tried using this command to compile:
    Runtime.getRuntime().exec ("c:\\programs\\javac className.java");
    ...and this one to run:
    Runtime.getRuntime().exec ("c:\\programs\\java className");
    ...but neither works!!! I can compile and run classes that are in the same file as my application, but I can't get it to work at all for files in different directories or files.
    PLEASE, PLEASE, PLEASE help me - i've run out of ideas, and i need this to be working in 3 days!!!
    Thank you very much for any help anyone can give me, I really appreciate it!! Thanks again!!
    Adrian ( ...in distress!! )

    public class JavaCompiler{
       public static void main(String[] args)throws Exception{ //sorry bout the laziness
          if(args == null || args.length != 1){
             System.out.println("Usage: java JavaCompiler MyClass.java");
             System.exit(0);
          String className = args[0];
          Runtime rt = Runtime.getRuntime();
          Process p = rt.exec("javac " + className); //consider setting cpath for this
          p.waitFor();
          //now try to run after it is done.
          p = rt.exec("java " + className.substring(0, (className.length() - ".java".length()));
          p.waitFor();
          //do some other stuff
    }This should get you going. You may consider looking into the System.getProperty() method in order to determine the type of OS it is running on in order to findo out what command to run. I know that the sun tool listed above is nice, but by my understanding the sun tools provided are not guaranteed to stay the same. I'm no expert on this matter, but that is one of the reasons there is no API documentation for those tools. Also, I don't believe those tools come packaged with the JRE. (Of course if you are making an IDE it will be expected that the user has an sdk installed. Good luck with figuring this thing out.

  • How can I compile my imported Catalyst project from FB to Android?

    Hi Guys,
    I started to play with Catalyst (Panini), and I got very excited by it, and wound up building a full very polished app. All the while, I had the idea I would import this into Flash Builder, then compile from there it to run on Android. However, when I actually went to do this, there was no option in FB (Burrito) to build my project as a mobile one. If I create a new project from scratch in FB, then I get the mobile option. But I cant seem to make my imported catalyst app show up any mobile build options as all - only web project ones. Its very frustrating, as I have made standalone test SWFs and dropboxed them onto my phone - and the app works well!!
    Im sure I have missed something really simple - can anyone point me in the right direction? I suspect it might have something to do with creating a build profile? Or is there a config I missed in Catalyst? Im no dev-head - so those FB build config screens look a bit intimidating. I might eb able to muddle my way through configuring my Andoind SDK as a build profile - if thats whats I need to do? All help greatly appreciated!
    Cheers

    Well, no answers here.
    I had sety up all my content in a layered Pshop doc first (As Catalyst doc design reccommends). So I have imported that into Flash and I will re-do the animation in Flash to get it onto the Android platform. Its very disappointing as the Catalyst workflow was really appealing, I found I could focus on the content and not worry too much about doing the wrong thing setting up the interactivity.
    Flash Builder on the other hand isnt very Designer freindly at all. Once I got there with my project, I was sweet out of luck getting it anywhere else. Im going to use Flash because it looks like the workflow in the Flash packager for Android is easy to understand and follow.

  • How can I compile?

    Hy,
    I need your help, I cannot compile my programms. I installed jdk1.3.1_01 and set the path (c:\jdk1.3.1_01\bin) but it doesn't work. I don't know why. Can you please help me?

    so your shell is probably just picking up a java command from the WINDOWS directory. Try to execute java -version. I assume this will not be the version you have installed. It's probably just your PATH. You can see its current setting by typing either just SET for the whole environment or echo %PATH% for just your PATH.

  • How Can I Get the Xcode Welcome Screen Back?

    Hello,
    I unchecked the "Show at launch" checkbox on the Xcode welcome screen but now I'd like to have it displayed again.
    Does anyone know how to do this? I'm using version 3.1.1 and there doesn't seem to be an option in preferences.
    Thanks
    Simon

    That's great, thanks very much!

Maybe you are looking for