Righto, so I’ve run into an issue with trying to use a couple different
IDE’s. Specifically Code::Blocks and Eclipse with CDT (C Dev Tools).
I’ve got three source files.
2dgame.cpp
/*************************************************/
#include
#include <SDL2/SDL.h>
using namespace std;
#include “GraphicsEngine/GraphicsEngine.cpp”
SDL_Renderer* butitworkshere;
int main() {
cout << “whoopee” << endl;
return 0;
}
/*************************************************/
GraphicsEngine.cpp
//
#include"GraphicsEngine.h"
//
GraphicsEngine.h
//
class GraphicsEngine {
private:
SDL_Renderer renderer;
public:
GraphicsEngine();
};
/*/
Compiles just fine with a good old “g++ 2dgame.cpp -o 2dgame” and runs.
Both Code::Blocks and Eclipse say SDL_Renderer does not name a type and
references GraphicsEngine.h as the source. Also while messing with eclipse
I see that it first tries to compile GraphicsEngine.cpp I think. I started
it as a hello world C++ project and added that folder/class. I’m on Linux
Mint 15 64-bit. I’ve tried Eclipse from the repos first but currently I’m
using the package downloaded from eclipse.org .
I’m frustrated because I came to IDE’s yesterday and today to try to make
my life easier.