Calling external functions from QT
-
Hi ArchGabe.
Did you add LIBS += "/path/to/lib" to .pro file?
Regards. -
Well, to do this, I'm doing..
- Add LIBS += to .pro file.
- Add .h of library to my project.
- Copy library to app folder.
Hope it's util.
Regards.
-
You should use:
- INCLUDEPAT += path/to/include
In the .pro file.
-
You should include all the includes necessaries. More information would be confortable...
-
I did...
.
On Eclipse, I created a .hpp file like this:@
#ifndef FUNCTION__HPP__
#define FUNCTION__HPP__int foo() {return 2;}
#endif
@Then, I added the following path to my QT project .pro file:
@
INCLUDEPATH += /path_to_hpp_file
@My mainwindow.h
@
#include "function.hpp"
@and on my mainwindow.cpp also (wich doensn't change anything):
@
#include "function.hpp"
@Now I am getting "multiple definition" error... And I don't know why...
-
It's the method already defined in other part of your code?