Hello there,
first, i have to tell, that i really tried to solve my problem by google and this forum, but I failed...
What i found: http://kernelcoder.wordpress.com/201...library-in-qt/ and i tried to do that.
I would like to use my external library libmathlib.a, which is located in Libs folder of project folder. Also i take a mathlib.h(which is h file of cpp file...these two files made libmathlib.a) so i take the mathlib.h and I placed it to Incs folder(like the tutorial says).
In pro file of my project in qt are these extra lines:
INCLUDEPATH += Incs
LIBS += -L"Libs" -mathlib
I was tried many of variants like:
LIBS += /Libs/libmathlib.a
LIBS += /Libs/libmathlib.a -mathlib
and many of other which i found on google
In cpp file in qt after that i have:
#include "mathlib.h"
and also this works:
Mathlib m;(or Mathlib *m = new Mathlib())
but when i was trying:
m.add(1, 2);
make says:
undefined reference to `Mathlib::add(double, double)'
Thanks for your help and really sorry for my english, I did my best
Bookmarks