VC ++ 6.0 program compiling but not linking

June 15, 2009 at 20:39:39
Specs: Windows Vista
Hi I am a newbee in VC++ and I am trying to run a test code.

This code compiles but when I try to build the project, the link fails and gives me this.

--------------------Configuration: test 2 - Win32 Debug--------------------
Linking...
LINK : fatal error LNK1104: cannot open file "Debug/test 2.exe"
Error executing link.exe.

test 2.exe - 1 error(s), 0 warning(s)


See More: VC ++ 6.0 program compiling but not linking

Report •


#1
June 17, 2009 at 08:02:49
Google
One useful suggestion turned up is to disable your security (anti-virus) software before compiling.

Report •

#2
June 17, 2009 at 10:13:45
It still showed the same error, any other suggestions?

Report •

#3
June 17, 2009 at 13:09:19
In keeping with the more obvious pitfalls, make sure UAC is disabled.

Report •

Related Solutions

#4
June 17, 2009 at 14:24:57
Nice! it works! Thanks, but now I have a new error

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

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


Report •

#5
June 17, 2009 at 15:54:51
Does your program have a _main function? 'Cause it really should. (I think VC++ uses _main() instead of main().)

Report •

#6
June 17, 2009 at 17:30:33
When I am using main() the program compiles, but does not link and gives the error mentioned above. I tried using the _main() but thats giving compiling errors.


Report •


Ask Question