Build project on Windows
-
Hi
I have a project that contains (two subprojects) GUI applications and a library. I have been developing the project so far on Linux and everything has been fine. When I try to port the project to Windows and when I build it I get error undefined reference to all the functions from the library that I use in the GUI sub-project.How can I solve this problem?
I am using CMake.My code:
https://github.com/ppitu/ContractApp -
You've defined the export/import preprocessor define
CONTRACTAPPCORE_EXPORT
, now you just have to use it in your classes. For example, in Pattern.h#include "../contractapp-core_global.h" class CONTRACTAPPCORE_EXPORT Pattern { public: explicit Pattern(int vector_size = 0); . . .
-
@ppitu said in Build project on Windows:
How can I solve this problem?
By reading Creating shared libraries and/or How to create a library with Qt and use it in an application.
-
You've defined the export/import preprocessor define
CONTRACTAPPCORE_EXPORT
, now you just have to use it in your classes. For example, in Pattern.h#include "../contractapp-core_global.h" class CONTRACTAPPCORE_EXPORT Pattern { public: explicit Pattern(int vector_size = 0); . . .