Thread: How to resolve linking errors?

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    33

    How to resolve linking errors?

    Why is it that when I compile syntactically correct code for the first time(right after I open the compiler) the compiler says it has 0 errors, but every subsequent time the compiler says there is a linking error? Currently, I resolve this by closing the file and my compiler and then reopening each of them. It becomes a hassle to do this every time. What is the best way to approach this?

  2. #2
    TransparentMember correlcj's Avatar
    Join Date
    Jun 2002
    Posts
    378
    Why is it that when I compile syntactically correct code for the first time(right after I open the compiler) the compiler says it has 0 errors, but every subsequent time the compiler says there is a linking error? Currently, I resolve this by closing the file and my compiler and then reopening each of them. It becomes a hassle to do this every time. What is the best way to approach this?
    I used to have problems with that too. Sometime if i steal code from another program i've built with different header files it tends to look for them. But i do not need them or forgot to add mopre code to my program from an outside header file. Anyways, i try compiling it which links them all together which seams to work 99% of the time BUt i have had to cut n paste then delete that file just to recreate it again. It works great afterwords. BTW, R U using MV C++?
    "Be formless, shapeless, like water... You put water into a cup, it becomes the cup, you put water into a bottle, it becomes the bottle, you put it in a teapot, it becomes the teapot... Now water can flow, or it can crash, be water my friend."
    -Bruce Lee

  3. #3
    Registered User
    Join Date
    Oct 2002
    Posts
    33

    Microsoft visual c++ 6.0

    Microsoft visual c++ 6.0 standard edition is the one that giving me that error. Here is what it says:

    "C:\Windows\assign2p3.cpp(31) : warning C4101: 'fixed' : unreferenced local variable
    Linking...
    LINK : fatal error LNK1168: cannot open Debug/assign2p3.exe for writing
    Error executing link.exe."


    I use Windows 98
    Last edited by m712; 11-04-2002 at 01:58 AM.

  4. #4
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001
    Posts
    753
    sometimes it happens to me if i run my program, and it crashed. then it is still running sometimes, and you can't run another.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linking errors
    By Zeeshan in forum C++ Programming
    Replies: 1
    Last Post: 02-22-2009, 02:10 AM
  2. Linking and compilation errors
    By _lazycat_ in forum Windows Programming
    Replies: 2
    Last Post: 02-13-2009, 07:16 AM
  3. MS Visual C++ 6.0 Linking Error
    By fnoyan in forum C++ Programming
    Replies: 3
    Last Post: 07-05-2005, 10:06 AM
  4. executing errors
    By s0ul2squeeze in forum C++ Programming
    Replies: 3
    Last Post: 03-26-2002, 01:43 PM