Problem solved see this post.
I am running Ubuntu 10.10, having trouble with #include-ing any of the ClanLib librarys/class files. I followed the steps on compiling and installing from source, and I am using the example make file but I get the following error when I try to run the make file.
Makefile source$ make
g++ -o helloworld -pthread consoleexample.cpp `pkg-config --libs clanCore-2.2 clanApp-2.2`
consoleexample.cpp:1: fatal error: ClanLib/core.h: No such file or directory
compilation terminated.
make: *** [all] Error 1
Source Code of consoleexample.cppPACKAGES = clanCore-2.2 clanApp-2.2
CPPFLAGS = `pkg-config --cflags $(PACKAGES)`
LIBS = `pkg-config --libs $(PACKAGES)`
OBJS = consoleexample.cpp
all: $(OBJS)
g++ -o helloworld -pthread $(OBJS) $(LIBS)
clean:
-rm -rf *.o
-rm consoleexample
#include <ClanLib/core.h>
#include <ClanLib/application.h>
class ConsoleProgram
{
public:
static int main(const std::vector<CL_String> &args)
{
CL_SetupCore setup_core;
CL_ConsoleWindow console_window("Console", 80, 200);
CL_String now = CL_DateTime::get_current_local_time().to_short_dat etime_string();
CL_Console::write_line("At %1, we say Hello ClanLib!", now);
CL_Console::wait_for_key();
return 0;
}
};
// Create global application object, you MUST include this line or
// the application start-up will fail to locate your application object.
CL_ClanApplication app(&ConsoleProgram::main);
Bookmarks