Qt-AES
Qt-AES copied to clipboard
qtaes_export.h: No such file or directory
...3rdparty\qtaes\qaesencryption.h(5,10): fatal error C1083: Cannot open file: qtaes_export.h: No such file or directory, [C:...\build\3rdparty\qtaes\QtAES.vcxproj]
non standalone build
msvc v17.7.6 qt 6.5.3 same issue on Ubuntu 22.04 gcc 11 qt 6.5.3
Same here with Qt6.8 on Ubuntu 22.04
It seems that in my project CMakeLists.txt there's a line set(BUILD_SHARED_LIBS ON) which is enabled if another variable is is set to ON. QtAES is built as a sub-project. When setting BUILD_SHARED_LIBS to OFF, the error doesn't happen.
@pandazz77 @ymau
I had the same problem, and can be solved by creating qtaex_export.h in the root directory.
Basically, the file defines which symbol should be exported.
file: qtaes_export.h
#pragma once
#include <QtCore/qglobal.h>
#if defined(QTAESSHARED_EXPORT)
# define QTAESSHARED_EXPORT Q_DECL_EXPORT
#else
# define QTAESSHARED_EXPORT Q_DECL_IMPORT
#endif
It seems qtaes_export.h should be generated by generate_export_header(QtAES EXPORT_MACRO_NAME QTAESSHARED_EXPORT) which was removed in 93020ab6c69203aba49ef1fd43e3119b718195b8