9 Replies - 1789 Views - Last Post: 22 August 2015 - 06:52 PM Rate Topic: -----

#1 Doctor Miyamoto   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 43
  • Joined: 06-June 15

kernel32.lib prob!

Posted 21 August 2015 - 05:34 PM

Hy everyone, This is not a code problem, but a visual studio problem, u see I never want to use visual studio because I always have bad luck with it, and that bad luck is called kernel32.lib. I always get the same error, and searched so much on google. and I have been going through this for over a year, and it keeps bringing on setbacks in my interest/hobby which is videogame programing, and im tired of it. The error is cannot open file kernel32.lib. I noticed that while I was looking on google for answers for over a year that the people that had this problem had a different version of visual studio or it was only that their solution just did not help. I would also try to install windows 8.1 SDK I believe and that did not work, but I can always try again if anyone thinks that I should install It again. I just want to use visual studio because something went wrong with code blocks. I could get back to code blocks but visual studio would be very reliable if I could just get it to run my sample program in allegro 5. Sorry if I seem like a train wreck here but Im just a teen with passion for making games by solving coding problems and doing it all from scratch instead of using something silly like game maker. Anyway I really need some help here anything would be awesome because this one error Is really difficult for me. At my school I even know two programming teachers and one day I brought my laptop to them just to fix the one problem. However they were not able to fix it in time and I could not wrap my head around it ever since. I even tried searching for kernel32.lib on my pc and It was not their! This is the only coding problem or computer problem that I cant solve. Its not coding or solving errors or drawing game characters that's really that impossible. Its this one little error. sorry for the paragraph but Im a little down on my luck and summers almost over. I have visual studio community 2015 (the free Version) and here is my code...
#include <stdio.h>
#include <allegro5/allegro.h>

int main(int argc, char **argv)
{
	ALLEGRO_DISPLAY *display = NULL;

	if (!al_init()) {
		fprintf(stderr, "failed to initialize allegro!\n");
		return -1;
	}

	display = al_create_display(640, 480);
	if (!display) {
		fprintf(stderr, "failed to create display!\n");
		return -1;
	}

	al_clear_to_color(al_map_rgb(0, 0, 0));

	al_flip_display();

	al_rest(10.0);

	al_destroy_display(display);

	return 0;
}



ANY HELP WOULD BE THE BEST... and also some secrets on how to avoid these problems.....

Is This A Good Question/Topic? 0
  • +

Replies To: kernel32.lib prob!

#2 BBeck   User is offline

  • Here to help.
  • member icon


Reputation: 792
  • View blog
  • Posts: 1,886
  • Joined: 24-April 12

Re: kernel32.lib prob!

Posted 21 August 2015 - 07:11 PM

I hate linker errors. They are always the hardest to solve it seems. And you usually mostly get them when you're trying to start something new which makes it even more frustrating.


I have no idea what's going on with this. It appears to be something Allegro uses and should have been in the Allegro instructions.

But do you need to put "$(WindowsSdkDir)\lib" in your project's Properties->Configuration Properties=>VC++ Directories=>Include Directories (for 32 bit "$(WindowsSdkDir)\lib\x64" for 64 bit)?

If it's not finding a .lib file, you probably need to tell it where to find the file by doing that and telling it where to look for the file.

I found a Kernal32.lib on my machine at C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib and so it sounds like it probably is part of the Windows SDK (although this file appears to be ancient and may not be the one you're looking for). And you probably need to add it to your project's library directories as well as maybe needing to specify something in the include directories to specify where the .h (header) files are for the Windows SDK.

In VisualStudio 2013 my computer likes $(WindowsSDK_LibraryPath_x86) and $(WindowsSDK_IncludePath) for the library and include directories for 32 bit. (x86 is 32 bit and x64 is 64 bit)

You may easily have 2 platforms(Win32 and x64) and 2 configurations for each platform (Release and Debug) and the 2 platforms at least have separate Library Directories because those are specific to either 32 bit or 64 bit. The .h files for the Include Directories are not specific to 32 and 64 bit and you use the same for both.

Hope that helps.

This post has been edited by BBeck: 21 August 2015 - 07:13 PM

Was This Post Helpful? 0
  • +
  • -

#3 Doctor Miyamoto   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 43
  • Joined: 06-June 15

Re: kernel32.lib prob!

Posted 22 August 2015 - 09:07 AM

Hy Bbeck thank you for replying. your reply helped me a lot on this. However I got through my first problem and another one along the way, I have another one. Its LNK1104 cannot open file ucrtd.lib. It seems that visual studio just keeps giving me issues! I know that In game programming you are supposed to solve problems, but since this Is an IDE we are talking about shouldn't It come already linked with these files and such ESPECIALLY since its from a major corporation like Microsoft? I just want to get right to coding.]:
could It be my pc is not fit for game dev? My pc is a laptop that is a Sony Viao. I game on It to and It has the Sony apps for movies and such bundled with It. Should I buy visual studio on disk? What do I do to fix this error? They just keep on coming.


#include <stdio.h>
#include <allegro5/allegro.h>

int main(int argc, char **argv)
{
	ALLEGRO_DISPLAY *display = NULL;

	if (!al_init()) {
		fprintf(stderr, "failed to initialize allegro!\n");
		return -1;
	}

	display = al_create_display(640, 480);
	if (!display) {
		fprintf(stderr, "failed to create display!\n");
		return -1;
	}

	al_clear_to_color(al_map_rgb(0, 0, 0));

	al_flip_display();

	al_rest(10.0);

	al_destroy_display(display);

	return 0;
}




maybey I should download the file on the web then link It with my project? What do you think?
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14244
  • View blog
  • Posts: 57,145
  • Joined: 12-June 08

Re: kernel32.lib prob!

Posted 22 August 2015 - 10:03 AM

Have you run through the setup steps correctly?

https://wiki.allegro...p?title=Windows,_Visual_Studio_2010_and_Allegro_5#Setup_Project_For_Allegro_5
Was This Post Helpful? 0
  • +
  • -

#5 Doctor Miyamoto   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 43
  • Joined: 06-June 15

Re: kernel32.lib prob!

Posted 22 August 2015 - 12:08 PM

Hy everyone! Thank you for assisting me In my difficult situation. I was able to fix my first problem, but then I would get another error after that, and then another error! However, because of the good advice from you guys and adjusting my linker settings and such, I was able to solve the rest of my problems on my own, such as the last error I had where my program would not run because It was missing a file called msvcr110d.dll. Which I believe is Microsoft C RunTime library or something thst dhould have came with the IDE in the first place. Just one more question though... If I bought Visual Studio on cd from a pc store would It come with all of these bloody files instead of me having to waste time looking for answers when I could be coding? Or is it on another downloadable version that you have to pay for. For a passion, I am not afraid to spend some money... I just need that one answer questioned to help me make a decision on buying visual studio or not....

Sorry, one more issue, It says when I build solution that It cannot open file bla bla this location .exe. Why is that. could It be my solution?
Was This Post Helpful? 0
  • +
  • -

#6 BBeck   User is offline

  • Here to help.
  • member icon


Reputation: 792
  • View blog
  • Posts: 1,886
  • Joined: 24-April 12

Re: kernel32.lib prob!

Posted 22 August 2015 - 03:00 PM

I was going to point at this but looks like you got the problem solved. (I missed your earlier post because I was in a meeting for several hours.)

So, you would almost certainly have these same problems even if you bought the most expensive version of Visual Studio they sell. Linking problems are kind of the nature of programming in C++ and especially they seem to be what is "expected" for Unix type programming on a Windows machine like doing SDL, OpenGL, or anything out of the ordinary from Windows programming. In this case though it seemed to be the Windows SDK, which you would think they might link that in by default. Of course, keep in mind, some projects may not need to link that in or may put it in a non-standard directory or something.

But this is one of the things that annoys me a little about Linux programming in Windows. I'm pretty new to Unix and so I have not gotten use to this yet. Furthermore, I think it's easier to do Linux programming in Linux because they have all these standard install packages that are scripted out to do everything for you but that doesn't happen in Windows for several reasons not the least of which is you are expected to do Linux programming in Linux, not in Windows.

But this is one of the reasons I loved XNA so much. Of course it was C# and not C++, but it just simply "worked". You install Visual Studio 2010. You install the XNA 4.0 download and BAM: you get to work. There's no setup. There's no "linking". There's no configuring your project properties. It's just ready to go.

C++ for any serious programming is just not that way. You're always having to setup the include and library folders for every project you do. That's because you're using someone's library instead of just the standard "built in" Windows stuff. But either way, it's what you always have to do.

I'm "starting" to get used to it. Today I'm going through some of the same thing trying to get SDL2 setup for OpenGL 4.

Anyway, money is not likely to get you past this problem. It's the nature of working in C++.

There is some discussion that the .exe problem might be an anti-virus problem. So try turning off your anti-virus while building and see if that clears it up.

I'm also hearing "turning on Application Experience Service under Services settings" as a possible solution.

This post has been edited by BBeck: 22 August 2015 - 03:04 PM

Was This Post Helpful? 0
  • +
  • -

#7 Doctor Miyamoto   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 43
  • Joined: 06-June 15

Re: kernel32.lib prob!

Posted 22 August 2015 - 03:06 PM

Thanks BBeck! I shall try that and take your advice and such so I can make further progress.
Was This Post Helpful? 0
  • +
  • -

#8 Doctor Miyamoto   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 43
  • Joined: 06-June 15

Re: kernel32.lib prob!

Posted 22 August 2015 - 04:39 PM

Is it true that for c languages It is better to code on linux BBeck? And If it is are all of the popular gaming library's and such compatible with it? Is it good for 3d game dev also? It appears that I did not know this, and I would like the truth, not that you are not telling it how it is, but I just want to make sure that linux Is the best option for a game dev that not only wants it as a passion for home, but later on in life as a job. I would search this all up, but you seem like quite the expert! (Plus I dont entirely trust the web for some sources are filled with OS fan boys). And since I also want a career in this field, What operating system Is used in the majority of the Industry? Is it osx, Windows, Linux, or something special? Also, I just might get a new computer some place just to use it as an awesome game dev tool and I want It to not only have the right operating system for what Im doing on It (C++ and BLENDER), but with good ram and such, and the right files and as much as I can get my hands on. (Also, funny thing to say but game programming is the first hobby that Is not only artistic but educational, and Im permanetly sticking with it, trust me, I been through some hobbies, but this one keeps me coming back). So, since It needs a lot of knowledge to do things, I think that I should get these answers to my questions as quickly as possible, plus If you have anything more to say, go right on ahead, Im literly craving more knowledge about this stuff. By the way I started with BASIC, but then I wanted to get to the harder stuff, because I love a good challenge, and besides! Its C++! Its the best language!
at least in my opinione
Was This Post Helpful? 0
  • +
  • -

#9 Doctor Miyamoto   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 43
  • Joined: 06-June 15

Re: kernel32.lib prob!

Posted 22 August 2015 - 06:13 PM

Plus I actually cant run my allegro 5 project, before I thought It was fixed but now It gives me an assertian failiure and another time It said that basically I was missing a file called display.c. This is very strange, should I install Code Blocks or a different IDE because It worked with code blocks very well but visual studio It acts very strange. or maybey I should Abandoned allegro 5? I dont know just a thought. What do you think?[:
Was This Post Helpful? 0
  • +
  • -

#10 BBeck   User is offline

  • Here to help.
  • member icon


Reputation: 792
  • View blog
  • Posts: 1,886
  • Joined: 24-April 12

Re: kernel32.lib prob!

Posted 22 August 2015 - 06:52 PM

Don't get me to lying about Linux. lol :tooth:/>

I have extremely limited experience with Linux. I'm wanting to get more into it for several reasons, but none of them are really related to which platform is best for game programming. I just bought a keyboard and a mouse to setup a machine that I already have Linux installed on. Hopefully then I can get myself to start using that machine instead of this one as my main machine.

My primary problem with Linux, and the reason I'm not already using it, is hardware compatibility issues and not being able to run Windows games, especially with an Xbox 360 controller. But I'm trying to work to get past that because I really want to start using Linux.

I'm also wanting to do OpenGL largely as part of a switch towards Linux. And I'm starting to explore SDL as a library to run OpenGL out of.

Quote

Is it true that for c languages It is better to code on linux BBeck?


I don't think C, or I would prefer C++, is necessarily better on Linux, Windows, MaxOS, or any other operating system. You mainly use C++ when you want low level access to the system. There is literally nothing that you cannot do in C++ (or at least C anyway). If the computer cannot do it in C++, then the computer can't do it period.

Of course, that power comes with a price in terms of the time it takes to get anything done and the degree of difficulty it takes to get anything done.

So, in general I would say that no that is not true. I would say that if you want to code in C++ then do it on whatever OS you like. I do it on Windows. I'm getting ready to maybe start doing it for the first time on Linux in the not too distant future maybe. I don't see a huge difference one way or the other.

Quote

And If it is are all of the popular gaming library's and such compatible with it?


I'm not sure what "it" is in that sentence. Are all the popular gaming libraries compatible with Linux? Most game libraries I've seen were created for Linux but run on other operating systems. I really know very little about this subject. I never use libraries. Most of my game programming experience was a few years in XNA, which I thought was awesome, but that's more of a "frame work" than a library. When Microsoft stopped supporting it, I eventually moved to DX11 and I decided early on that I wanted to understand things at the deepest level; so I intentionally refused to use any libraries outside of the Windows SDK and the DirectX 11 SDK because I wanted to learn things at the very lowest level. DX Tool Kit is a DX11 library, but I decided not to use that. So for example, DXTK is not compatible with Linux or OpenGL as it was designed for DX11.

In general, one of the biggest drawbacks of DX is that it doesn't play nice with anything except Windows and Microsoft platforms. People generally do OpenGL if they want cross platform compatibility because DX doesn't do "cross platform". DX also includes some things that would be "libraries" for OpenGL. For the most part, DX handles sound, the Xbox 360 controller, keyboard, and such things. OpenGL doesn't handle anything except drawing. So you have to enlist other libraries to do those types of things for OpenGL. I'm currently exploring SDL as an option for that as that seems to be what everyone recommends for OGL.

I really think it's more important to get started in game programming than it is whether you choose Linux or Windows. I'm sure there are good options either way.

And you can do most things in Windows as far as various game programming platforms. Unless it's Microsoft specific, like XNA or DX, you can probably do most things on Linux also. I wouldn't say one is necessarily better than the other. I think it's more of a preference and which platforms you want to work with since there are some limitations and such, especially with Microsoft not being cross platform compatible.

Quote

Is it good for 3d game dev also?


It's all good for 3D game dev. Unity is good. Linux is good. Windows is good. Java is good from what I hear not having tried it myself. And I'm sure there are other options. I think each probably has it's own unique reasons for existing and each likely has some strong points and weak points.

Somewhere I posted my thoughts on 3D game development platforms. I'll try and find that and link it.

If I wanted a job as a 3D game programmer, I would set a long term goal of learning to develop on Linux and Windows with OGL and DX. But this is definitely not the place for a beginner to start. The most important thing when starting out is: to start. Pick something and learn it. After you learn it, you will know yourself more about what you want and do not want. No one can really tell you the correct path for you except you. And you learn what you want to do by doing and discovering.

3D game programming is obviously very challenging. And there's so much to it. It takes a very long time to learn, especially if you get into producing the art work and what not, which everyone needs to get into a little just so that you can create temporary art as place holders until you can get a real artist to come in and do it, not to mention you need to know how to write your code to support the art the artist is working on.

Quote

I would search this all up, but you seem like quite the expert!


I would not call myself anywhere near an expert. I've been trying to learn 3D game programming for over a decade. Many years of that were semi-wasted learning other things like 3D Studio Max and working in game engines where I learned a lot about producing art assets. I say semi-wasted because most of that was not really progressing me towards understanding 3D game programming exactly, although in many ways that had its own value.

About... how long has it been now... 5 or 6 years ago I discovered XNA and quickly discovered that I could do 3D game programming stuff with it. About a year later I started my website to teach what little I know to everyone else who wants to learn it.

I don't necessarily know much of anything. I've never worked as a game programmer. I've only worked as a professional programmer a little and that was a long time ago as I professionally moved into database administration. Granted, I've been programming my whole life since I was 12, but I don't do it for a living. It's a hobby for me.

But I have figured out a lot of stuff regarding 3D game programming. Most of it is stuff I saw done in engines and I figured out how to code stuff that basically gives the same results. Some of the XNA books taught me quite a bit. And I've spent a lot of time googling the Internet trying to understand how everyone believes some game programming task should be done. But I don't have any insider knowledge of how things are done in the game industry (other than I've worked for some pretty big companies, although not as a game programmer or anything game related). (I did actually know someone on the XNA team at Microsoft at one point, but I've lost contact with him over the years.)

But I figure if I know even one thing more than most others about game programming, then I'm at least qualified to explain what I've learned so far. I think a lot of the "experts" out there are little different in that some of them might know half as much as people imagine they do from what I've observed. But I like to make it clear that I know what I know and I don't know what I don't know (which is a whole lot more than I do know).

And then, over the last year or so I've been getting into DX11 and have at least figured out the basics of that. In XNA, I got to the point where I was studying game algorithm type stuff.

Basically, 3D game programming is just receiving input from the user, making sounds, and drawing triangles on the screen that look like 3D stuff. Of course, there is the programming side also where you get into how to code all the rules and the various game systems. I figured out how to at least do all that stuff at a basic level in XNA, and I've learned enough about DX11 to be able to do pretty much anything that I'm capable of doing in XNA in DX11.

So, I guess the bottom line is I've spent at least the past 5 years studying 3D game programming and I've certainly learned an enormous amount, but I still feel I have a tremendous amount more to learn before I would be worthy of being called an expert.

Quote

What operating system Is used in the majority of the Industry?


I don't know. At best I could make an educated guess and google it. I think Windows has the largest market share. Mac is popular. Linux doesn't have that many users.

As far as development, I think a lot of the consoles have historically kind of had their own operating systems from what I've heard.

Really, I would not be concerned about this. About 90% of 3D game programming is not specific to any platform, library, or OS. A lot of it is pure math and logic. In other words, if you learn 3D game programming in DX on Windows about 90% of that will go with you when you start doing OpenGL on Linux. And the same is true going the other direction.

I do think most of the game programming industry is still expecting the people they hire to know C++ and either OGL or DX or maybe both. As game engines such as Unity and such become more powerful and ubiquitous, this may be changing in some cases. But last I heard the majority of the game programming industry is still looking for C++ programmers who know OGL and DX.

DX is an extremely difficult place to start learning 3D game programming. I love XNA for that purpose which has now been taken over by MonoGame. I think Java may offer something similar, I'm not sure.

I'm starting to believe that OGL with SDL is very similar to XNA except that XNA is in C# and OGL & SDL are for C++ (although you may be able to link them in with other platforms such as C#, still I think more typically people do OGL & SDL with C++). But my point is, that I'm starting to get the impression that SDL with OGL is about the same difficulty level as XNA and hundreds of times easier than DX11. But that's just my first impression as I've started to explore this. I haven't written any substantial SDL or OGL code and so I'm guessing based on what I've read rather than knowing myself.

Hopefully, I'll learn SDL with OGL 4 before this year is over and be able to comment on that from experience soon.

Of course, one of the big advantages of XNA was there were some really good 3D game programming books written for XNA 3. There's not a lot out there on OGL 4 or SDL.

Don't get in too much of a hurry, especially if you want to learn 3D game programming. It takes a long time to learn. But the key is to write code and to write games. That's how you learn it. The more time you spend programming, the better you will get at it. And there is no substitute for that.

I was trying to find some of the posts where I've previously discussed this topic. I found this:
http://www.dreaminco...hl__Unity%20XNA

And of course my 3D game programmers "Road Map".

Somewhere I wrote a lot about there being 3 tiers of 3D game learning. I can't find it to save my life at the moment for some reason though.

Ah! Here it is! In that thread I really go into detail about how I see the various options for 3D game programming. Keep in mind I only have experience with XNA, DX11, and a little bit of Unity. And of course I'm talking strictly about 3D game programming because I've never really done much 2D game programming.

If nothing else, at least read the analogy I give of the 4 levels in the final post on that thread.

This post has been edited by BBeck: 22 August 2015 - 07:44 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1