Netbeans - Cannot find include file : QtGui - qt

I am trying to work with Netbeans ans Qt (on Windows) and I am having trouble getting set up.
I am getting a message that it can't find an included file: QtGui/QApplication.
I think that I must have a path wrong somewhere. Under Tools -> Options QMake Command I have
C:\Qt\2010.02.1\qt\bin\qmake.exe
In Windows, I have the PATH set to C:\Qt\2010.02.1\qt\bin
Any ideas?

Related

QtCreator - no rule to make target when building windeployqt

I have installed C:\Qt\5.6\ on Windows 10. I have started QtCreator from there, and opened C:\Qt\5.6\Src\qttools\qttools.pro in it. I expanded the node, and right-clicked on designer and did Build "designer", it built fine (using mingw)
Now, I try to do the same for windeployqt, but it fails with:
:-1: error: No rule to make target 'C:/Qt/5.6/mingw49_32/lib/libQt5Bootstrapd.a', needed by '..\..\bin\windeployqt.exe'. Stop.
What am I missing, and how can I get windeployqt to compile?
Ok, I think I got it. First, I tried looking for *bootstrap* named files in C:\Qt, and it turns out, this file exists:
C:\Qt\5.6\mingw49_32\lib\libQt5Bootstrap.a
So, the only difference from the filename in the error message, libQt5Bootstrapd.a, is that there isn't a d at the end of the filename (without the extension) - and then I remembered, that d probably represents a Debug version of the .a library.
As you can see on the screenshot, there is a button down left in the Qt Creator GUI, where it says "qttools ... (monitor icon) ... Debug". This is "Deploy Configuration" - I clicked there, and set the Deploy Configuration to "Release" - and then tried building windeployqt again - and this time, it worked without an error message.

Android SDK MonkeyRunner 25.3.2 Won't Run

So I upgraded Android SDK tools today and now I'm having a problem getting monkeyrunner to run. I did the standard which is (from the command prompt)
D:\Android\SDK\tools\bin\monkeyrunner.bat D:\ScriptName.py
Note 1: The directory of monkeyrunner.bat changed in this release, so I had to update my command line accordingly.
That fails with the message:
SWT Folder '..\framework\x86_64' does not exist.
I can fix that by editing monkeyrunner.bat and instead of having frameworkdir be set to 'lib' it gets set to '..\lib', the actual location of the monkey runner jar file.
However, when I implement this fix it then gives the error:
Cannot run program "..\framework\adb.exe" cannot find the file specified.
I'm kind of stuck here because no matter what I change in monkeyrunner.bat I get the same message, which indicates to me that the jar file has this directory hardcoded in it or something. It should probably be "....\platform-tools\adb.exe"
Any help would be appreciated.
-open monkeyrunner.bat in notepad
change set frameworkdir=. to set frameworkdir=..\lib everywhere
find the line call "%java_exe%" -Xmx512m "-Djava.ext.dirs=%frameworkdir%;%swt_path%" -Dcom.android.monkeyrunner.bindir= -jar %jarpath% %*
change the value of Dcom.android.monkeyrunner.bindir to the path of the folder containing adb.exe. Mine was under platform-tools

WinPython with PyQt5

I'm trying to get PyQt5 working with WinPython. PyQt5 comes with a readme file for installation, and I have unsuccessfully tried a few combinations of what I thought the first part of the readme tells me to do.
I have:
Windows 7 Home Premium 64-bit
WinPython-64bit-2.7.9.1
Qt 5.4
PyQt-gpl-5.4
PyQt-gpl-5.4 is in the folder (only partially sure that this is where I should have put it)
C:\WinPython-64bit-2.7.9.1\python-2.7.9.amd64\Lib\site-packages\PyQt-gpl-5.4
My current attempt at getting everything working is: I'm trying to run the configure.py file in PyQt-gpl-5.4, but when I do so I consistently get the following error:
Error: PyQt5 requires Qt v5.0 or later. You seem to be using v4.8.6.
Make sure the correct version of qmake is on your PATH.
What I think is the required version of qmake being referred to is in the folder
C:\Qt\5.4\mingw491_32\bin
However, I have no idea how to fix the error by adding the qmake in this folder to PATH. My most recent attempt was to add the folder using Spyder's Tools->PYTHONPATH manager, but this made no difference. I also tried adding it using sys.path.append('C:\Qt\5.4\mingw491_32\bin'), but this didn't work either. I have since removed the folder name from both of these locations.
How do I get PyQt5 working with WinPython-64bit-2.7.9.1, or I think equivalently, how to I get the configure.py file in the PyQt-gpl-5.4 folder to run?
Thanks.
You definitely don't want the source code (i.e. PyQt-gpl-5.4) in the site-packages folder, because that's where the compiled modules will end up. Instead, it should just go in a temporary folder whilst you compile it.
When you run configure.py, you must take care to use the executable for the specific python that you are targeting. I do not know anything about WinPython, but for a normal python installation this means doing something like this:
C:\Python34\python configure.py
As a first step, before attempting to actually compile anything, it would be advisable to take at look at all the configuration options that are available, like this:
C:\Python34\python configure.py --help
(There's also the Installing PyQt5 section in the PyQt Docs).
This will tell you, for instance, that the simplest way to specify the Qt installation you are targeting would be something like this:
C:\Python34\python configure.py --qmake C:\Qt\5.4\mingw491_32\bin\qmake
EDIT:
Sorry, that last part is wrong: the --qmake option isn't available on Windows, so you have to add the directory containing the qmake executable to your PATH. This can be done with the following command:
set PATH=%PATH%;C:\Qt\5.4\mingw491_32\bin

netbeans, Qt, & Qmake "command not found"

All,
I am (trying to) using Netbeans to build a simple Qt app (from a tutorial) and I cannot build it because I get this error:
/C/Qt/2010.02.1/qt/qmake/qmake.exe VPATH=. -spec win32-g++ -o qttmp-Debug.mk nbproject/qt-Debug.pro
make[1]:/C/Qt/2010.02.1/qt/qmake/qmake.exe: Command not found
when the file is exactly there, and I can open a terminal and execute it.
Note in the error message: "/C/Qt..." The actual path is C:/Qt...
I have used the tools/options/c++ dialog to browse to the file and select it, and it is specified as C:\Qt... just like all the other tools. What is corrupting the C: and making it /C/ ?
Now, if I remove the path to qmake, and have it use the PATH environment variable, it finds it, but then it fails due to 'multiple targets'...
Obviously, pilot error, but where? I have seen several posts on this, and they all say to make sure it is in the path, and it is, so now what? (I can open a terminal and type 'qmake' and I get the 'Usage: qmake..." so I know it is visible.
Windows 7, Netbeans 7.0, MinGW (I also have cygwin installed...).
Any and all help greatly appreciated.
:bp:
Addenda: I changed the path to my 'make' to use the MinGW one rather than the cygqin one, and now it can find qmake, but I get other errors: 'Could not find mkspecs for your QMAKESPEC(win32-g++) after trying:...
Any additional thoughts?
QMake requires more than just a path to work correctly. On my Windows box, there is a menu option for 'Qt Command Prompt' under the 'Qt SDK 2010.05' group in the Start Menu. Running it produces the following:
Setting up a MinGW/Qt only environment...
-- QTDIR set to C:\Qt\2010.05\qt
-- PATH set to C:\Qt\2010.05\qt\bin
-- Adding C:\Qt\2010.05\bin to PATH
-- Adding C:\WINDOWS\System32 to PATH
-- QMAKESPEC set to win32-g++
You will want to make sure the environment you launch qmake in has all of those set.
The most probable reason you are see '/C/...' is because you are causing a mingw shell to run when you execute your build.

Adobe Flex Apache module under Linux

I'm attempting to use the Adobe Flex Apache (2.2) module under Linux from here - http://labs.adobe.com/wiki/index.php/Flex_Module_for_Apache_and_IIS (the manual install). I have a perfectly working Apache system, with Ubuntu 8.10 and the Sun JDK v6 update 10 so installing this is not about support tools.
I can't figure out how to make this apache module work.
My httpd.conf shows this:
LoadModule flex_module /usr/lib/apache2/modules/mod_flex.so
AddHandler flex .mxml
The mod_flex.so is in the right place.
I have /usr/bin/compiler.sh:
#!/bin/sh
java -Djava.awt.headless=true -ms128M -mx256M -jar "/home/jamie/Adobe_Flex_Builder_Linux/flexc.jar" ${*} 2>&1
(why on earth would you hardcode the location of this?). This shell script gets executed (e.g. if I put a echo "hi!" >> /tmp/log.txt, it shows up).
But, it just returns to the browser a blank page. So the module is doing something, it just ain't doing it correctly.
The compiler configuration file (which I've put in the same directory as compiler.sh, as the flexc.jar and as the .mxml file being compiled references:
flex_config=/home/jamie/Adobe_Flex_Builder_Linux/sdks/3.0.0/frameworks/flex-config.xml
flex_lib=/home/jamie/Adobe_Flex_Builder_Linux/sdks/3.0.0/frameworks
Now, sometimes I manage to get error output into the browser - it complains about not being able to find the class flash.localization.ILocalizer.
I've managed to squash that error by editing the manifest in flexc.jar to point to the necessary jar files from the 3.0.0 Flex SDK from Adobe (I did try and set the CLASSPATH environment variable to point to the necessary jars, but that didn't work) Now, my latest error is:
An error occured on the server. Server error is: 'Error occurred in server thread; nested exception is: java.lang.NoClassDefFoundError: flex2/linker/SimpleMovie'
This shows up in a nicely formatted "Compilation Results" page in the browser, so obviously now I've got the compiler trying to compile the mxml, and failing because it's missing mxmlc.jar. Adding mxmlc.jar to the flexc.jar manifest has not helped this last problem.
Any help appreciated!
After some googling, I've found one Linux Macromedia Flex on Tomcat-HOWTO, at http://members.cox.net/midian/howto/flex+tomcat.htm It looks pretty simple, from that perspective. Have you installed Tomcat?

Resources