Crystal Space
Welcome, Guest. Please login or register.
October 24, 2017, 06:35:47 am

Login with username, password and session length
Search:     Advanced search
9063 Posts in 2051 Topics by 77930 Members
Latest Member: Asknbalive
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  Newbie - Tutorial Build errors
« previous next »
Pages: [1] Print
Author Topic: Newbie - Tutorial Build errors  (Read 1729 times)
Posts: 2

View Profile Email
« on: October 31, 2011, 04:13:43 am »

Hi All

I'm new to crystalspace and coming back to C++ after a long stint using Java.

I am getting build errors while trying to follow This Tutorial
I get stuck on the very first part on Simple Header File.

First error was with the include path. i saw that my include was /usr/local/include/crystalspace1.4 I renamed it to crystalspace for simplicity and changed the header file to be #include <crystalspace/crystalspace.h> can you confirm this was the correct way to do this?

Next after that I run into the following errors

 Header file:

#ifndef SIMPLE_H_
#define SIMPLE_H_

#include <crystalspace/crystalspace.h>

class Simple: public csApplicationFramework, public csBaseEventHandler {
csRef<iEngine> engine;
csRef<iLoader> loader;
csRef<iGraphics3D> g3d;
csRef<iKeyboardDriver> kbd;
csRef<iVirtualClock> vc;

void ProcessFrame();
void FinishFrame();


void OnExit();
bool OnInitialize(int argc, char* argv[]);

bool Application();


class simple {
virtual ~simple();
#endif /* SIMPLE_H_ */

The program is with 'CS_EVENTHANDLER_NIL_CONSTRAINTS' now i understand this is a definition but the error is

- Invalid arguments ' Candidates are: const ? *
    GenericSucc(csRef<iEventHandlerRegistry> &, csRef<iEventNameRegistry> &, ?) '

I tried looking for a solution but I could not find any, also I got the impression that this was a part of crystalspace 2.x is that correct?

Cpp file

#include "simple.h"


Simple::Simple ()
  SetApplicationName ("CrystalSpace.Simple1");

Simple::~Simple ()

void Simple::ProcessFrame ()

void Simple::FinishFrame ()

bool Simple::OnInitialize(int argc, char* argv[])
  if (!csInitializer::RequestPlugins(GetObjectRegistry(),
    return ReportError("Failed to initialize plugins!");

  if (!RegisterQueue(GetObjectRegistry(), csevAllEvents(GetObjectRegistry())))
    return ReportError("Failed to set up event handler!");

  return true;

void Simple::OnExit()

bool Simple::Application()
  if (!OpenApplication(GetObjectRegistry()))
    return ReportError("Error opening system!");

  g3d = csQueryRegistry<iGraphics3D> (GetObjectRegistry());
  if (!g3d) return ReportError("Failed to locate 3D renderer!");

  engine = csQueryRegistry<iEngine> (GetObjectRegistry());
  if (!engine) return ReportError("Failed to locate 3D engine!");

  vc = csQueryRegistry<iVirtualClock> (GetObjectRegistry());
  if (!vc) return ReportError("Failed to locate Virtual Clock!");

  kbd = csQueryRegistry<iKeyboardDriver> (GetObjectRegistry());
  if (!kbd) return ReportError("Failed to locate Keyboard Driver!");

  loader = csQueryRegistry<iLoader> (GetObjectRegistry());
  if (!loader) return ReportError("Failed to locate Loader!");


  return true;

 * Main function
int main (int argc, char* argv[])
  return csApplicationRunner<Simple>::Run (argc, argv);

The problem is at

if (!RegisterQueue(GetObjectRegistry(), csevAllEvents(GetObjectRegistry())))

With the RegisterQueue I get the error

Invalid arguments '
Candidates are:
bool RegisterQueue(iObjectRegistry *, ?)
bool RegisterQueue(iObjectRegistry *, ? *)
bool RegisterQueue(iEventQueue *, ?)
bool RegisterQueue(iEventQueue *, ? *)


  if (!OpenApplication(GetObjectRegistry()))

I get the Error

Function 'OpenApplication' could not be resolved

Now Ive taken the approach that the tutorial is correct so I'm guessing its to do with my environment.
I am using Ubuntu and Eclipse IDE. Setup using (yes i substituted the 'cs-config' with '$CRYSTAL/cs-config')
I build and installed crystalspace and included the Environment vars into .bashrc

export CRYSTAL=/home/edward/crystalspace/

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/edward/crystalspace/

my include directory is at


What have I missed?
Posts: 2

View Profile Email
« Reply #1 on: November 06, 2011, 12:37:10 pm »

just a follow up for anyone else searching this problem.

The instructions for Eclipse no longer match correctly. I ended up having to look at the KDevelop tutorial for some of the settings. Also for some reason $CRYSTAL did not work and I was getting RYSTAL instead. I just used the full path to the crystalspace package to get it to work.

I am still getting errors in Eclipse though however the project now builds. I'm going to see if i can update the wiki for eclipse with how I setup the environment.
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.169 seconds with 15 queries.