Undefined reference of m3dRotationMatrix44

The program included math3d.h. But when m3dRotationMatrix44 is called, error of undefined reference was shown. Can someone tells me how to fix it? I also got a copy of math3d.cpp. Would it help, and how? Tks.

Hi JCheng,

Try putting math3d.h and math3d.cpp in the same folder.

If it doesn’t work then paste your code at some place to check it otherwise it’s hard to determine the error.

Hi, Exoide,

Thanks for your input. The problem was fixed, as I just include math3d.cpp as the regular header.

Tks.

That is one way to do it.

The other, more common way, is to compile math3d.cpp as well and then link everything together.

Hi, Shinta,

Thanks. Did you mean to convert it into header .h file? How to make it under Code::BLocks? Tks.

How do you compile and link your program? Do you use some integrated development environment? If so, try adding the math3d.cpp to the source files.