NO

Author Topic: kernel32.lib linker error  (Read 4009 times)

patelj27b

  • Guest
kernel32.lib linker error
« on: June 12, 2007, 05:33:41 PM »
When I try to compile my code, it compiles fine, but when it links all the .obj files together I get a "POLIB: fatal error: File not found: 'kernel32.lib'." error. I checked the paths, and the location for the Pelles C kernel32.lib file is included in the path "C:\Program Files\PellesC\Lib\Win". What else can be the problem?

-Jay
(patel at cs dot utk dot edu)

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: kernel32.lib linker error
« Reply #1 on: June 12, 2007, 06:46:57 PM »
The environmental variable to define is "LIB" not "PATH".
Anyway if you are compiling from the command line before using any pelles command call the batch file "povars32.bat" that initializes the compiler environment variables (you'll find it in your
"C:\Program Files\PellesC\Bin" directory).
If you have the problem on all projects while using the IDE remove and reinstall the compiler. If the problem is present only on this project check in the project options->folders if the correct library folders are set.
In any case I suggest to reinstall the compiler in a different directory directly under the root (i.e. C:\PellesC or C:\Development\PellesC or the like) avoiding spaces in directory names.
P.S. I removed your post from bug reports because as far as I can suppose this is not exactly a bug.
« Last Edit: June 12, 2007, 06:52:08 PM by frankie »
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide