Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Is it possible to compile and run C code in Visual Studio?

Options
  • 07-07-2008 8:01pm
    #1
    Closed Accounts Posts: 12,382 ✭✭✭✭


    Hello

    I'm using an ancient C compiler which crashes every now and then when I do large calculations.

    I've tried to create a new project in VS, but I'm only offered Visual C++, C#, J# and VB.

    Do any of you know if I can compile and run C code in Visual Studio?

    Thanks


Comments

  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    From what I can see on Google the MS C++ compiler should compile C code as long as it is in a project file.


  • Registered Users Posts: 3,568 ✭✭✭ethernet


    Visual Express C++ can compile C so there's no reason why Visual Studio can't. Select to create a C++ project but, when adding a file, be sure to truncate the file ending to just '.c'.


  • Registered Users Posts: 2,426 ✭✭✭ressem


    As Ethernet said,
    or for existing projects right click on the project or file, Configuration C/C++, Advanced.

    Compile as C code.


Advertisement