Sign in to follow this  
wraith811

fatal error LNK 1104

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this