On quarta-feira, 30 de janeiro de 2013 10.15.49, Charley Bay wrote: > I'm using "qmake -tp vc" to generate MSVC *.vcproj files, works great. > (Qt5, wrapping C++ classes for exposure to QML.) > > I'm doing some "tricky-template" stuff, and I *cannot* include the template > implementation in the "MyClass.hpp" header, but I *can* explicitly include > the template implementation into the the "MyClass.cpp". > > ISSUE: The moc-generated "moc_MyClass.cpp" won't compile because it > *needs* my template implementation(s). By default, it only includes > "MyClass.hpp", which is not enough (I need it to explicitly include my > template implementations).
#include "moc_MyClass.cpp" at the end of your MyClass.cpp. qmake will see the include and will not try to compile it separately. > I *think* I need to go back to the "old-moc-workflow" where I "#include" > the moc-generated file directly into my "MyClass.cpp", below where I > include the template-implementation-headers (and the moc-generated file > would no longer be compiled separately). However, I'm also having trouble > getting that into my workflow (*.pro ==>moc==> *.vcproj). > > Does anyone have suggestions, or a tutorial somewhere on how to do this? Are you saying that, with the #include, the generated vcproj file does not compile as nmake would on the command-line? -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
