Qt-AES icon indicating copy to clipboard operation
Qt-AES copied to clipboard

qtaes_export.h: No such file or directory

Open pandazz77 opened this issue 1 year ago • 3 comments

...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

pandazz77 avatar Sep 09 '24 13:09 pandazz77

Same here with Qt6.8 on Ubuntu 22.04

ghost avatar Oct 23 '24 09:10 ghost

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.

ghost avatar Oct 23 '24 12:10 ghost

@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

xbaosong avatar Jan 10 '25 12:01 xbaosong

It seems qtaes_export.h should be generated by generate_export_header(QtAES EXPORT_MACRO_NAME QTAESSHARED_EXPORT) which was removed in 93020ab6c69203aba49ef1fd43e3119b718195b8

jmlich avatar Sep 10 '25 08:09 jmlich