Skip to content
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

__declspec(dllimport) #31

Open
xiaomeixw opened this issue Aug 16, 2019 · 2 comments
Open

__declspec(dllimport) #31

xiaomeixw opened this issue Aug 16, 2019 · 2 comments

Comments

@xiaomeixw
Copy link

AbstractAppender.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) const akso::AbstractAppender::vftable'" (__imp_??_7AbstractAppender@akso@@6B@) AbstractStringAppender.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) const akso::AbstractStringAppender::vftable'" (_imp??_7AbstractStringAppender@akso@@6b@)
ConsoleAppender.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) const akso::ConsoleAppender::`vftable'" (_imp??_7ConsoleAppender@akso@@6b@)

@bluebrother
Copy link

Are you trying to statically link with Visual Studio? If so, does it help to make CUTELOGGERSHARED_EXPORT (in CuteLogger_global.h) empty?

@kevinlq
Copy link

kevinlq commented Nov 25, 2023

Static compilation requires changing the export symbols. Maybe this modification is more appropriate.

CuteLogger_global.h

#if defined(QT_SHARED) || !defined(QT_STATIC)
#  if defined(CUTELOGGER_LIBRARY)
#    define CUTELOGGERSHARED_EXPORT Q_DECL_EXPORT
#  else
#    define CUTELOGGERSHARED_EXPORT Q_DECL_IMPORT
#  endif
#else
#  define CUTELOGGERSHARED_EXPORT
#endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants