How to include files from the subproject dll library in a unit testing subproject
-
Hi! I have a project with subprojects. One of the subprojects is a dll library that I'm developing (which means that some of the classes inside the dll library have q_decl_export). I'm trying to connect the classes from the dll subproject to the unit testing subproject. Everything works until I add the q_decl_export directive to the classes in the dll. What should I do? I want to connect the files from the dll subproject to the unit testing project as a dynamic library. In this case, all classes in the dll will need to be added with q_decl_export. However, I do not want all classes to be accessible from the dll.
-
Hi and welcome to devnet,
How did you add these macros ?
Did you properly follow the documentation on this subject ? -
Hi! I have a project with subprojects. One of the subprojects is a dll library that I'm developing (which means that some of the classes inside the dll library have q_decl_export). I'm trying to connect the classes from the dll subproject to the unit testing subproject. Everything works until I add the q_decl_export directive to the classes in the dll. What should I do? I want to connect the files from the dll subproject to the unit testing project as a dynamic library. In this case, all classes in the dll will need to be added with q_decl_export. However, I do not want all classes to be accessible from the dll.
Hi and welcome to the forum,
I don't quite understand your issue. You don't need to add the
EXPORTto all functions/classes of your library. You can still hide some classes or functions that you don't want in your target that imports the lib.Everything works until I add the q_decl_export directive to the classes in the dll. What should I do?
What does not work then?! How do you add the import/export directives to your project? Are you using the "Qt-Global" style?!