making a console application with MSVC++ Express 2005

since there is no project (that i could find) for making a console application i used general->empty project... but i can't seem to get it to work... i tried changing properties->linker->system->sub system to console but then it produces this error

unresolved external symbol _main referenced in function ___tmainCRTStartup

any help is appreciated



Answer this question

making a console application with MSVC++ Express 2005

  • Sovman

    all you have is [

    you need

    int main()

    {

    return 0;

    }


  • Tegs

    I see nothing!

  • Joel C

    What Martin said.

    Please restore the settings. The General | Empty Project is all you need for making a standard C/C++ console application.

    I suggest you find one of the standard simple programs (like "Hello World") that are all over the place to confirm that your settings are working.

    Also, when the compilation succeeds, it is important to know that the way to execute it from within Visual C++ 2005 is with Ctrl+F5. Otherwise, the console window will be created and disappear as soon as the program ends, and that may be too fast to observe.

    - Dennis



  • Heathcliff

    i found out the problem was due to a a library i was using, i needed to add,

    #define USE_CONSOLE

    so now its fixed.


  • sasman

    You have no main function in your program code. Thas the problem. Every C/C++ console program needs a main function.



  • REDLINE

    i have a main function... here it is.

    [


  • making a console application with MSVC++ Express 2005