newbie question

This is a discussion on newbie question within the C++ Programming forums, part of the General Programming Boards category; I have been programming in vb , html, sql, vba, vbs, javascript for a couple of years but am a ...

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    21

    newbie question

    I have been programming in vb, html, sql, vba, vbs, javascript for a couple of years but am a newbie to visual c++. I am teaching myself and am writing my first traditional "hello world" program.

    I have compiled it and get no errors but when I build the .exe I get these error messages:
    --------------------Configuration: Test - Win32 Debug--------------------
    Linking...
    LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
    Debug/Test.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    Test.exe - 2 error(s), 0 warning(s)

    my code is this...
    #include <iostream.h>

    int main()
    {
    cout << "Hello World, God loves you!\n";

    return 0;
    }

    Does anyone know why I am getting this error?

    Jose

  2. #2
    Registered User cody's Avatar
    Join Date
    Sep 2001
    Posts
    86

    Win32 application?!

    Hi,

    it appears to me that you have created a win32 application. These application requires a _WinMain function instead of the normal main function.

    I'd recommend to use a console appication for your first programs. They will compile with the normal main function...

    enjoy!
    cody
    #include "reallife.h"

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    21

    that was it, thanks

    that fixed it, thanks.
    Jose

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Stupid Newbie question
    By TimL in forum C++ Programming
    Replies: 4
    Last Post: 07-22-2008, 04:43 AM
  2. C prog newbie question
    By Draginzuzu in forum C Programming
    Replies: 1
    Last Post: 02-03-2003, 05:45 PM
  3. a stupid question from a newbie
    By newcomer in forum C++ Programming
    Replies: 4
    Last Post: 01-11-2003, 03:38 PM
  4. confusion with integers (newbie question)
    By imortal in forum C Programming
    Replies: 7
    Last Post: 12-06-2002, 03:09 PM
  5. newbie class templates question
    By daysleeper in forum C++ Programming
    Replies: 2
    Last Post: 09-18-2001, 09:50 AM

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