views:

11281

answers:

6

I've created a new C++ project in Visual Studio 2008. No code has been written yet; Only project settings have been changed.

When I compile the project, I receive the following fatal error:

fatal error LNK1104: cannot open file 'C:\Program.obj'

+7  A: 

This particular issue is caused by specifying a dependency to a lib file that had spaces in its path. The path needs to be surrounded by quotes for the project to compile correctly.

On the Configuration Properties -> Linker -> Input tab of the project’s properties, there is an Additional Dependencies property. This issue was fixed by changing this property from:

C:\Program Files\sofware sdk\lib\library.lib

To:

" C:\Program Files\sofware sdk\lib\library.lib"

Josh Sklare
God you've just hanged two day's bug chase to 30 second one :)
jb
sorry it dint worked for me..!!
pvaju896
A: 

But oddly it doesn't happen if you put the name of the lib in the dependancies and the directory in the "extra directories to search" - the directory list seems to handle spaces.

Martin Beckett
A: 

Dear Sir,

I did what you said in Vc++ 6, but it dint work out, i am stuck, any suggestions

zaraf
A: 

Thanks Josh! You solution worked!!

Ujjwal John
A: 

Thanck u, Josh :)))

Vitaly
A: 

from where we can get the configuration properties ???

Bhawna