_WinMainCRTStartup error

_WinMainCRTStartup error

Post by CYoung12 » Thu, 04 Apr 2002 04:40:21



I just recently purchased CW-Learning Edition V2.  I have tried all of the
tutorials, and all of the instructions of the textbook, and cannot get a simple
"Hello world" program to run.  I have created new projects, new text files,
added them, saved them, renamed them, compiled them - nothing.
I usually get the message in the subject line when I try to run it.  I have
tried empty projects, Win 32 C/C++ Application Stationery.  I am obviously new
to this, but it is really frustrating (especially with my first Lab due!).

Is there some kind of global settings or preferences?  Thanks in advance for
any help.

 
 
 

_WinMainCRTStartup error

Post by MW Ro » Thu, 04 Apr 2002 05:34:54




>I just recently purchased CW-Learning Edition V2.  I have tried all of the
>tutorials, and all of the instructions of the textbook, and cannot get a simple
>"Hello world" program to run.  I have created new projects, new text files,
>added them, saved them, renamed them, compiled them - nothing.
>I usually get the message in the subject line when I try to run it.  I have
>tried empty projects, Win 32 C/C++ Application Stationery.  I am obviously new
>to this, but it is really frustrating (especially with my first Lab due!).

>Is there some kind of global settings or preferences?  Thanks in advance for
>any help.

Try this and let me know if this works.  If not it is a setup problem if
it does work then we need to look to see what you are doing wrong.

Ron

1)  Launch the CodeWarrior IDE from the start menu

2)  Chose New... from the FILE menu

3)  Type in your project name and Set the location you want to put it.

4)  Making sure you have the Project tab selected
    Double click on the Win32 C++ Stationery
    Select the Win32 Console App and expand it
    Select the C++ Console App
    Click OK making sure the stationery is highlighted

== Test your project here  by selecting run or pressing
control F7  to compile, F7 to build  or F5 to build and run ==

If that does not run let us know
If it works then alter it to have your own code either by changing
hello.cpp or replacing the file as below.

5) Highlight the place holder source file, probably Hello.cpp
 Chose saveAs and name it, being sure to give it a.cpp extension.
change the code to

#include <iostream>
using namespace std;

    int main()
    {
        cout<<"This is just to test this"<< endl;
        return 0;
    }

OR
5)  Chose New Text File from the FILE menu to get a new editor window

  Type in your code

#include <iostream>
using namespace std;

    int main()
    {
        cout<<"This is just to test this"<< endl;
        return 0;
    }

  Chose save and name it being sure to give it a .cpp extension.
  From the PROJECT menu chose Add Window,
    or Add Files to select your source code.

 (cosmetics only ) drag your file up to the Sources segment  

 Highlight the <hello.cpp> file and delete it with the File
    menu option or by pressing  control - delete  

6) == Test your project here  by selecting run or pressing
control F7  to compile, F7 to build  or F5 to build and run ==

--
       TOP PICK   HandHeld Computing - issue 4.5
   "The best overall development tool for the Palm OS"

 Metrowerks, maker of CodeWarrior  -  "Software Starts Here"  


 
 
 

_WinMainCRTStartup error

Post by CYoung12 » Fri, 05 Apr 2002 01:51:47


OK -progress, however when I got to step 4, I could not figure out how to get
Win32 C App to "expand"  - it only gave me the option of one or the other
When I chose Win32 C App - I got error messages from one of the files that were
added

When I chose C++ Console App, it ran and displayed the test message.

Am I fixed?  If so, thank you very much.
If not, what should I do next?
What if someday I want a Win32 C App?

 
 
 

_WinMainCRTStartup error

Post by MW Ro » Fri, 05 Apr 2002 08:00:42




>OK -progress, however when I got to step 4, I could not figure out how to get
>Win32 C App to "expand"  - it only gave me the option of one or the other

right that is all there is under the GUI

Quote:>When I chose Win32 C App - I got error messages from one of the files that were
>added

That is because it is a GUI  and Microsoft doesn't use main  so you have
to use winMain and all the initialization and stuff for that.  So you
can't do normal code and you certainly would get a WinMainCRTStartup
error message.

Quote:>When I chose C++ Console App, it ran and displayed the test message.

>Am I fixed?  If so, thank you very much.

Nothing was broke you were just trying to use the wrong stationery
before.

Quote:>If not, what should I do next?
>What if someday I want a Win32 C App?

You use Windows  code.  

Ron

--
       TOP PICK   HandHeld Computing - issue 4.5
   "The best overall development tool for the Palm OS"

 Metrowerks, maker of CodeWarrior  -  "Software Starts Here"  

 
 
 

1. ERROR: getservbyname call failed, system error is 'Error 0'

Hi,

I'm getting the following error during sas invocation and SAS failed to
start. Any one got any idea?

/sas/sasv8 $ ./sas
NOTE: Copyright (c) 1999-2000 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software Release 8.1 (TS1M0)
      Licensed to SAS INSTITUTE TRIAL SITE, Site 0004176028.
NOTE: This session is executing on the SunOS 5.6 platform.

NOTE: SAS initialization used:
      real time           0.11 seconds
      cpu time            0.04 seconds

ERROR: getservbyname call failed, system error is 'Error 0'.
ERROR: Bridge protocol engine access method TCP/IP failed to initialize.
NOTE: The SAS System used:
      real time           0.14 seconds
      cpu time            0.07 seconds

Rgs,
Tshun Ket

2. converting a gif file to a postscipt file

3. Vuescan Error- POW: Overflow error

4. serial question?

5. Error: disk read error occurred

6. yahoo! switches from 'opt-in' to 'opt-out'

7. Run-time error '1005' - Error in formula - help!

8. MacOSX, VueScan and OmniPagePro

9. XL5 VBA - On Error trappable errors problem

10. Error in loading DLL (Error 48) trying to open templates in Excel 5.0

11. Microsoft Excel dies with a Type 1 (bus error) error.

12. Javelin Linker Error - [Error JVM-0017] Unable to load class file: