CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 1999
    Posts
    13

    error LNK2001: unresolved external symbol

    when I am trying to build my Application in VC6.0; I am geting the following error at the time of Linking

    Linking...
    Creating library Debug/thrdlib.lib and object Debug/thrdlib.exp
    LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
    Debug/thrdlib.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.


  2. #2
    Guest

    Re: error LNK2001: unresolved external symbol

    This link error occurs if u haven't created the workspace using VC++ appwizard. If u have just typed in a .ccp/.c file and pressed the build button on VC++, u will be prompted with the msg "Do u want to create a default workspace". The default workspace may not have the necessary settings required giving rise to build error. The remedy is to create a suitable (Win32 console appl/MFC Exe or whatever) workspace and include ur files into the project and hten give for a compilation. Hope this will solve ur problem
    Regards,
    Satadal
    [email protected]


  3. #3
    Join Date
    Apr 1999
    Posts
    13

    Re: error LNK2001: unresolved external symbol

    I have tried all the possible remedies suggested by you.Still same error is coming, I think some modifications are required in Project settings, but dont know what it is.
    Any way Thanks for try.


  4. #4
    Join Date
    May 1999
    Location
    Antwerp, Belgium
    Posts
    136

    Re: error LNK2001: unresolved external symbol

    Make a new Console Project. Then select "Empty project" in the wizard. Add your code as a new source file to this project. That should do it.


  5. #5
    Join Date
    Apr 1999
    Posts
    13

    Re: error LNK2001: unresolved external symbol

    I have tried that also, Still problem is not solved.


  6. #6
    Join Date
    Apr 1999
    Posts
    14

    Re: error LNK2001: unresolved external symbol

    Hi...
    i have seen you problem with the unresolved symbol...
    I have exactly the same error.
    Did you manage to do something good about it?


    Thanks for any help...

  7. #7
    Join Date
    May 1999
    Location
    Seattle, WA USA
    Posts
    423

    Re: error LNK2001: unresolved external symbol

    if you are building a Console App, then you need to define a main procedure. If you are wishing to build a Win32 app, then you need to create a win32 project instead of a Console project (or change the build settings on your current project)

    --michael


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured