Thread: How do I add .C Project to my complier?

  1. #61
    Registered User
    Join Date
    Apr 2006
    Posts
    65
    I do not at all know how to compile under IDE. I do not at all know how to switch from the C++ to the C complier. Once again, what is a good C Complier (not C++)?











    Quote Originally Posted by Elysia View Post
    But the thing is that if you write good, conforming code, it will work just as well under C++ as C. I you don't need to work for embedded systems & all that (just learning still), then you can avoid all the loopholes of C by compiling it as C++.
    For example, it disallowed the use of implicit main in the book. If you'd written code with a C compiler instead, it would compile, but you would be told by the members of this board to correct it.
    And VC++ does not warn about implicit main from what I can remember.


    Just a note, though. Don't use notepad.
    Yes, you can use any editor, but I would still recommend Visual Studio. It's a good IDE.


    I don't know if you can trust that. VC++'s compiler is known not to be too friendly on the command line. Better throroughly study the documentation first.

    So I'll continue to recommend that you compile under the IDE.

  2. #62
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Try reading.
    For now, you can continue to use the C++ compiler. Because it will close loopholes and pitfalls in the C language that you can easily stumble into. And yes, Visual Studio can compile as C, if you must, if you just rename your files with a .c extension.

    And you are compiling from the IDE!
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #63
    Registered User
    Join Date
    Apr 2006
    Posts
    65
    Quote Originally Posted by Elysia View Post
    Try reading.
    For now, you can continue to use the C++ compiler. Because it will close loopholes and pitfalls in the C language that you can easily stumble into. And yes, Visual Studio can compile as C, if you must, if you just rename your files with a .c extension.

    And you are compiling from the IDE!

    Elysia,

    Yes, I did read the sticky at top. Yes, The Complete Reference of C was said in that sticky. Does that mean it's a good book for beginners?

  4. #64
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I meant read the replies.
    I clearly outlined that you could benefit from compiling your C source as C++, and I also outlined that it can compile it all as C.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #65
    Registered User
    Join Date
    Apr 2006
    Posts
    65
    Quote Originally Posted by Elysia View Post
    I meant read the replies.
    I clearly outlined that you could benefit from compiling your C source as C++, and I also outlined that it can compile it all as C.
    Read my reply from earlier. I said over and over again, if I am going to learn C then I chose a different book. I have also said I give up with the book I have.

  6. #66
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I did not complain about the book in the later replies.
    I was responding to your question:
    I do not at all know how to compile under IDE. I do not at all know how to switch from the C++ to the C complier. Once again, what is a good C Complier (not C++)?
    Which you should have known the answer to.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #67
    Registered User
    Join Date
    Apr 2006
    Posts
    65
    Quote Originally Posted by Elysia View Post
    I did not complain about the book in the later replies.
    I was responding to your question:

    Which you should have known the answer to.


    Now, I give up. I won't learn C just because I CAN NOT get a decent book. What a shame. It's too bad because I have been asking what is a good book. I have also asked on Dev SHed Forums for a yes or no is The Complete Reference of C a good book or not a good book. I will not learn C.

  8. #68
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    There is a sticky for questions about books.
    And if you don't want to learn C, then it's your loss.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #69
    Registered User
    Join Date
    Apr 2006
    Posts
    65
    Quote Originally Posted by Elysia View Post
    There is a sticky for questions about books.
    And if you don't want to learn C, then it's your loss.
    Alright, I will wait and be patient for replies to roll around in the sticky. I did made a reply.

  10. #70
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    php111...apparently you need more than a book on C, as you seem unable to even adapt to an IDE environment.

    Here is a tutorial on Getting Started with Visual Studio 2008. Give that a try. While the code presented is C++, it will at least give you a feel for how to use the IDE. Once you've got that sort of going on, then you should start your C learning.

  11. #71
    Registered User
    Join Date
    Apr 2006
    Posts
    65
    Quote Originally Posted by rags_to_riches View Post
    php111...apparently you need more than a book on C, as you seem unable to even adapt to an IDE environment.

    Here is a tutorial on Getting Started with Visual Studio 2008. Give that a try. While the code presented is C++, it will at least give you a feel for how to use the IDE. Once you've got that sort of going on, then you should start your C learning.

    Thank you for the tutorial. I will check it out.

  12. #72
    Registered User
    Join Date
    Apr 2006
    Posts
    65
    Step 7. Go to the "Solution Explorer" on the left side and right-click on "AddCalc" but be sure not to right click on "Solution AddCalc (1 project)." Once you have right clicked on AddCalc select "Add-->New Item"


    That is from the book. I don't see Solution Explorer to the left. I did go to View and then Solution Explorer. It didn't do anything. I don't nothing that says AddCalc.

    To the left are from top to bottom: Solution 'C Programming.c' (1 project), C Programming.c and check it to show the minus and under that is Header Files, Resource Files, and Source Files.

    Under each of those, there are nothing to AddCalc.

  13. #73
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    Wow.

    So instead of following the tutorial, which shows you how to create a solution called "AddCalc", you went off the reservation and did your own thing and created a solution called "C Programming".

    Then, you can't put 2 and 2 together and realize you need to substitute what you decided to use as your solution name for what the tutorial used?

    I'm going to have to tell you, this may not be your "thing." You're going to need to rub a couple of brain cells together to get anywhere in the software development field.

    Or maybe you're just a troll.

  14. #74
    Registered User
    Join Date
    Apr 2006
    Posts
    65
    Where the hell does it say to add my own name? Hold on. Let me post the tutorial here.


    Well, I posted from 1-6. Want me post the other steps? Let me know and I can edit my post. I don't see anything that says create my own file name.



    Introduction

    This Tutorial assumes that you have little-to-no knowledge of the C++ Programming Language and are using Microsoft Visual Studio as you first compiler to create a CONSOLE application. The "Help" documentation provided with the piece of software was not helpful to a non-C++ savvy programmer (me at the time), so I had to start from scratch. I couldn't find a sufficiently easy step by step tutorial for creating basic first-time applications, so I wanted to help any similarly-situated people by writing a concise, easy-to-follow, step-by-step w/screenshots tutorial. Plain and Simple.

    Due to the uselessness and waste of memory of such programs as "helloworld.exe", in this tutorial we are going to create an EXTREMELY SIMPLE calculator that can add two numbers together. An added advantage of using this program for the tutorial is that it allows me to demonstrate more aspects of C++. Since this tutorial does not cover object-oriented-programming or other C++ -only functions, this could technically be considered a C tutorial, but it works for C++.

    All that aside, let's begin.



    Opening, Coding, Testing, and Final Work

    Step 1. First, if you haven't already, download Microsoft Visual C++ Studio 2008 Express Edition for free at The Microsoft Visual Studio Downloads Page. This download may take a while to install.

    Step 2. Register and Launch Microsoft Visual C++ Studio 2008 (from here-on-out I will refer to this as Visual C++). The registration process is quick and easy.

    Step 3. In Visual C++, select "File Menu-->New-->Project" (as shown).

    Step 4. In the dialog box that pops up, click on "Win32" in the side pane and select "Win32 Console Application." Make sure that the "Create Directory for Solution" box is NOT checked and leave the default path the same (as shown---You can leave the Create Directory for Solution box checked and change the default path, but for purposes of this tutorial, leave it at the settings shown)

    Step 5. The Win32 Application Wizard will pop up (as shown). Click "Next."
    Step 6. Make sure that the following are checked (as shown):
    ----------1. Under "Application type": Console Application
    ----------2. Under "Additional Options": Empty Project
    ----------Then: Press "OK"

  15. #75
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    See the picture under "Step 4?" Click on it, and read.

    When you need this much guidance, you *really* need to pay attention to everything.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem about making setup project
    By sgh in forum Windows Programming
    Replies: 0
    Last Post: 04-30-2008, 03:09 AM
  2. Add a VS 2K8 express template for .c
    By vtechv in forum C Programming
    Replies: 2
    Last Post: 02-11-2008, 03:13 AM
  3. How to add a file to a project in bloodshed.
    By Smeep in forum C++ Programming
    Replies: 4
    Last Post: 04-22-2005, 09:29 PM
  4. Project details: Dedicated
    By Stack Overflow in forum Projects and Job Recruitment
    Replies: 9
    Last Post: 02-22-2005, 03:10 PM
  5. Can somebody test this code please
    By andy bee in forum C Programming
    Replies: 6
    Last Post: 10-09-2001, 03:08 PM