This sounds like your installation of Pelles C isn't quite right...
Check in your Pelles C folder (usually c:\program files\pellesc) for a folder named lib there you will find a folder named Win (and perhaps Win64) ...
Is advapi32.lib there (both times) ?
If not, then you will need to reinstall Pelles C. ... be sure to include windows develpment when you do.
If it is there, go to your main menu and click through ... Tools -> Options -> Folders -> Libraries and check that the lib, lib\win and lib\win64 folders are listed correctly. If not, add them...
Also check in Project->Project Options->Folders->Libraries ... is one of the lib\win folders listed there?
Also... on an unrelated note... many older books show the main function as you have it. Under C99 and C-11 it should be
int main (void) and the function should
return 0; to the operating system. (That will be one less warning you need to look at
)