Building a shared library on Qt
-
wrote on 25 May 2016, 13:12 last edited by A Former User
hi, guys
I'm trying to build a library by using some classes I got (file .h and .cpp) , I have a problem to include the classes headers to use them to create easier functions to the client
I hope it's clear for you.
if you have an idea for the problem let me know
thank youexcellent day.
qt code:
.h file :
#ifndef MOSTBIBLIO_H
#define MOSTBIBLIO_H#include "./files/flie1.h"
#include "./files/flie2.h"
#include "./files/flie3.h"
#include "./files/flie4.h"
#include "./files/flie5.h"
#include "./files/flie6.h"
#include "./files/flie7.h"
#include "./files/flie8.h"#include "mostbiblio_global.h"
class MOSTBIBLIOSHARED_EXPORT MostBiblio
{public:
MostBiblio();
// example :can't instantiate file1 .....};
#endif // MOSTBIBLIO_H
-
wrote on 25 May 2016, 14:24 last edited by
Try to use INCLUDEPATH in your .pro instead, maybe your program has problem dealing with relative paths.
example:
INCLUDEPATH=absolute path to directory of .files/include
run qmake, and try to insert your .h files
try both "include "files/flieX.h" and "flieX.h" to see if there's any kind of autocompletion, and if so, that should work -
hi, guys
I'm trying to build a library by using some classes I got (file .h and .cpp) , I have a problem to include the classes headers to use them to create easier functions to the client
I hope it's clear for you.
if you have an idea for the problem let me know
thank youexcellent day.
qt code:
.h file :
#ifndef MOSTBIBLIO_H
#define MOSTBIBLIO_H#include "./files/flie1.h"
#include "./files/flie2.h"
#include "./files/flie3.h"
#include "./files/flie4.h"
#include "./files/flie5.h"
#include "./files/flie6.h"
#include "./files/flie7.h"
#include "./files/flie8.h"#include "mostbiblio_global.h"
class MOSTBIBLIOSHARED_EXPORT MostBiblio
{public:
MostBiblio();
// example :can't instantiate file1 .....};
#endif // MOSTBIBLIO_H
@VitAmine
Also what is the exact error you're getting? -
wrote on 26 May 2016, 07:47 last edited by
hi, guys
I fixed the problem, it was the path thank you.
1/4