undefined reference to `pow' Matrix.c /TzUtils/Sources line 152 C/C++ Problem
undefined reference to `pow' Matrix.c /TzUtils/Sources line 204 C/C++ Problem
This thing happens because the library which contains math.h is not linked by default. To link it you will need to add the extra flag -Im.
In Eclipse this can be done by:
- Right click on your project in Project Explorer and select Properties.
- Go to C\C++ Build -> Settings -> Tool Settings -> Gcc Linker -> Libraries and click on green plus button to add a new library. When the dialog pops up, write m, and Eclipse will automatically add the -Im flag.
Thank for the tip.
ReplyDeleteI'm glad it helped you.
Delete