[Interest] qmake bug. Any workaround?

Allan Sandfeld Jensen kde at carewolf.com
Fri Jan 15 16:36:17 CET 2021


On Freitag, 15. Januar 2021 15:54:25 CET Alexander Dyagilev wrote:
> Hello,
> 
> I am trying to create a .pro file to compile Microsoft Detours lib.
> 
> Failed, it generates linker error:
> 
> detours.obj:-1: error: LNK2019: unresolved external symbol
> DetourCopyInstruction referenced in function DetourAttachEx
> 
> This function is defined in disasm.cpp in case there are no special
> defines existing.
> 
> But, there are disolarm.cpp disolarm64.cpp disolia64.cpp disolx64.cpp
> disolx86.cpp sources which defines platform-depended definitions and
> then includes this disasm.cpp.
> 
> E.g. disolarm.cpp contains of only these 2 lines of code:
> #define DETOURS_ARM_OFFLINE_LIBRARY
> #include "disasm.cpp"
> 
> In this case disasm.cpp defines DetourCopyInstructionARM instead of
> DetourCopyInstruction.
> 
> Qmake has the bug (https://bugreports.qt.io/browse/QTBUG-24906) which
> causes qmake to DROP disasm.cpp from SOURCES because it's included in
> these source files . Thus plain DetourCopyInstruction is not defined
> anywhere.
> 
> If I replace #include "disasm.cpp" lines with file's content, all works
> fine. But this is not a workaround I want.
> 
Rename disarm.cpp to a header file, and include that in two different source 
files?

'Allan




More information about the Interest mailing list