Output is command dos prompt not windows/frames

This is a discussion on Output is command dos prompt not windows/frames within the Windows Programming forums, part of the Platform Specific Boards category; Being programming in Visual Studio 2005 now for two weeks and had no issues with output... Since yesterday, when i ...

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    610

    Output is command dos prompt not windows/frames

    Being programming in Visual Studio 2005 now for two weeks and had no issues with output... Since yesterday, when i create new Win 32 Console Application projects, and try to run them. I get a command DOS output with "press any key to continue" text... Is this a setting i may have changed?

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,424
    I get a command DOS output with "press any key to continue"
    And what do you expect?
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    610
    Ok, here's what' happening.. When i create a project, two .cpp files are added to the project, one is "stdafx.cpp" and other is "projectname.cpp" which contains these lines..

    Code:
    #include "stdafx.h"
    
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    	return 0;
    }
    I suspected this is where DOS is run, but when i remove this file rebuild the project, no .exe file gets created... ???

    Code:
    	
    
    Linking...
    MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
    c:\Quest Projects\Visual Studio\Radar\RFSRange\Debug\RFSRange.exe : fatal error LNK1120: 1 unresolved externals
    Last edited by csonx_p; 04-25-2008 at 02:22 AM.

  4. #4
    Registered User
    Join Date
    Apr 2008
    Posts
    610
    Quote Originally Posted by vart View Post
    And what do you expect?
    A window which i've created using WinMain()

  5. #5
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,424
    Quote Originally Posted by csonx_p View Post
    A window which i've created using WinMain()
    WinMain is for Windows application, not for Console application - so decide what you want to create
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. execl()/fork() output
    By tadams in forum C Programming
    Replies: 19
    Last Post: 02-04-2009, 02:29 PM
  2. Trying to store system(command) Output
    By punxworm in forum C++ Programming
    Replies: 5
    Last Post: 04-20-2005, 06:46 PM
  3. Output problems with structures
    By Gkitty in forum C Programming
    Replies: 1
    Last Post: 12-16-2002, 04:27 AM
  4. Output in DOS Prompt
    By siumui in forum C Programming
    Replies: 4
    Last Post: 12-06-2002, 10:27 PM
  5. sorting output on student info program
    By indigo0086 in forum C++ Programming
    Replies: 2
    Last Post: 11-05-2002, 10:29 AM

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