Compilation of Qt Property Browser - qt

I am using Qt 4 (the latest GPL version released by Nokia)
I download Qt Property Browser from doc.trolltech.com/solutions/4/qtpropertybrowser/index.html
I am using VC++ 2008, with Qt Visual Studio Add-In Installed.
I try to build simple project, under qtpropertybrowser solution.
Here is the error message I obtained :
1>------ Rebuild All started: Project: simple, Configuration: Release Win32 ------
1>Deleting intermediate and output files for project 'simple', configuration 'Release|Win32'
1>Moc'ing qtpropertybrowserutils_p.h...
1>RCC ..\..\src\qtpropertybrowser.qrc
1>MOC ..\..\src\qtvariantproperty.h
1>MOC ..\..\src\qtpropertybrowser.h
1>MOC ..\..\src\qtgroupboxpropertybrowser.h
1>MOC ..\..\src\qtbuttonpropertybrowser.h
1>MOC ..\..\src\qttreepropertybrowser.h
1>MOC ..\..\src\qtpropertymanager.h
1>MOC ..\..\src\qteditorfactory.h
1>Compiling...
1>qrc_qtpropertybrowser.cpp
1>qtvariantproperty.cpp
1>qttreepropertybrowser.cpp
1>..\..\src\qttreepropertybrowser.cpp(1091) : fatal error C1083: Cannot open include file: 'qttreepropertybrowser.moc': No such file or directory
1>qtpropertymanager.cpp
1>..\..\src\qtpropertymanager.cpp(6470) : fatal error C1083: Cannot open include file: 'qtpropertymanager.moc': No such file or directory
1>qtpropertybrowserutils.cpp
1>qtpropertybrowser.cpp
1>qtgroupboxpropertybrowser.cpp
1>qteditorfactory.cpp
1>..\..\src\qteditorfactory.cpp(2592) : fatal error C1083: Cannot open include file: 'qteditorfactory.moc': No such file or directory
1>qtbuttonpropertybrowser.cpp
1>main.cpp
1>Generating Code...
1>Build log was saved at "file://c:\Documents and Settings\yan-cheng.cheok\Desktop\qtpropertybrowser-2.5-opensource\qtpropertybrowser-2.5-opensource\examples\simple\release\BuildLog.htm"
1>simple - 3 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Any suggestion to pass the compilation will be very much appreciated.

OK. Finally I figure out the workaround, I need to manually run the following command before clicking on the build all button.
moc qttreepropertybrowser > qttreepropertybrowser.moc
moc qtpropertymanager > qtpropertymanager.moc
moc qteditorfactory > qteditorfactory.moc
Not sure why. Qt people should include these command in their build file :(

I found the correct method. It will make mocking work from Visual Studio.
For e.g. to get moc file for "spell_checker.h"
I did following steps.
Right click on the header file -> Properties -> Custom Build Step -> General ->
Command Line = "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_SCRIPT_LIB -I".\GeneratedFiles\." -I"$(QTDIR)\include\." -I".\GeneratedFiles\$(ConfigurationName)\." -I".\." -I"$(QTDIR)\include\QtCore\." -I"$(QTDIR)\include\QtGui\." -I"$(QTDIR)\include\QtScript\." ".\spell_checker.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_spell_checker.cpp"
Description = Moc'ing spell_checker.h...
Outputs = ".\GeneratedFiles\$(ConfigurationName)\spell_checker.cpp"
additional dependencies = "$(QTDIR)\bin\moc.exe";.\spell_checker.h

Related

error: cannot find -lc++ clang++: error: linker command failed with exit code 1

I'm having no luck running the Qt examples with Qt Creator. I've tried three so far, but I have been unable to build and run any of them.
and also it showing as QML module not found for QtQuickVirtualKeyboard import.
i have attached the error screenshot.
error: cannot find -lc++
clang++: error: linker command failed with exit code 1
The error: cannot find -lc++ using ndk r20 can be solved like this:
https://codereview.qt-project.org/c/qt/qtbase/+/264903/9/mkspecs/android-clang/qmake.conf#34][1]
For example to compile for android armv7 ndk r20, locate the file:
C:\Qt\5.13.0\android_armv7\mkspecs\android-clang\qmake.conf
and add the missing -nostdlib++
for android x86 (i use this for emulator), locate the file:
C:\Qt\5.13.0\android_x86\mkspecs\android-clang\qmake.conf

QT can't build - "Some of the required modules (!win32-g++) are not available"

I pulled down the qtpdf repository to check out and play with from here:
http://code.qt.io/cgit/qt-labs/qtpdf.git
As soon as I open the qtpdf.pro file, I get the following general messages:
Cannot read C:/.../build-qpdf-Desktop_Qt_5_10_0_MinGW_32bit-Debug/src/lib/pdfium.pri: No such file or directory
Cannot read C:/.../build-qpdf-Desktop_Qt_5_10_0_MinGW_32bit-Debug/src/lib/freetype.pri: No such file or directory
Project MESSAGE: perl -w C:\Qt\5.10.0\mingw53_32\bin\syncqt.pl -module QtPdf -version 5.9.0 -outdir "C:/.../build-qpdf-Desktop_Qt_5_10_0_MinGW_32bit-Debug" C:/.../qtpdf
Project MESSAGE: perl -w C:\Qt\5.10.0\mingw53_32\bin\syncqt.pl -module QtPdfWidgets -version 5.9.0 -outdir "C:/.../build-qpdf-Desktop_Qt_5_10_0_MinGW_32bit-Debug" C:/.../qtpdf
Project ERROR: Unknown module(s) in QT: pdfwidgets
Project ERROR: Unknown module(s) in QT: pdf
Also when running "rebuild all" I get the following error message:
16:15:33: Starting: "C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" qmake_all
"Some of the required modules (!qnx:!uikit:!winphone:!winrt:!win32-g++:!integrity) are not available."
"Skipped."
I've narrowed this down to !win32-g++ - If I remove that, it won't throw that error, but I don't understand what exactly this error means - I have googled around a lot but couldn't find anything that seemed reminiscent of this particular problem.
I managed to build qtpdf with mingw provided with Qt5.11.2.
Comment out "requires(!qnx:!uikit:!winphone:!winrt:!win32-g++:!integrity)" from pdf.pro
Apply the patch found here : https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-pdfium-git/pdfium-2729.patch (link dead in 2021, no backup sorry)
Add -luuid after "win32: LIBS_PRIVATE += -ladvapi32 -lgdi32 -luser32" in lib.pro
I don't know why, probably because I am not an expert, but mingw doesn't generate correctly the folder "include". As a workaround I use the one generated under linux. For some reason, mingw generate only QPdfDepends and QPdfWidgetsDepends, none of the needed headers are generated. I didn't dig because I am lazy.
Hope it helps !
# Upstream PDFium has not been ported to various platforms yet.
requires(!qnx:!uikit:!winphone:!winrt:!win32-g++:!integrity)
The module is not working on win32-g++ (mingw32).

Linking PHPUnit with PhpStorm

PHPUnit: 4.8.31
PhpStorm: 2016.1
I'm having issues running PHPUnit from within PhpStorm. From a CMD window, running the test works fine, but the PhpStorm output is this:
"C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-binaries\php\php704vc14x86x161109103716\php.exe" C:/Users/username/AppData/Local/Temp/ide-phpunit.php --no-configuration "C:\tests"
Testing started at 5:30 PM ...
Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-binaries\php\php704vc14x86x161109103716\ext\php_curl.dll' - The specified procedure could not be found.
in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-binaries\php\php704vc14x86x161109103716\ext\php_curl.dll' - The specified procedure could not be found.
Fatal error: Class 'PHPUnit_TextUI_ResultPrinter' not found in C:\Users\username\AppData\Local\Temp\ide-phpunit.php on line 253 in Unknown on line 0
PHP Fatal error: Class 'PHPUnit_TextUI_ResultPrinter' not found in C:\Users\username\AppData\Local\Temp\ide-phpunit.php on line 253
Process finished with exit code 255
I've included the folder with my phpunit.phar library in PhpStorm:
PhpStorm knows about the include paths, autocomplete works.
The run config looks like this:
The PHP version/install I'm using is the same one.
Windows:
PhpStorm:
Any ideas?
I tried running a script that uses curl from a CMD window and saw that the curl library wasn't loaded.
I did phpinfo(); and saw that the CMD window was using a different PHP installation (I had installed a new EasyPHP version).
I made the windows sys variable PATH point at my old one, then it started throwing some errors about not loading some libraries (php_curl.dll, libssh2.dll), so I moved them from the new install folder to the old one and to Windows\SysWOW64.
Miraculously, the PhpStorm run config was also fixed, which leads me to believe it doesn't use the interpreter I set in its options, but rather the one from PATH..
The PhpStorm output is now:
"C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-binaries\php\php704vc14x86x161109103716\php.exe" C:/Users/username/AppData/Local/Temp/ide-phpunit.php --no-configuration "C:\tests"
Testing started at 9:22 AM ...
Warning: The use statement with non-compound name 'PHPUnit_Framework_TestCase' has no effect in C:\DummyTest.php on line 3
PHPUnit 4.8.31 by Sebastian Bergmann and contributors.
PHP Warning: The use statement with non-compound name 'PHPUnit_Framework_TestCase' has no effect in C:\DummyTest.php on line 3
No tests found in class "TestDummy".
Time: 372 ms, Memory: 10.00MB
FAILURES!
Tests: 1, Assertions: 0, Failures: 1.
Process finished with exit code 1

basic_client which is built with Makefile BusAttachment::Connect failed

I just built standard core 15.09a on linux and run sample apps basic_client.
This one built by scons.
bin/samples/basic_client works fine.
However, I built cpp/samples/basic/basic_client with Makefile.
It does not work. It shows an error
"0.232 ****** ERROR ALLJOYN external ...e/src/BusAttachment.cc:560 | BusAttachment::Connect failed: ER_OS_ERROR
BusAttachment::Connect('') failed.".
So, I launched the bin/allhoyn-daemon, then no error occurred.
What is difference between scon and Makefile version?
Additionally, where can I get the information of application under the bin directory?
I searched the web-site of AllSeen and couldn't find any info.
As i know, the error that you got when build with Makefile happens because basic_client hasn't alljoyn router inside, with scons it runs fine because it compiles with BR=on and some flags:
-lajrouter -lBundledRouter.o -lssl -lcrypto
For more infomation, visit: here

v-play installation - Cant deploy on desktop and device

I’ve just installed v-play but when i compile to desktop i get error :-1: error: cannot find -lGL and exits.
Then if i compile to android it will compile and install but the it never successfully opens the app and it exits on deployment.
These are the warnings i get :
Warnings while parsing QML type information of /home/theguy/V-Play/5.5/android_armv5/qml/QtCanvas3D:
/home/theguy/V-Play/5.5/android_armv5/qml/QtCanvas3D/plugins.qmltypes:1:24: Reading only version 1.1 parts.
/home/theguy/V-Play/5.5/android_armv5/qml/QtCanvas3D/plugins.qmltypes:10:5: Expected only Component and ModuleApi object definitions.
Warnings while parsing QML type information of /home/theguy/V-Play/5.5/gcc_64/qml/QtWebSockets:
/home/theguy/V-Play/5.5/gcc_64/qml/QtWebSockets/plugins.qmltypes:1:24: Reading only version 1.1 parts.
/home/theguy/V-Play/5.5/gcc_64/qml/QtWebSockets/plugins.qmltypes:10:5: Expected only Component and ModuleApi object definitions.
Warnings while parsing QML type information of /home/theguy/V-Play/5.5/gcc_64/qml/QtCanvas3D:
/home/theguy/V-Play/5.5/gcc_64/qml/QtCanvas3D/plugins.qmltypes:1:24: Reading only version 1.1 parts.
/home/theguy/V-Play/5.5/gcc_64/qml/QtCanvas3D/plugins.qmltypes:10:5: Expected only Component and ModuleApi object definitions.
And these are the compile issues I get:
15:03:42: Packaging error: Command “/home/theguy/Android/Sdk/platform-tools/adb -s 9cc172fdedea pull /system/bin/sh: readlink: not found /home/theguy/Desktop/Projects/v-play/ConverseLanguages/build-ConverseLanguages-Android_for_armeabi_GCC_4_9_Qt_5_5_0-Release/app_process” failed.Exit code: 1
15:03:42: Package deploy: Failed to pull “/system/bin/sh: readlink: not found” to “/home/theguy/Desktop/Projects/v-play/ConverseLanguages/build-ConverseLanguages-Android_for_armeabi_GCC_4_9_Qt_5_5_0-Release/app_process”.
15:03:42: Package deploy: Running command “/home/theguy/Android/Sdk/platform-tools/adb -s 9cc172fdedea pull /system/lib/libc.so /home/theguy/Desktop/Projects/v-play/ConverseLanguages/build-ConverseLanguages-Android_for_armeabi_GCC_4_9_Qt_5_5_0-Release/libc.so”.
Error while building/deploying project ConverseLanguages (kit: Android for armeabi (GCC 4.9, Qt 5.5.0))
When executing step “Deploy to Android device”
please see here for a reply: https://v-play.net/developers/forums/t/installation-problem-error-cannot-find-lgl/
Cheers, Chris

Resources