Welcome to MSDN Blogs Sign in | Join | Help

Attention, mines: LNK1104: cannot open file 'c:\Program.obj'

Did you ever see the error message "LNK1104: cannot open file 'c:\Program.obj'"? No need to say that you are not that kind of a programmer who generates OBJ files in the root of disk C:... So, what's up and how to fix that?

Either use short 8.3 path in additional dependencies, or put the long path into "Linker | General | Additional Library Directories" and simply the name of the library without path into Additional Dependencies.

I realize that getting such a message is a sort of shock (I've got it today myself and still feel it :-)), here is the secret: "C:\Program.obj" is the long path like "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib" cut after the first space and appended with the default extension ".obj".

Published Thursday, February 15, 2007 1:56 PM by EldarM
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Attention, mines: LNK1104: cannot open file 'c:\Program.obj'

Hi,

What if I install Microsoft SDKs?

Is this error only due to SDK lib? Or I need to do "put the long path into "Linker | General | Additional Library Directories" and simply the name of the library without path into Additional Dependencies" for all the libraries?

Btw, what is short 8.3 path? I am a newbie to OpenCV. Thanks for answering my stupid questions in advance.

Monday, April 09, 2007 11:01 AM by Huang Bin

# re: Attention, mines: LNK1104: cannot open file 'c:\Program.obj'

Please, read the explanation. If you will put your own personal library into something like c:\Odd Libararies of Mine\mylib.lib and do the same mistake, you will get a message about missing c:\Odd.obj

Short 8.3 format has nothing to do with OpenCV, it's the old DOS format of file names: 8 characters for name and 3 for extensions. To support older programs that may still no understand new longer names, Windows supports a "ghost" name of each file which is not longer than 8.3 format requires. You can see it from the command line using dir command.

Monday, April 09, 2007 2:44 PM by EldarM

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker