Hi, I want load objects with dynamic library without result ;/
I add in *.pro file:
and in *.cpp or *.hCode:
LIBS += -Lpath -lname
Code:
extern "C" class __declspec(dllimport) testclass{};
It doesn't work. Why? Does it good prepare?
Printable View
Hi, I want load objects with dynamic library without result ;/
I add in *.pro file:
and in *.cpp or *.hCode:
LIBS += -Lpath -lname
Code:
extern "C" class __declspec(dllimport) testclass{};
It doesn't work. Why? Does it good prepare?
I'm not sure about the 'extern "C"'. And I'd use macros as explained here.
Anyway, what does not work? Do you get a linker error or a runtime error?
My program not complie ;/ I haven't any reports from debugger.
How can I use Q_DECL_IMPORT in my file who import library?
Btw:is it correctly? It isn't building me now.Code:
LIBS += -LC:\Documents and Settings\bla\Pulpit\Qt Progs\LoaderObj\debug -lLoaderObj
Hi, I use QLibrary, and have some problem with action.
It's my code:
1.In *.dll
2. In appCode:
void LOADEROBJSHARED_EXPORT kamil() {}
Why it don't laod my function while load library? ;/Code:
typedef void (*AvgFunction)(); QMessageBox kamil; library.load(); AvgFunction avg = (AvgFunction) library.resolve("kamil"); if (avg) kamil.setText("good"); else kamil.setText("bad"); kamil.exec();
I am having similar problems. I am new to libs and Qt. Anyone plz solve this problem.
For load classes from dynamic library see this link
http://www.prog.org.ru/topic_8259_0.html
PS: Russian language :)
Use http://translate.google and you will be a great happiness :)Quote:
Impossible for most of us.