• Advertisement
Sign in to follow this  

fatal error LNK 1104

This topic is 2933 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

For some reason I'm getting this error that says it cannot open file 'kernel32.lib'. And I'm running the simplest program ever. Hello world. #include <iostream> using namespace std; int main() { cout << "Hello world!"; return 0; } Not sure whats going on.

Share this post


Link to post
Share on other sites
Advertisement
You didn't like, turn of default libraries did you?

Edit: I just fired up (another instance of) VS, created a new C++ console app, stuck in your code and it worked fine. Did you play with the settings?

Share this post


Link to post
Share on other sites
I don't think I turned any settings off. Where would I check? The only thing I did differently today versus any other day was download VS Basic 2008 express and installed it and installed SP1 for VS2008. Unless something happened during the install.

Share this post


Link to post
Share on other sites
In the VS menu at the top, click Project->(yourproject)Properties.

In the dialog, select Configuration Properties->Linker->Input.

Make sure "Ignore All Default Libraries" is No.

By the way, did you create the project you have posted as a Win32 console project through the Project->New menu?

Share this post


Link to post
Share on other sites
Yeah, I started the project the New -> Projects -> Win32 Console

I finally figured it out. I just manually linked it to the kernel32.lib, I guess it must have changed when I installed the SP1 for vs2008. I've had issues with directX libs but never with this one. Now it works. Thanks so much for your time and effort. I appreciate. Another episode in the saga for my career in programming. :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement