-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: msvc and release is a build failure #2
base: main
Are you sure you want to change the base?
Conversation
src/qtacrylichelper_global.h
Outdated
#else | ||
#define QTACRYLICHELPER_API Q_DECL_EXPORT // Q_DECL_IMPORT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course deleting the following two lines directly will also fail to compile. Although it is a bit strange.
When switching to release, it will show that this macro is not defined. It is a bit inconsistent with the definition here qtacrylicmaterial/src/CMakeLists.txt Line 62 in a04c19a
|
I suspect this would be an incorrect fix :( |
@moodyhunter But it does fail to compile (me too 😅) Win10 21H2 + MSVC(2019) + Release |
strange. but I'm on a holiday trip, will investigate a bit once I'm back home. |
It seems that for a static build, |
@XMuli can you try adding... if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_NAME} PUBLIC QTACRYLICHELPER_STATIC)
endif() to Note the |
It is running successfully. @moodyhunter thanks But I am confused as follows: qtacrylicmaterial/src/CMakeLists.txt Line 43 in a04c19a
BUILD_SHARED_LIBS is ON by default and generates shared (not static), why does it become static under release?
|
I haven't experienced that before... |
Okay, I'll try it when I get home tonight |
The test is as follows(Win10 + VS2019 + CMake 3.3) ON: Generate (.dll + .exp + .lib) |
Modified the commit to generate to avoid direct run failures and confusion |
@@ -3,6 +3,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) | |||
set(CMAKE_AUTOUIC ON) | |||
set(CMAKE_AUTOMOC ON) | |||
set(CMAKE_AUTORCC ON) | |||
set(BUILD_SHARED_LIBS ON) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may it be wrapped by an if
check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What to calibrate?😰
If you want to generate .lib
manually change it to OFF.
No description provided.