Link Error

This is a discussion on Link Error within the C++ Programming forums, part of the General Programming Boards category; While executing a program it is compling properly but I am getting the following error. i tried changing the path. ...

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    11

    Link Error

    While executing a program it is compling properly but I am getting the following error. i tried changing the path. but it still doesnt work....
    LINK : fatal error LNK1104: cannot open file '.\Debug\sain.obj'
    assas - 1 error(s), 0 warning(s)

  2. #2
    Registered User
    Join Date
    Feb 2009
    Posts
    3
    Hey,

    Can you post the command you are using to compile the program ... it may be helpful.

  3. #3
    Registered User
    Join Date
    Jan 2009
    Posts
    11
    I am using Cntrl+F5 to compile the program

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    So, do you have a sain.c?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Registered User
    Join Date
    Jan 2009
    Posts
    11
    Yes I have sain.cpp and sain.h. I build the program in vc6.0 and now I am using visual c++ 2008 express edition and this program is getting complied in vc6.0 but not working in vc++ 2008

  6. #6
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Do you have everything in a single project in 2008?

    (If so, then you should look to see if you have a sain.obj hanging around somewhere else.)

  7. #7
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    And sain.cpp is part of your 2008 project?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  8. #8
    Registered User
    Join Date
    Jan 2009
    Posts
    11
    Hey mats sain.cpp is part of 2008 project..... we have 10 header file and 15 cpp with one .c in the project ...
    Quote Originally Posted by matsp View Post
    And sain.cpp is part of your 2008 project?

    --
    Mats

  9. #9
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,418
    Do a build -> clean (that should empty your .\Debug directory
    Do a build -> rebuild all

    Post log entries which mention 'sain' as either source or object file.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 02:07 AM
  2. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 03:09 AM
  3. Avoiding Global variables
    By csonx_p in forum Windows Programming
    Replies: 32
    Last Post: 05-19-2008, 12:17 AM
  4. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 04:45 PM
  5. DX - CreateDevice - D3DERR_INVALIDCALL
    By Tonto in forum Game Programming
    Replies: 3
    Last Post: 12-01-2006, 06:17 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21