I installed BlackBerry NDK including IDE and downloaded the SDK. Now, I already set up Qt-Creator 2.8.1, 2.8.0, 2.6.2... In every version there is another problem with the build settings. The most appropriate try was with 2.6.2 and manually setting up the BB10 integration.
BB10 NDK Version: 10.1 for Target 10.1.0.4633 armv7le-v7
Creator is always started with bbnk-env.bat called before.
2.6.2:
Compiler set to GCC with custom-arm-linux-generic-elf-32bit as proposed by https://developer.blackberry.com/native/documentation/core/qt_porting_tools.html
(I do have a second compiler set to unix instead of linux)
QT-Version provided by Blackberry NDK, Qt 4.8.5 within %BBNDK%\host_10_1_0_238\win32\x86\usr\bin\qmake.exe.
Devices: BBZ10 is connected and accessible. QtCreator successfully connects and can use the debugToken.
Now the problem is within the Kits: Created a kit for BBZ10, having the bbZ10 Device, bbndk\target_10_1_0_4633\qnx6\armle-v7 as sysroot, compiler (set for linux), gdb to ntoarm-gdb.exe, QT-Version to configured 4.8.5. I can now try any mkspec it always gives me the error (translated from german)
No mkspec found for given QT Version
Für diese QT Version wurde keine mkspec gefunden
I think the mkspecs are set to compile to unix-target, while the 4.5qt supplied with the sdk requires to be linux target (where in reality target is QNX)
Somehow i can compile with this version, but first i am not sure if this creates a correct executable, even more i cannot deploy the executable, since QT-Creator does not create the bar-descriptor.xml file...
2.8.1:
Using the same setup as in 2.6 (after having 2.6 QT Version configured) i am able to get to the same error. Using the "new" configuration system under "BlackBerry" page in settings i cannot correctly set up NDK Path. Will always tell me (translated from german)
Following problems were encountered during BB10 configuration:
No QT-Version found
No GCC compiler found
No GDB Debugger for BB10 Comiler found
No GDB Debugger for BB10 Simulator found
Has anyone successfully configured bb10 ndk to use with qt-creator (2.6/2.8.1) and encountered similar trouble?
How can i solve this issue?
Solved:
After 24 hours trying, installing, reinstalling, editing, crying... I reinstalled complete NDK and QtCreator 2.8 and edited bbndk-env_10_1_0_4633.bat.
I removed every Variable from batch file and set it to corresponding values, e.g. replace every %BASE_DIR% with your acutal base-dir (i.e. D:\bbndk).
For conveniance usage i craeted another batchfile, calling the bbndk-env batch and starting qt-creator.
Set Compiler, Qt-Version, Kits in Creator-Settings as described in https://developer.blackberry.com/native/documentation/core/qt_porting_tools.html
Keep mkspecs line under Kits-tab empty
Thank You
Related
When attempting to build my Qt project with MSVC2015 64bit for Windows 10, I get this error:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\Ole2.h:37: error: C1083: Cannot open include file: 'objbase.h': No such file or directory
...
NMAKE:-1: error: U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64\cl.EXE"' : return code '0x2'
NMAKE:-1: error: U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64\nmake.exe"' : return code '0x2'
-- when nmake is invoked during the build process.
This exact same error also occurs for the example project "addressbook".
It appears to be some kind of toolchain issue, but I can compile a Qt Widget project in Microsoft Visual Studio 2022 if I point VS at my Qt installation.
I'm not sure what I need to do from here, since I already tried a reinstall of Qt. I have seen that putting things in Program Files is generally a bad idea, but that doesn't seem to be the issue in this specific case.
It appears to be part of the Windows SDK, if Google leads me right. However, I did not have to download the Windows SDK separately in order to compile my project and run it successfully before. (For context, the project's been developed for a few months and this problem only emerged a week or so ago).
My QT Installation:
Kit: Desktop Qt 5.15.2 MSVC2015 64bit
Version: Qt 5.15.2 MSVC2015 64bit
Compiler: Microsoft Visual C++ Compiler 17.3.32811.315 (amd64)
Things That Have Happened Before My Build Attempt:
I recently reinstalled Qt 5.15.2 in an effort to resolve a similar missing file issue.
The company's recently had issues with Microsoft Intune deleting applications. Maybe it hit the Windows SDK too.
Attempts at Solving the Issue
Reinstallation of Qt 5.15.2
Expected: My project building without errors. Result: This error.
Search of file system for objbase.h
Expected: Finding the file. Result: I did not find the file.
I'm newish at Qt, so I didn't want to try anything more esoteric lest I made things worse than before.
Update: MinGW 64 bit works for the example Qt projects, but I'd still like to use MSVC2015 if possible. It doesn't work for my project because I use some MSVC specific pre-processor flags in my source.
Update 2: I attempted to re-download MSVC 2015 from Visual Studio's website, using their Build Tools installer. While the installation successfully finished, I got no change from before -- it still can't find that "objbase.h" file. It's supposed to be in the Windows Kits directory under Include//um , I think.
It appears that, in my case, the objbase.h file was deleted due to the issue with Windows Defender deleting random files. I was able to reinstall the version of Windows SDK that was using and this fixed the issue for me.
I figured it out. I'm posting the solution here for others.
My issue was that, for reasons that are unclear to me, VS Studio Build Tools would not actually remove the SDK in question if I unchecked its box in the Modify screen. You can tell if this is happening by checking the disk size difference of the upcoming installation in the lower right of the screen -- if it won't remove the SDK, that size will be +0 bytes (assuming you don't check or uncheck any other box).
In order to properly reinstall the SDK version, I had to go to "Add or remove programs" and find the SDK there, uninstall it, restart my computer just for safety, and then go to VS Build Tools and install that SDK version. I had to do a "fake" uninstall with VS Build Tools (basically, uncheck the now-deleted SDK and click "Modify", allowing it to do the installation and download steps) before I could actually install the SDK again.
I'm working with a DEBIAN OS that it have an enviroment configured to work with a cross platform arm device with yocto.
After following the provider instructions:
Set up OS env with a script
open qtcreator from a terminal with the custom enviroment
add a kit with custom qmake, gcc and gdb (there is no warning)
add the device sysroot & ip (all tests ok)
Seems like all is ok but when i try to apply this changes i receive the following message:
Failed to set up kit for Qbs: Could no determine whether Qt is a
static build.
and the kit is not appearing when i try to create a new project.
i already check this pages and all explained there is done:
http://doc.qt.io/qtcreator/creator-targets.html
https://support.emtrion.de/en/details_operating-systems/linux-37.html?file=files/content/emtrion/downloads/emLinux-documentation-v008en.pdf
any clue about what is going wrong here?
Thanks by your time.
EDIT
i'm using qt-creator 4.7 and the current configuration works properly at 4.2 version.
the Qt version used fot the kit give the follow message at both versions:
ABI detection failed: Make sure to use a matching compiler when building
here is an open post with a similar unsolved issue:
https://forum.qt.io/topic/88857/my-kit-isn-t-showing-up/15
I just updated my Qt to 4.8.3, because the program built from older version is not compatible to the new framework.
So I have to upgrade.
This process was frustrating and time consuming. So many problems came out.
I download Qt from this url:
http://qt-project.org/downloads
At beginning, I installed the MinGW one (I'm not a fan of MSVC).
I tried the newest ( I think it's 4.6) version of MinGW and order version (4.4).
However, after I installed MinGW and tried to install Qt 4.8.3, during the process, the following message shows up:
There is a problem with your MinGW installation:
The installer could not find a valid C:\MinGW\include\w32api.h (Only versions with W32API 3.13 are supported)
Do you still want to continue? (Your installation may not work)
The 4.6 version does have this w32api.h file, I don't know what's going on. And I have trouble finding MinGW 4.4 with this head file.
I decide to ignore this warning and continue to install Qt and Qt creator. After that,
I opened my current project, configure it (why the configuration become so complex...), I tried to build it.
Then the following message shows up because some external lib I used requires Exception Handling:
exception handling disabled, use -fexceptions to enable
And I don't know how to enable the it.
I tried to add -fexceptions flag in QMAKE_CXXFLAGS but it doesn't work.
By the way, I tried the VC version of Qt too, but I used the MinGW before and the VC compiler is quite different, if I use VC version, it will take a lot of time to make it compilable by VC compiler.
Does anyone know how to install Qt 4.8.3 on Windows? my project works fine before, now I just want to compile it successfully.......
These are not the only problem.
I updated the Qt on Mac machine too, it is easier to have the compiler work since it's unix base.
However, I used QtWebkit lib in my project and obviously, they changed this lib and it's not compatible to order version.
I can compile my project on Mac, however, every time I run it, following massage shows up and the program stopped.
dyld: Symbol not found: _OBJC_CLASS_$_CALayerHost Referenced from:
/Library/Frameworks/QtWebKit.framework/Versions/4/QtWebKit Expected
in:
/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
The program has unexpectedly finished.
Does any one know how to solve this QtWebKit problem? I'll really appreciate.
I remembered that when Qt is under nokia, it's so easy to install and use, the Qt SDK is perfect.
I really hate the change made after it was bought by digia.........
I found solutions of my first two problems:
for the first problem, as I described, download the MinGW provided by Nokia Qt
ftp.qt.nokia.com/misc/MinGW-gcc440_1.zip [ftp.qt.nokia.com]
Tried several versions of MinGW 4.4, I think this is the only one works.
About the second problem, add following configure in the project file:
CONFIG += exceptions
Now the QWebKit problem is only one unsolved.
Is it all relevant that your include directory for MinGW has two "i's" in it or was that a typographic error when posted on SO? See:
The installer could not find a valid C:\MinGW\iinclude\w32api.h
I am facing a problem configuring Qt Creator, unable to add Qt Version.
Error is shown below :
I had installed Cascades native NDK and the BB simulator.
Help me out of this problem....
I think you're using Windows. So all next is context depended on Windows.
You need to add special environment variables like these:
QNX_TARGET=C:/Development/bb-ndk-3.0/target_10_0_9_386/qnx6
QNX_HOST=C:/Development/bb-ndk-3.0/host_10_0_9_52/win32/x86
QNX_CONFIGURATION=C:\Users\user\AppData\Local\Research In Motion\BlackBerry Native SDK
MAKEFLAGS=-I%QNX_TARGET%/usr/include
PATH=%QNX_HOST%\usr\bin;%QNX_CONFIGURATION%\bin;C:\Development\bb-ndk-3.0\ide\win32\x86\eclipse\jre\bin;%PATH%
PYTHONPATH=
QDE=C:\Development\bb-ndk-3.0\ide\win32\x86
or run bbndk-env.bat before starting Qt Creator:
Copy bbndk-env.bat to bin folder for QtCreator
Rename it to start-qtcreator.bat
Add there line qtcreator.exe
Run bat instead qtcreator
Ok i have done as per your updated answer, now error spoted is different than the previous one and that is "No qml Viewer installed".
I created an application using Imagemagick library with Qt on Mac.
Now that I want to deploy the application for windows:
I installed the imagemagick library
on my pc,
I installed the SDK version of QT 4.7
I added my include and lib paths
And when I go run the application I'm getting errors that I think they are related to mingw32.
here are the build issues:
and here is the compile output:
Can someone Identify the error ?
What do I have to do to deploy the application for windows?
I also tried to use a Mingw32 version of my library but again, It didnt work:
When I put -lmagick after the lib it says file lmagick cannot ne found
and when I try to build unticking the shadow build checkbox in the build settings, it give me the errors in the first screenshoot. Thank you
See the answer to this question.