Handmade Hero » Forums » Code » CL warning 9024
Silverfang
Zoltan Stomfai
8 posts

None

#4422 CL warning 9024
2 years, 10 months ago

Hi there fellow Handmade Heroes!

I've just started the series, and not a big fan of emacs. Trying to find a better fitting editor and probably messed up something with the compiler, because I'm getting this error:
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

cl : Command line warning D9024 : unrecognized source file type 'C:\Program', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'Files', object file assumed
cl : Command line warning D9024 : unrecognized source file type '(x86)\Microsoft', object file assu
med
cl : Command line warning D9024 : unrecognized source file type 'Visual', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'Studio', object file assumed
cl : Command line warning D9024 : unrecognized source file type '12.0\VC\vcvarsall.bat', object fil
e assumed
cl : Command line warning D9024 : unrecognized source file type 'x64', object file assumed
win32_handmade.cpp
Microsoft (R) Incremental Linker Version 12.00.31101.0
Copyright (C) Microsoft Corporation. All rights reserved.

/out:Program.exe
/debug
C:\Program
Files
(x86)\Microsoft
Visual
Studio
12.0\VC\vcvarsall.bat
x64
win32_handmade.obj
user32.lib
gdi32.lib
LINK : fatal error LNK1181: cannot open input file 'C:\Program.obj'

Tried to google, also checked the forum here, but no luck.
Any help really appreciated!

PS:
Thank you Casey! :)

None
mmozeiko
Mārtiņš Možeiko
1693 posts
1 project
#4423 CL warning 9024
2 years, 10 months ago

Show us the commandline you are invoking. Probably forgot to put something in quotes.
Silverfang
Zoltan Stomfai
8 posts

None

#4432 CL warning 9024
2 years, 10 months ago

Sorry, meant to do it but forgot. :)

Command prompt:
%windir%\system32\cmd.exe /k w:\shell.bat and the starting point is W:\

shell.bat:
@echo off
call "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
set path=W:\misc;%path%

buid.bat:
@echo off
pushd ..\..\build
cl -Zi ..\code\win32_handmade.cpp user32.lib gdi32.lib
popd

Additional info:
W: has four directories in the root (build, code, data, misc), I am not using handmade\build, handmade\code etc.

None
mmozeiko
Mārtiņš Možeiko
1693 posts
1 project
#4433 CL warning 9024
2 years, 10 months ago

Looks fine to me. Not sure what is issue here.
Maybe invoking shell.bat with /K argument? Try running shell.bat directly with mouse double click and stick cmd.exe at end of it to keep shell open.
Silverfang
Zoltan Stomfai
8 posts

None

#4437 CL warning 9024
2 years, 10 months ago

Shell.bat is invoked with /k

It seems to me, the CL getting somehow the path to the vcvarsall.bat... That is strange, since I never passed to it. :(

None
mmozeiko
Mārtiņš Možeiko
1693 posts
1 project
#4438 CL warning 9024
2 years, 10 months ago Edited by Mārtiņš Možeiko on July 31, 2015, 8:06 p.m.

Well yes, it's invoked with /K. Maybe that's the problem? Try running cl.exe without invoking anything with "/K".

Another option - cl.exe implicitly uses "CL" environment variable for extra command line arguments. Maybe somebody had set "CL" env variable for you?
Silverfang
Zoltan Stomfai
8 posts

None

#4439 CL warning 9024
2 years, 10 months ago

Removed /K not helped...
Tomorrow I am moving, but in the evening probably can check the CL environment.
Until then any idea, is really appreciated! :)

None
Silverfang
Zoltan Stomfai
8 posts

None

#4444 CL warning 9024
2 years, 10 months ago

One more thing:
I've tried to setup earlier a Handmade project in VS2013 Community edition, to use for editor, compiler and debugger, but later deleted it.
Is is possible that the VS left somewhere some info regarding the cl environment?

None
Silverfang
Zoltan Stomfai
8 posts

None

#4462 CL warning 9024
2 years, 10 months ago

Ok, here is the solution (thank you Dot):

In the System environment there was a Variable with the path Value. Removed it and everything is working fine.

Thanks for the help.

None