Open gvanem opened 2 years ago
As you mentioned building CopperSpice and any C++ application which links with CS using MSVC-2019 will work correctly.
Just so you know the issue you run into is not related to strings or the UTF-8 encoding. The problem is that the clang-cl compiler is somewhere between clang and MSVC. So it is not a real clang compiler, which we do support on other platforms. Windows is just a bit unusual.
This is not a simple item to solve since compiler specific directives would need to be added and existing ones would need to be adjusted. If this is something you are interested in working on please let us know and we can give you more information.
Barbara
This is not a simple item to solve since compiler specific directives would need to be added and ...
I have no problem mixing .dll/.lib files between MSVC and clang-cl in plain C. So I'm interested in which compiler specific directives that needs tweaking, yes.
This is not about DLL files or the fact that CopperSpice was written in C++. We support multiple compilers and there are differences between (1) msvc and (2) clang. Right now our libraries assume you are using one or the other. The clang-cl compiler is mixture of both and would need to be treated as a third compiler.
If you do a search for Q_CC_MSVC and Q_CC_CLANG you will find about 40 #ifdefs. Every one of these needs to be examined and changed in some way. You can see these defines in the qglobal.h file.
The other item is the platform specific code located in /src/plugins/platforms/windows. This code has not been compiled with clang or clang-cl. It may be perfectly fine or there many be changes which are required.
We are happy to help you investigate and answer questions as you go along. It would be nice to add these changes to CopperSpice and your work is appreciated.
Barbara
I've built the CopperSpice libraries using MSVC-2019 and used them to build KitchenSink and Diamond just fine. And both programs works fine.
But using
clang-cl
(the supposedly 100% compatible MSVC compiler driver) to compile Diamond, I'm getting 17 unresolved link errors for these symbols:in
search.obj
andsyntax.obj
.I suspect there's is an issue with the
cl
option-Zc:wchar_t
thatclang-cl
does not like. Or how some UTF-8 issue (?). Any pointers on this?