Closed matkuki closed 1 year ago
Got it working:
This is the updated compilation command:
nim cpp --cc:vcc --outdir:build --passC:" -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:throwingNew -permissive- -Zc:__cplusplus -Zc:externConstexpr -O2 -MD -std:c++17 -utf-8 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -EHsc -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DNDEBUG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Nim\lib -I..\..\Qt6\6.3.1\msvc2019_64\include -I..\..\Qt6\6.3.1\msvc2019_64\include\QtWidgets -I..\..\Qt6\6.3.1\msvc2019_64\include\QtGui -I..\..\Qt6\6.3.1\msvc2019_64\include\QtCore -I/include -I..\..\Qt6\6.3.1\msvc2019_64\mkspecs\win32-msvc /Zc:strictStrings- shell32.lib" --passL:"/link /NOLOGO /DYNAMICBASE /NXCOMPAT /OPT:REF /OPT:ICF /INCREMENTAL:NO /SUBSYSTEM:WINDOWS shell32.lib" --clib:J:\Qt6\6.3.1\msvc2019_64\lib\Qt6Widgets --clib:J:\Qt6\6.3.1\msvc2019_64\lib\Qt6Gui --clib:J:\Qt6\6.3.1\msvc2019_64\lib\Qt6Core --clib:J:\Qt6\6.3.1\msvc2019_64\lib\Qt6EntryPoint qttest.nim
On to the next step of getting it to run on Windows :)
cl : Command line warning D9002 : ignoring unknown option '-lQt6Core'
cl : Command line warning D9002 : ignoring unknown option '-lQt6Gui'
cl : Command line warning D9002 : ignoring unknown option '-lQt6Widgets'
So, I guess -l
is not a valid flag (and possibly some other parameters are missing, once that is fixed).
I barely use Windows. Could you figure out what flags should be used, by compiling a toy c++ Qt program and looking at the flags?
Whoa, simultaneous posting 😊 Got it working, see my above comment, thanks.
Thanks! That looks like an impressive compilation command. Do you know the minimal set of flags that are necessary to get it working?
@jerous86 I'll minimize the compilation command flags as soon as I can 👍
@jerous86 Here are the minimized options for compilation on Windows, I'll write it as a list:
Hope it helps
Thank you @matkuki!
Do you have any idea how I can add these --clib
flags transparently for the user? I don't think there's a pragma for this, and not sure how to selectively add them to nimble configuration, by getting output from qmake
.
Do you have any idea how I can add these --clib flags transparently for the user?
No idea, sorry.
I personally don't like things like this to be added implicitly under-the-hood
, I prefer that it would just be a note in the readme
to manually add these flags.
Hi,
Specs:
Managed to get it to compile, but linking is now a problem. The compilation command is:
nim cpp --cc:vcc --passC:"-permissive- -Zc:__cplusplus /std:c++17 /Zc:strictStrings-" --passL:"/link /NOLOGO /DYNAMICBASE /NXCOMPAT /OPT:REF /OPT:ICF /INCREMENTAL:NO /SUBSYSTEM:WINDOWS MANIFEST:embed" qttest.nim
This is the compilation output: