Re: LNK2001 error



On Oct 9, 7:28 am, mandar <mandarm...@xxxxxxxxx> wrote:
Configuration: TDMA - Win32 Debug--------------------
Linking...
dfor.lib(DFORMAIN.OBJ) : error LNK2001: unresolved external symbol
_MAIN__
Debug/TDMA.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

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

What kind of target are you trying to build (i.e., a library? an
executable?).

If it's a library, then you shouldn't include a unit identified as
PROGRAM in your code (even implicitly)... and make sure you're using
the proper kind of project.

If your target is an executable, do the opposite, that is, include a
unit identified as PROGRAM. Internally, your compiler will rename the
main PROGRAM unit as _MAIN__ ---thus resolving the linking error.

.



Relevant Pages

  • creating new project in visual studio 6
    ... I am trying to remember how I used to open a new project in visual studio 6. ... Debug/try.exe: fatal error LNK1120: 1 unresolved externals ... Error executing link.exe." ...
    (microsoft.public.vstudio.general)
  • creating new project in visual studio 6
    ... I am trying to remember how I used to open a new project in visual studio 6. ... Debug/try.exe: fatal error LNK1120: 1 unresolved externals ... Error executing link.exe." ...
    (microsoft.public.vstudio.development)
  • Re: LNK2001: Unresolved External Symbol "public:"
    ... I'm sorry I did not post my error message which is ... Debug/Main.exe: fatal error LNK1120: 1 unresolved externals ... Error executing link.exe. ...
    (microsoft.public.vc.language)
  • error link 2001???
    ... Linking... ... Debug/ifdpar.exe: fatal error LNK1120: 1 unresolved externals ... Error executing link.exe. ...
    (comp.lang.fortran)
  • Question on the use of Matcom4.5
    ... codes into C++/VC codes.Now I have some problems on my work. ... 1).I added the Cmath library of Matlab into the project.But when I ... Debug/rundcpf.exe: fatal error LNK1120: 1 unresolved externals ... Error executing link.exe. ...
    (comp.soft-sys.matlab)