Pelles C forum

C language => Beginner questions => Topic started by: Tech_Kil on July 23, 2010, 06:25:58 AM

Title: POLINK: fatal error: File not found: 'kernel32.lib'.
Post by: Tech_Kil on July 23, 2010, 06:25:58 AM
Hello. I try to execute my program and get this error.

POLINK: fatal error: File not found: 'kernel32.lib'.
*** Error code: 1 ***
Any suggestions? Thanks
Title: Re: POLINK: fatal error: File not found: 'kernel32.lib'.
Post by: Stefan Pendl on July 23, 2010, 07:16:03 AM
What is your LIB path set to?

Do you use the IDE to compile the project or are you running from pure command line?
Title: Re: POLINK: fatal error: File not found: 'kernel32.lib'.
Post by: Tech_Kil on July 24, 2010, 07:34:47 PM
I was using the IDE. and my LIB path, I;m not completely sure. What tab would I check this under? My Library and object files are set to kernel32.lib advapi32.lib delayimp.lib and in the libraries menu of the folder tab it is showing C:/Program Files/PellesC/Lib. Is that what you were asking? Thanks.
Title: Re: POLINK: fatal error: File not found: 'kernel32.lib'.
Post by: Vortex on July 25, 2010, 08:29:19 AM
Tech_Kil,

There should be two entries in the Folders tab :

Code: [Select]
C:\Program Files\PellesC\Lib
C:\Program Files\PellesC\Lib\Win
Title: Re: POLINK: fatal error: File not found: 'kernel32.lib'.
Post by: Tech_Kil on July 25, 2010, 10:40:40 PM
That fixed it. Thanks a lot  ;D
Title: Re: POLINK: fatal error: File not found: 'kernel32.lib'.
Post by: CommonTater on August 01, 2010, 04:45:53 AM
A little trick you might like...

#define WIN32_DEFAULT_LIBS

At the top of your source code will automatically find the lib files associated
with your #includes.

You do still have to have the paths set correctly in your project options, but now
there's no need to list them individually for the linker.