Thread: MS Visual C++ Link Error

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    2

    Question MS Visual C++ Link Error

    Hi
    I'm trying to create an opengl program but I'm having some problems. Any help I can get from anyone would be great.
    I wrote the program intitially with Salford but it turns out this is a rubbish compiler which does not allow you to run executables unless you have this compiler installed so instead I have got hold of a copy of Microsoft (shudder) visual C++. But alas my program will not run. I keep getting the following error

    Linking...
    LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
    Debug/gal4.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    Stumped I tried compiling code I downloaded from tutorials on the net and found that every one generated the same error. Hence I guess I have the setup wrong somewhere. Does anyone use MSVC++ and have they had similar problems.

    Any help would be greatly appreciated

    Thanks
    Phil

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Create a new Win32 Application instead of a Win32 Console App.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    Registered User
    Join Date
    Jun 2003
    Posts
    2
    Thank you so much XSquared. I've been trying to get this program working for weeks now and you've solved my problems in a single line of text.

    My sincerest thanks

    Phil

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. Errors including <windows.h>
    By jw232 in forum Windows Programming
    Replies: 4
    Last Post: 07-29-2008, 01:29 PM
  3. Quantum Random Bit Generator
    By shawnt in forum C++ Programming
    Replies: 62
    Last Post: 06-18-2008, 10:17 AM
  4. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 08:13 PM
  5. using c++ in c code
    By hannibar in forum C Programming
    Replies: 17
    Last Post: 10-28-2005, 09:09 PM