I just don't get this....

This is a discussion on I just don't get this.... within the C++ Programming forums, part of the General Programming Boards category; Using Visual C++ .NET 2002. I have absolutely no idea why one project will build, but another won't. For the ...

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    6

    I just don't get this....

    Using Visual C++ .NET 2002.

    I have absolutely no idea why one project will build, but another won't. For the longest time I couldn't get anything to build. I'm hitting F5 to do this. I followed the instructions in a tuturial and eventually got a project to build... ya know, the typical hello-world.

    ========
    #include <iostream>
    using namespace std;

    int main()
    {
    cout << "Hello World...." << endl;
    return 0;
    }
    ========

    I created a new project more recently, same options... Console Win32 app, blank. I then added a blank C++ to the project. Now, when I code the same thing above and hit F5, I get the following errors:

    MyProject_Test error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup

    and

    MyProject_Test fatal error LNK1120: 1 unresolved externals

    With such simple code, how could this possibly be erroring out from one project to the next? ;/ so confused.....

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    You did a Win32 app instead of a Win32 Console App.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    Registered User
    Join Date
    Jul 2003
    Posts
    6
    Can we just delete this thread now? *blush* :/

    thanks much, I don't know why I'm so blind sometimes....

  4. #4
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    You definitely aren't the only person who's done that.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

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