I've installed Eclipse CDT so I'll be able to write and compile C code.
The compilation progress fails and the following error appears:
LNK1104 : cannot open file kernel32.lib
I've been searching for this file in my computer and found out it appears in some folders,
C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib
How could I "refer" eclipse to one of this certain paths so the kernel32.lib
file will be found and I'll be able to compile and run C
files?
EDIT
Thanks to @mux answer the LNK1104 : cannot open file kernel32.lib
is now gone , but a new error appears now : LNK1104 : cannot open file 'C:\Program.lib'
.
Once again, any suggestion will be helpful.
i wasted a lot of time on this... this is the answer you are searching for
In Eclipse > Project > Properties > Paths and Symbols > Libraries tab, enclose the path to the library in single quotes:
'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\Kernel32.Lib'
There would be a warning that the path does not exist, but it should be gone after you rebuild your project.
I've the same problem, I've fixed because of installed Microsoft Visual Studio 2010 on my computer:
C/C++ project -> Properties -> C/C++ Build -> Environment
LIB
, click on the Button Edit
on the right side ;C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib
<---- ;
to separate the first auto detected path" * Must be on the both Debug and Release configuration : else you'll get the same error *
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With