I know some of you guys use Visual Studio. I've regained temp access to a computer with it on weekends. I tried compiling a small console program but I have two problems.

1) the compiler gives a warning main() must be __cedcl. I have it set that way under options so I don't know if I can ignore that or if it needs to be set somewhere else.

2) The linker then burps "fatal error LNK1104: cannot open file 'C:\Program.obj' " There is no Program.obj but I've seen on the 'net that this problem occurs when there are spaces in the path name for libraries. To solve the problem just use quotes or move the libs to a different folder without spaces.

However, I have put quotes around the path names and I use MS style shortcuts under options but it doesn't solve the problem.

Can anyone help?

EDIT: I've just moved the library folders into c:\lib and I get the same error but cannot open \lib.obj
Posted on 2005-02-26 15:25:51 by drhowarddrfine
Hmm, this sounds pretty weird!

The only time I've had the cdecl warning is when I've overrided the compiler settings to be stdcall, and haven't explicitly set main to be cdecl.

Your library problem is also pretty strange... I haven't used lib paths with spaces myself, but the default setup has used this before (ie, "c:\visual studio" or whatever).

Is this a larger project, or are you always getting these weird errors?
Posted on 2005-02-27 03:25:46 by f0dder
Did you miss out quotes?
Posted on 2005-02-27 05:21:52 by roticv
Quotes where? I put quotes around all path names I could find but nothing changes. Under project options I have the path to the libraries under both "additional library paths" and "additional included libraries" (or whatever it's called). You would think additional library paths would work but if I don't put the path under additional included libraries I get "__imp" errors from the linker.
Posted on 2005-02-27 10:02:09 by drhowarddrfine
I guess the problem is I assumed I only had to point to the library folder and not specify the exact libraries I was using. Everything compiled and linked OK.
Posted on 2005-02-27 16:41:33 by drhowarddrfine
Hmmm... I have no problems specifying additional library file paths, and then using the non-absolute .lib file names...
Posted on 2005-02-27 16:45:44 by f0dder