I've been trying to follow this tutorial http://www.xbdev.net/tuts/subpages/prt1/index.php I try to run the code and all I get is build errors. There's no real tutorials on how to even start the projects up correctly. I know I'm totally new to this, and I'm rather stupid, but I want to at least get empty code to run on the debug. I think from there I should be fine. Can anyone help me?
VS doesn't know the "StartGame()" function, which it's not declared and I have no idea how to declare the functions. The only sample code I can compile is the rotating triangle with the pre-compiled header. Other than that no other code will work. The triangle is the only code I have as a sample. My XDK doesn't have any others in the kit.
I have both, I don't see how that would change anything... The sample code works so it's setup right...
Erm, isn't this the problem? If you haven't written a function called StartGame anywhere then it won't be able to compile. If you're new to programming then you should probably hit up a few tutorials before moving on to xbox dev.
To my knowledge, StartGame(); is a built-in function. Similar to printf();. A header or library may need to be loaded, but if HeXiGON following the example perfectly and using a compatible version of VS and the xdk then idk what the problem could be. Unless Windows 7 might be messing him up... I do all my xbox1 work on an XP machine.
I've been reading up on C++ books, and followed a lot of tutorials. I tried to make the function, but where do I place that code? All I want to do is just to be able to do what the tutorial is telling me. I don't plan to make anything myself yet. I mentioned in the OP I'm not very smart with C++ yet... Yes I know the problem urisma but I'm asking how can I fix it... Sure I don't know C++ yet and I'm not saying I do. I'm just wondering if someone could tell me how to declare it? I'll most likely figure it out myself anyway, I'm learning from a C++ book anyway. Thought I'd be able to get a direct answer.
Wasn't trying to be condescending in my answer, sorry if I came off like that. Anyway, your main method calls StartGame, but it doesn't exist anywhere in your code. You'll have to declare a method called StartGame above your main method, like this: void StartGame() { }
That's alright, I'm still getting the build error however. //Application entry point void __cdecl main() void ;StartGame() { StartGame(); } warning C4518: 'void ' : storage-class or type specifier(s) unexpected here; ignored error C2146: syntax error : missing ';' before identifier 'StartGame' warning C4508: 'StartGame' : function should return a value; 'void' return type assumed Guess this won't be going any where :/
You can't reference a function from within the function. Well, you can... but for your case you can't. Try this: StartGame() { //blah } StartGame();
So this will work: Or this: Keep at it, once you have a basic understanding on C/C++ you will able to have some fun pretty quickly. Watch those semicolons! And have a look at libretro/RetroArch project at some point
Thanks man! I'll certainly give that a shot. With the XDK aside, I'm currently learning C++ from a book what's the best approach to that? It's been a while since I've studied from a text book... What would you recommend?
Like, the best approach to reading a textbook? Skimming for concepts and grasping those concepts from examples/visual aids tends to be the fastest way for me, but sometimes I need to read a full description. I would recommend taking a class that teaches some of the easy stuff later. Start with arrays before becoming dependent on vectors. There are plenty of online reference materials and concise books out there, but they can't answer your questions!
I got C++ lessons on school and I must say, reading a book from front to back and doing some examples learned me allot. and it took only 2 month to actualy build nice tools already. Now im so busy with an internship I almost have no time for xbox dev, but realy like to start something. I would say, start some reading and try stuff (with you already do Nice ) Im no expert on C or Xbox, but when one knows some Cpp and some basic xbox dev things you get things started. I hope more people are into xbox dev soon
I'll have to get various different books to read from about it. I'll surely jump into it at some stage.