Thread: LNK1104 file.obj Error

  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    26

    LNK1104 file.obj Error

    I tried to compile a program I worked on a couple weeks ago, and now it won't compile properly. I'm getting the error:

    LINK : fatal error LNK1104: cannot open file ".\file.obj"

    I can't comprehend why. I haven't modified the application code since I last compiled it (and there were no problems then). I tried cleaning the build directory and re-compiling, but that doesn't work. I can't figure out why MSVS6 can't find it's own files...

    Now, apparently the server I'm running the compiler on went through an upgrade last night. I'm not sure if this has anything to do with it or not, but it's the only connection I can fathom. What exactly it could have done to screw this up, though, is beyond me.

    Does anyone have any further suggestions or are familiar with similar errors/issues?

  2. #2
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    Well, did you check to see if the .obj file in question actually exists? That would be the logical first step...
    If you understand what you're doing, you're not learning anything.

  3. #3
    Registered User
    Join Date
    Jun 2006
    Posts
    26
    It does, yes. It's created in the temp location for your project when you build your project in Visual Studio C++ 6. And yes, I checked.

  4. #4
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    I don't know, here's a link that might help you: http://forums.microsoft.com/MSDN/Sho...88922&SiteID=1

    If you give us your linker settings and build log we'd be able to help you better.

    Also, include any other additional information that might be helpful (knowing that the .obj file actually existed would have saved me from having to ask you to look).
    If you understand what you're doing, you're not learning anything.

  5. #5
    Registered User
    Join Date
    Jun 2006
    Posts
    26
    I was daunted by the idea of having to start the project from scratch but I did so anyways, and the error is gone. Seems like an arduous task and that there should be a simpler solution, but I'm not familiar enough with Visual Studio or programming to know much about solving such issues (or where to find linker settings and such).

    Thanks for your help, though.


    Edit:
    I ran across the same error again in my new build. However, I think I found the cause (although not the fundamental one). I had both Visual Studio and the Eclipse JDK open at once. Upon closing Eclipse, the error ceased. Odd, yet at least it was simple. I haven't tried it with my original project, though. If I get around to it, I'll update here again.
    Last edited by tao; 07-20-2006 at 03:44 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 01:17 PM
  3. How to monitor process creation?
    By markiz in forum Windows Programming
    Replies: 31
    Last Post: 03-17-2008, 02:39 PM
  4. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 10:33 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 01:10 AM