qt-labs / vstools

Other
73 stars 23 forks source link

Static build fails to compile #32

Open miken2c opened 2 weeks ago

miken2c commented 2 weeks ago

Im getting this error when trying to compile qt static with particles:

1>particlesplugind.lib(particlesplugin_QtQuick2ParticlesPlugin.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl qml_register_types_QtQuick_Particles(void)" (?qml_register_types_QtQuick_Particles@@YAXXZ) referenced in function "public: __cdecl QtQuick2ParticlesPlugin::QtQuick2ParticlesPlugin(class QObject *)" (??0QtQuick2ParticlesPlugin@@QEAA@PEAVQObject@@@Z)

I'm on Windows compiling with VS2022, latest sources and extension.

miken2c commented 2 weeks ago

I compiled the extension sources from this repo and now it compiled, however when i start my application:

module "QtQuick" plugin "qtquick2plugin" not found 
     import QtQuick 2.5 
     ^
file::/qt-project.org/imports/QtQuick/qmldir: module "QtQuick" plugin "qtquick2plugin" not found
miken2c commented 2 weeks ago

I found that this is an open issue with a fix, i recompiled the extension with the modifications from:

https://codereview.qt-project.org/c/qt-labs/vstools/+/581695/3

Its not compiling anymore:

1>Build FAILED.
1>
1>C:\Users\Mike\AppData\Local\QtMsBuild\qt_vars.targets(39,5): error MSB4057: The target "QtQmlStaticGenerateImportFile" does not exist in the project.
1>    0 Warning(s)
1>    1 Error(s)

The fix isnt finished?

miken2c commented 1 week ago

After uninstalling the extension i had the one on VS marketplace, i also had to delete the folder: C:\Users\Mike\AppData\Local\QtMsBuild or it wouldnt update to the newer one (the one compiled with the sources from here).

But now i'm getting a different error:

AppData\Local\QtMsBuild\qml\qtqml_static.targets(349,5): error MSB4044: The "ReadLinesFromFile" task was not given a value for the required parameter "File". 

The error disappear if i add at least one .qml file to the .qrc, and the project compiles, however, i continue getting the same error:

module "QtQuick" version 2.5 cannot be imported because:
module "QtQml" plugin "qmlmetaplugin" not found 
     import QtQuick 2.5 
     ^

I also tried with a fresh new project.

I have C++20 set on the project properties but after installing this new source it looks like the project is no longer using C++20, is this a know issue?

I also start getting issues related to the precompile header, i have the path as:

image

And im getting compile errors on all moc files:

moc_....cpp(9,10): error C1083: Cannot open include file: 'source/stdafx.h': No such file or directory

This error only happens with this version.

@acdemiralp

miken2c commented 4 days ago

@acdemiralp please update us with any info about this issue, its been weeks since i post this and i have been unable to properly compile my project