Now I recompiled Irrlicht, put the test.h in the include directory and created a new project to test out the class. The compiler reconizes the test class fine ,but it says that there is a undefiend referance to test::sayTest() with trying to call the function. Does this mean that the .cpp file isn't being compiled?
test.h
Code: Select all
#include <iostream>
namespace irr
{
class test
{
public:
void sayTest();
};
}
Code: Select all
#include "test.h"
namespace irr
{
void test::sayTest()
{
std::cout << "Testing";
}
}
Code: Select all
test myclass;
myclass.sayTest();
Linking executable "..\..\bin\win32-gcc\01.HelloWorld.exe"...
.objs/main.o:main.cpp:(.text+0x33e): undefined reference to `irr::test::sayTest()'
collect2: ld returned 1 exit status
make.exe: *** [../../bin/win32-gcc/01.HelloWorld.exe] Error 1
Process terminated with status 1 (0 minutes, 1 seconds)
0 errors, 0 warnings