Results 1 to 10 of 10
  1. #1
    k01
    Guest
    MS Visual C++ to XCode
    Hi, I am very new to C++ and am trying to use code written in MS Visual C++ in XCode. I have the help of experienced C++ programmers, but most use PCs and one codes on Linux machines. Unfortunately, the combined knowledge doesn't quite solve the problem of running Visual C++ programs in XCode. I'd really appreciate any advice on how to go from one to the other! thanks

  2. #2


    Member Since
    Jul 25, 2004
    Location
    Gaithersburg, MD
    Posts
    389
    Specs:
    Mac Pro 2.6ghz Quad Xeon, 23" Cinema
    Just use gcc.

  3. #3
    echo12
    Guest
    Question Does XCode work?
    Quote Originally Posted by k01
    Hi, I am very new to C++ and am trying to use code written in MS Visual C++ in XCode. I have the help of experienced C++ programmers, but most use PCs and one codes on Linux machines. Unfortunately, the combined knowledge doesn't quite solve the problem of running Visual C++ programs in XCode. I'd really appreciate any advice on how to go from one to the other! thanks
    I just posted a question in Mac Software about Visual Studio. I just started my first programming class in college and they use Visual Studio to compile C++. I have my own PowerBook and would like to write on it but my code has to compile in Visual Studio for credit. Can I do this with XCode?

  4. #4
    josgraha
    Guest
    The short answer for questions about porting code between XCode and Visual Studio is "yes" with a *huge* disclaimer and that is your code is 100% portable between platforms. Also XCode and Visual studio both have their own build scripts so you will have a bunch of extra files like the project files and build scripts. I used to do stuff like that with Project Builder and Visual Studio. I would just check the project into cvs or copy the project directory over to each machine, then open up the project file for that platform. Your code will have to be 100% portable ANSI C or C++ and this also assumes you are not binding to some "linux" type library such as flex or bison which you will have to get compiled on each platform.
    I posted a reply discussing what tools are available for OSX and why I think their development tools are nice. Have fun

    http://www.mac-forums.com/forums/showthread.php?t=8756

  5. #5
    yeailovetosurf
    Guest
    gcc help
    Quote Originally Posted by gort
    Just use gcc.
    Hey I use to compile my programs in the terminal using the g++ command until my laptop got stolen and now that I have a new one for some reason its not working it keeps telling im missing the header file iostream. Can you help?

  6. #6

    iaminvincible's Avatar
    Member Since
    May 12, 2004
    Location
    Atlanta, GA
    Posts
    81
    Specs:
    15" MacBook Pro, 2.16Ghz, 1GB ram
    Quote Originally Posted by echo12
    I just posted a question in Mac Software about Visual Studio. I just started my first programming class in college and they use Visual Studio to compile C++. I have my own PowerBook and would like to write on it but my code has to compile in Visual Studio for credit. Can I do this with XCode?
    Hey I am in the same situation. were you able to figure out how to do it? I want to know what is the equivalent for a WIN32 Console application in XCode as obviously, my professor uses Windoze...does anybody know?
    An apple a day keeps the doctor away...

  7. #7

    MacAddikt's Avatar
    Member Since
    Dec 30, 2002
    Location
    Sunny So Cal
    Posts
    2,118
    Specs:
    G52x1.81.53208x+/-
    i used XCode for my C programming class. makes an .out file that you can execute in the terminal. by default it makes the file name a.out

    to make a WIN executable, i used Dev C++ at school or work.

  8. #8

    iaminvincible's Avatar
    Member Since
    May 12, 2004
    Location
    Atlanta, GA
    Posts
    81
    Specs:
    15" MacBook Pro, 2.16Ghz, 1GB ram
    Quote Originally Posted by MacAddikt
    i used XCode for my C programming class. makes an .out file that you can execute in the terminal. by default it makes the file name a.out

    to make a WIN executable, i used Dev C++ at school or work.
    thanks for the reply. the problem is that I need to submit my assignments as a .cpp file. I tried using the simple code we used on visual C++ 6.0. Does xcode have the same libraries as Visual C++? for example, this is the code i used in Visual:

    #include <iostream.h>

    int main()
    {
    cout << "Welcome to CIS 3260.";

    return 0;

    }

    but it doesn't work with xcode. should it? thanks
    An apple a day keeps the doctor away...

  9. #9

    MacAddikt's Avatar
    Member Since
    Dec 30, 2002
    Location
    Sunny So Cal
    Posts
    2,118
    Specs:
    G52x1.81.53208x+/-
    not sure if gcc comes with the iostream.h, i remember it didnt like conio.h. but i found the iostream header file in my Dev C files here at work if you need it.

  10. #10


    Member Since
    Dec 28, 2003
    Location
    Long Island, NY
    Posts
    911
    Specs:
    15" MacBook Pro & 23" ACD
    It needs the using namespace std;
    below the #include lines'

    ex.
    #include <vector>
    using namespace std;

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Visual studio On OS X
    By Yodda_Hunter in forum OS X - Apps and Games
    Replies: 9
    Last Post: 06-09-2013, 06:39 AM
  2. Xcode stopped letting me run Xcode app on iPad
    By ildsarria in forum iOS Development
    Replies: 1
    Last Post: 11-09-2011, 03:15 PM
  3. Visual Lightbox and Visual Slideshow
    By telecarver1 in forum Web Design and Hosting
    Replies: 0
    Last Post: 05-11-2011, 05:05 PM
  4. Visual Hub is gone...
    By eliehass in forum Movies and Video
    Replies: 2
    Last Post: 10-03-2008, 04:29 PM
  5. Features I miss from Visual Studio, now using xCode...
    By RChickenMan in forum OS X - Development and Darwin
    Replies: 0
    Last Post: 10-18-2005, 11:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •