Problem with Dev-C++
I tried to import my source code for a working and compiliable game (in VS) to Dev-C++, but when I compile it gives me an error on all of my #include "______' lines to the header files of my game. Anyone have a solution?
that ' was a typo :P its " ".
The error is:
1 C:\Dev-Cpp\Snake\Gameloop.h:3, from Snake\GameLopp.cpp In file included from Snake/Gameloop.h:3, from Snake/GameLopp.cpp
all of the cpp files are in that dir Dev-Cpp/Snake/ and the other errors are the same except different file names.
could it maybe be a problem with having too many includes being repetitive? because there are a few other include statements that aren't giving me errors
The error is:
1 C:\Dev-Cpp\Snake\Gameloop.h:3, from Snake\GameLopp.cpp In file included from Snake/Gameloop.h:3, from Snake/GameLopp.cpp
all of the cpp files are in that dir Dev-Cpp/Snake/ and the other errors are the same except different file names.
could it maybe be a problem with having too many includes being repetitive? because there are a few other include statements that aren't giving me errors
Quote:Original post by 00dave
1 C:\Dev-Cpp\Snake\Gameloop.h:3, from Snake\GameLopp.cpp In file included from Snake/Gameloop.h:3, from Snake/GameLopp.cpp
That line tells where the error is, is there another line after that for your errors?
I can't find anything wrong with it.. It compiles without errors in VS... but I in DevCpp it finds errors in some of the header files...
http://argrn.halomodshelp.org/snake.rar
Here are the errors
http://img.photobucket.com/albums/v203/argrnsstuff/f54d027d.jpg
http://argrn.halomodshelp.org/snake.rar
Here are the errors
http://img.photobucket.com/albums/v203/argrnsstuff/f54d027d.jpg
I know they're just warnings, but try putting newlines at the end of all those files...I've had warnings in Dev before that disallowed compilation (even though they were *just* warnings and shouldnt've done that) and once I fixed them, the program compiled. Also, go to Tools>Editor Options and check the box marked "ensure that file ends with newline"
I don't know if that will do anything, but you never know...
Another thing I noticed: there's Gameloop.h and GameLopp.cpp...if those are supposed to be header and implementation, you might have a problem in the files if the name isn't the same...I'd check to make sure the right includes are there.
Also check and make sure that your files have inclusion guards to prevent multiple inclusion...didn't see that as an error so they're probably there, but I figured I'd mention it.
I don't know if that will do anything, but you never know...
Another thing I noticed: there's Gameloop.h and GameLopp.cpp...if those are supposed to be header and implementation, you might have a problem in the files if the name isn't the same...I'd check to make sure the right includes are there.
Also check and make sure that your files have inclusion guards to prevent multiple inclusion...didn't see that as an error so they're probably there, but I figured I'd mention it.
I think he means that you should press enter at the end your source file, so that there is a blank (new) line at the end of the code. ^_^
Yeah...I don't really know what the whole point behind the newline thing is (does anyone else? I'd like to know), but I have seen/experienced/gotten really mad becuase sometimes things will not compile in Dev even though it just gives "warnings." I thought the idea was to let you know, "hey, dude, you did something wrong, but it's not that bad" and compile anyway....technology :/
Anyway, ranting aside, yes, just meant that there should be an empty line past your final line of code. Hope that's all that is wrong...
Anyway, ranting aside, yes, just meant that there should be an empty line past your final line of code. Hope that's all that is wrong...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement