CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: error LNK1104:

  1. #1
    Join Date
    May 2010
    Posts
    24

    Question error LNK1104:

    Hi everyone,

    I'm trying to compile a code in VS2008, but I'm getting the following error:
    Code:
    Error	21	fatal error LNK1104: cannot open file 'C:\code\prototypes\demographics.obj'
    This is the only error I'm getting, and it is pretty weird, since the folder 'prototypes' is "2 levels upwards" from the solution dir (../../) and I believe this obj file should be generated during the build.
    I don't know what kind of project property is messed up. Could you help me fix it?

    Thanks in advance for your help

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: error LNK1104:

    Does the file 'C:\code\prototypes\demographics.obj' exist?
    If not then why?
    Do you"believe this obj file should be generated during the build" or you are 100% sure it is generated? Search your solution for demographics.cpp or whatever other extension...
    Victor Nijegorodov

  3. #3
    Join Date
    May 2010
    Posts
    24

    Thumbs down Re: error LNK1104:

    The file demographics.obj does not exist.
    There is no demographics.cpp in my solution (I even searched in the other projects), and I don't have a class named Demographics either.
    The closest I have is the name of the solution - 'Demographic' (without the s)...

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: error LNK1104:

    Maybe you added the 'demographics.obj' to the list of object modules/libraries?
    Victor Nijegorodov

  5. #5
    Join Date
    May 2010
    Posts
    24

    Cool Re: error LNK1104:

    Found the error...
    there was one of the paths in the project referencing a folder named "demographics new version". Once I've removed the spaces, things have started to work.
    I believe VS2008 doesn't like folders with spaces on the names...

  6. #6
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: error LNK1104:

    Just use the quotation marks around such a folder...
    Victor Nijegorodov

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured