Completly new to C++

This is a discussion on Completly new to C++ within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by C+noob .net c is microsofts puny and unsuccessful attempt to eliminate C DEV ALL THE WAY! GO ...

  1. #31
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Quote Originally Posted by C+noob
    .net c is microsofts puny and unsuccessful attempt to eliminate C DEV ALL THE WAY!

    GO BLOODSHED!!
    Have you gone mad?!

    Microsoft has no reason to care about GCC.
    a) It is very unlikely that any professional software development company is going to use the Dev C++ environment.
    b) Their choice of compilers is likely to be based on what OS they target, and if they target more than one OS, they may well use a different compiler on each.
    -- .NET makes sense on a Windows platform. It is a professional environment with a very good compiler.
    -- GCC is quite popular (and a very good compiler) on other platforms (such as *nix), and emacs and vi often take up the editing jobs (although there is a great deal of variability between programmers). But, it certainly isn't the only one.

    I'm not particularly fond of the MS products myself, but there are many considerations that must go in to trying choosing a good compiler and environment. While free ("more like free beer than freedom") advice abounds for GCC, I'm sure it's easier to get professional support for MSVS; just one consideration.

    And ranting does nothing to prove a point.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  2. #32
    Registered User
    Join Date
    Nov 2001
    Posts
    255
    it says when i hit ctrl + F5:

    unable to start debugging

    unable to start program "location of the files here".exe

    the system cannot find the file specified

    big red circle white x is the warning message box type it says all that in

    i did a search and it couldnt find that exe file so apparently it never made it

    so now what?

    and im sure.net is a mature very good compiler especially if this so called portablity you speak of works cause hey anything that is a compiler that is 6 cd's to install cant be ALL bad lol but if its not portable eh SUCKY unless its for windows but yes see above question
    hooch

  3. #33
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    VC++ .Net is one of the most standards-compliant compilers available, so if you write portable, standards-compliant code on it then your code will be portable. It just adds a lot of extra stuff that you have to learn how to skip or ignore.

    Usually Ctrl-F5 executes the program and F5 debugs it, so are you sure you are getting that error message when you hit Ctrl-F5?

    Where is the folder the executable is output to? You can find this information by looking in the project properties, under Linker there should be an Output File property that has a path. That is the path to look for when you look for the executable. If the executable is not there, then did your build finish?

    Maybe you are compiling the file but not building the project. After you compile you must link to create the exe, and building does this automatically . To build you go to the Build menu and hit Build Solution (F7 for me). What does the output window say after your build? Hopefully something like this: "Build: 1 succeeded, 0 failed, 0 skipped".

    Chances are one of those steps is going wrong.

  4. #34
    The N00b That Owns You!
    Join Date
    Jul 2005
    Location
    Canada!
    Posts
    178

    Wink

    Quote Originally Posted by Zach L.
    Have you gone mad?!

    Microsoft has no reason to care about GCC.
    a) It is very unlikely that any professional software development company is going to use the Dev C++ environment.
    b) Their choice of compilers is likely to be based on what OS they target, and if they target more than one OS, they may well use a different compiler on each.
    -- .NET makes sense on a Windows platform. It is a professional environment with a very good compiler.
    -- GCC is quite popular (and a very good compiler) on other platforms (such as *nix), and emacs and vi often take up the editing jobs (although there is a great deal of variability between programmers). But, it certainly isn't the only one.

    I'm not particularly fond of the MS products myself, but there are many considerations that must go in to trying choosing a good compiler and environment. While free ("more like free beer than freedom") advice abounds for GCC, I'm sure it's easier to get professional support for MSVS; just one consideration.

    And ranting does nothing to prove a point.

    no no no im still mentally intact, as well with a great error/warning system etc that VC++ has, its not always as professional as you lead it to be.

    two computer games published by EA were made with Dev Cpp so dont say that toward me, i know this because my uncle works in EA Canada in Vancouver. hes the one that told me to start programming in the first place
    New Function!!!!

    glAddIdol(C+noob);

    The feeling of rusty spoons against my salad fingers is almost ORGASMIC

  5. #35
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Yes, I know GCC can be used to create commercial software. I've worked for a company that did so. Dev C++ does not make anything. It is an IDE -- a pretty editor. If professional programmers choose to use it, that's their business. They may well choose to use other editors as well: jEdit, emacs, vi, or Notepad if they bloody feel like it. It is not the only compiler out there that can create commercial grade software -- especially for the Windows platform.

    I have no great love of Microsoft or of any of its IDEs. In fact, I much prefer not to use them. However, you are not giving them any sort of fair/objective treatment at all!
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  6. #36
    Registered User
    Join Date
    Nov 2001
    Posts
    255
    Quote Originally Posted by Daved
    VC++ .Net is one of the most standards-compliant compilers available, so if you write portable, standards-compliant code on it then your code will be portable. It just adds a lot of extra stuff that you have to learn how to skip or ignore.

    Usually Ctrl-F5 executes the program and F5 debugs it, so are you sure you are getting that error message when you hit Ctrl-F5?

    Where is the folder the executable is output to? You can find this information by looking in the project properties, under Linker there should be an Output File property that has a path. That is the path to look for when you look for the executable. If the executable is not there, then did your build finish?

    Maybe you are compiling the file but not building the project. After you compile you must link to create the exe, and building does this automatically . To build you go to the Build menu and hit Build Solution (F7 for me). What does the output window say after your build? Hopefully something like this: "Build: 1 succeeded, 0 failed, 0 skipped".

    Chances are one of those steps is going wrong.
    hmm i have NO clue how to link something else in so its compiling the file then i hit the ctrl F5 and it gives me the above error message from my last post.

    so this link to create the exe yea i have not the slightest clue how to do that im used to compile run WALA exe file. but i havent learned anything fancy outside of C++ itsself none of this linking business.

    and yea it gives me that build 1 succedded blah blah part just fine

    although i clicked on that build menu - project only and clicked link and it gave me this:

    ok error LNK2001: unresolved external symbol _mainCRTStartup
    ok warning LNK4001: no object files specified; libraries used
    ok fatal error LNK1120: 1 unresolved externals

    so it cant seem to link???? if that helps any??? since i think thats what you are saying is the problem
    hooch

  7. #37
    Registered User
    Join Date
    Nov 2001
    Posts
    255
    Quote Originally Posted by Zach L.
    Yes, I know GCC can be used to create commercial software. I've worked for a company that did so. Dev C++ does not make anything. It is an IDE -- a pretty editor. If professional programmers choose to use it, that's their business. They may well choose to use other editors as well: jEdit, emacs, vi, or Notepad if they bloody feel like it. It is not the only compiler out there that can create commercial grade software -- especially for the Windows platform.

    I have no great love of Microsoft or of any of its IDEs. In fact, I much prefer not to use them. However, you are not giving them any sort of fair/objective treatment at all!

    LOLOL good ol fashioned notepad lol the TRUE COMPILER
    hooch

  8. #38
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    Now we are getting somewhere. In VC++, you create a project. You add your source and header files to that project. To get a program from the source code, you must build the project. A solution is like a workspace that holds one or more projects, and if you've created a project a solution should be created for you. So to get a program you should go to Build->Build Solution, and it will automatically compile all the source files in the project and then link them together. Unfortunately, it sounds like you haven't added your source file to your project. That might have been my fault because earlier I was under the impression that it would add it to the project automatically.

    So from the beginning follow these steps (Note, this is from VC++ .NET 2003, 2005 is similar but not necessarily exact):

    * Open Visual Studio. If any solution opens automatically, close it.
    * Go to File->New->Project...
    * Under Visual C++ Projects->Win32 select Win32 Console Application.
    * Enter your project name and location, click OK.
    * In the wizard that appears, switch to Application settings and check the Empty project option. Click Finish.
    * Go to File->Add New Item...
    * Under Visual C++ select C++ File (.cpp).
    * Type in a file name, click Open.
    * In that file, add the code below:
    Code:
    #include <iostream>
    using namespace std;
    
    int main()
    {
        cout << "Hello World.";
        cin.get();
    }
    * Save the file (Ctrl-S).
    * Go to Build->Build->Solution to build the solution.
    * The output should look something like this:
    Code:
    ------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
    
    Compiling...
    main.cpp
    Linking...
    
    Build log was saved at "file://c:\My Solutions\HelloWorld\Debug\BuildLog.htm"
    HelloWorld - 0 error(s), 0 warning(s)
    
    
    ---------------------- Done ----------------------
    
        Build: 1 succeeded, 0 failed, 0 skipped
    * Go to Debug->Start Without Debugging to execute the program (Ctrl-F5).

    I think the problem was just that the file wasn't added to your project, so when it built the project it didn't do anything. Just a minor detail that makes a big difference.

  9. #39
    Registered User
    Join Date
    Nov 2001
    Posts
    255
    AHHH YES it is portable i now feel WAY WAY WAY WAY less annoyed using this in school though unfortunently they still teach managed C++ but oh well at least i know i can use portable C++ on it

    ok so yea i guess .net works for me then fair enough

    though does this portable trick work for the VB versions and other langauges????
    hooch

  10. #40
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    >>though does this portable trick work for the VB versions and other langauges????
    'Portable' usually refers to cross-compilable. In other words, it generally means if you take the code and run it through a different standards-compliant compiler on any other platform, it will still compile/link properly and generate a working executable for that platform.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  11. #41
    Registered User
    Join Date
    Nov 2001
    Posts
    255
    Quote Originally Posted by Hunter2
    >>though does this portable trick work for the VB versions and other langauges????
    'Portable' usually refers to cross-compilable. In other words, it generally means if you take the code and run it through a different standards-compliant compiler on any other platform, it will still compile/link properly and generate a working executable for that platform.
    i mean it wont give me this it needs the .net framework to run BS?
    hooch

  12. #42
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Honestly, I haven't used VB.NET yet, but I imagine there should be a way. Sorry I can't be more specific.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  13. #43
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    Sorry, I don't know about VB either. It might because VB is a Microsoft language as opposed to C++ which has its own standard.

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21