My Opengl 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? Understand the question
is programming based, but any help is appreciated. Tks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A header only declares a symbol, it does not provide the definition. You
need to link the appropriate library or compiled object code as well. While a
definition of the function may well exist in math3d.cpp, you would not
normally use a library by compiling and linking the source directly to your
application rather than linking a pre-built library. However a judicious
Google suggests that in this case that is exactly what you need to do. Add
math3d.cpp to your project (you do need to use a project for this).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My Opengl 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? Understand the question
is programming based, but any help is appreciated. Tks.
A header only declares a symbol, it does not provide the definition. You
need to link the appropriate library or compiled object code as well. While a
definition of the function may well exist in math3d.cpp, you would not
normally use a library by compiling and linking the source directly to your
application rather than linking a pre-built library. However a judicious
Google suggests that in this case that is exactly what you need to do. Add
math3d.cpp to your project (you do need to use a project for this).