Error

This is a discussion on Error within the Game Programming forums, part of the General Programming Boards category; I have a problem to compile my programm. I dont know what is wrong with it. This is the error ...

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

    Error

    I have a problem to compile my programm. I dont know what is wrong with it. This is the error message i get

    Linking...
    LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
    Debug/SlideShow.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    Can anyone help me? Thankx

  2. #2
    Registered User JoshG's Avatar
    Join Date
    Mar 2002
    Posts
    326
    I don't really know, and this probably isn't it, but did you include windows.h?

  3. #3
    Registered User
    Join Date
    May 2002
    Posts
    66
    The linker cannot find an object that contains the method CRT uses to call your main. You may be trying to build a Console app using Windows application framework?! I suspect you may have picked/changed the project flags to a target which is not implemented by you.

    Bottom line is WinMain() is not found by the linker.

  4. #4
    Registered User Invincible's Avatar
    Join Date
    Feb 2002
    Posts
    210
    Yeah, if you chose "Win32 Application" from the new projects dialog then you have to have WinMain() as you main function. If you're doing console it's just main() but you have to specify "Win32 Console Application" in the new project settings dialog. You can also change this in your project settings under the link tab by changing /subsystem:windows to /subsystem:console in the project options box.
    Last edited by Invincible; 06-01-2002 at 12:10 AM.
    "The mind, like a parachute, only functions when open."

  5. #5
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    I did that when I first started... I was being a wise guy and made a windows app thinking that I could do cout << "Wasup" and it make a window

    Oh boy...
    What is C++?

  6. #6
    Registered User
    Join Date
    Nov 2001
    Posts
    21
    thank you guys, i found my problem!!!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 09:18 PM
  2. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 10:15 PM
  3. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 02:17 PM
  4. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 10:33 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 01:10 AM

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