I am trying to build a Qt GUI Main Window project and get the following errors:
BLDMAKEERROR:Can't find "\Symbian....\BLD.INF
bldmake returned with exit value=1
In the last two days, I've re-installed above apps many times following all
installation guides; setting up the environment variables but nothing worked
out.
Kindly anyone help as I've been able to build even the Helloworld program.
Thanks in advance.
bld.inf gets generated by qmake from your .pro file. Have you run qmake on your project? In Carbide.C++ Qt perspective it's Project->Run qmake.
I got the same problem even w/o Qt and qmake. :( The problem is in the IDE: it generates wrong bld.inf! If you open folder "group", which contains bld.inf, you'll see the Icons_aif_scalable_dc.mk file, but in bld.inf it configured as
PRJ_MMPFILES
gnumakefile icons_scalable_dc.mk
And this is the source of the problem, so after changing icons_scalable_dc.mk on Icons_aif_scalable_dc.mk project will be built as it should.
Related
I am trying to create a GUI in QTCreator using Python but whenever I try to edit the code on a button I get the following error.
I have tried rebuilding the project multiple times and I am still getting the same error.
I had the same issue. if there is a .pro file check in there to see if the form.h is in the same format as well as in your form.cpp I had to delete and re-add them and do a rebuild all and it worked I hope it works for you as well.
I am new to Qt so I follow a tutorial on QML. It starts with a basic qml file which should be run with qmlviewer.
The problem is that when I start qmlviewer it says
qmlviewer: could not exec '/usr/lib/qt/bin/qmlviewer': No such file or directory
whereis qmlviewer tells me that it's location is /usr/bin/qmlviewer so I try to run it with this absolute path, but I still get the same error
qmlviewer: could not exec '/usr/lib/qt/bin/qmlviewer': No such file or directory
Why is it still looking for that location ? How can I solve this ?
I should mention that I have tried qtconfig just for testing, and I still get the error, so this is a global Qt problem.
Thank you
As said in the documentation : http://doc.qt.io/qt-5/qtquick-porting-qt5.html
The qmlviewer tool provided for prototyping and testing QML
applications in Qt 4.x has been replaced with the qmlscene tool which
integrates with the new scenegraph features in Qt 5.
So using qmlscence all works.
I am trying to set up Marble to work with Qt 5.5 on OSX. I'm not very experienced with the details of linking and such and I think that is causing the problem I am having.
Question: Did I screw up the 'marble` install or is this an easily solved linking issue?
Qt 5.5 is installed in my user directory (using Qt's network installer) on a system running OSX 10.9.5. It works fine. I followed the instructions on the Marble site to clone, build and install from source with (I believe) the appropriate Qt flags. That seemed to go without issue. When I try to build the simple test app listed here, the #include <marble/MarbleWidget.h> line gives a "file not found" error.
After the install I've ended up with the following:
A "marble" directory in my root user folder
A "Marble.app" file along with various other marble related files in the bin and include directories. However the Marble.app gives the following error on launch:
Dyld Error Message: Library not loaded:
#rpath/QtCore.framework/Versions/5/QtCore Referenced from:
/usr/local/Marble.app/Contents/MacOS/marble-qt Reason: image not
found
Binary Images:
0x7fff6a1f9000 - 0x7fff6a22c817 dyld (239.4) <7AD43B9B-5CEA-3C7E-9836-A06909F9CA56> /usr/lib/dyld
So a semi-solution: I used the Qt Creator "add Library" function and ended up with the following additions to the .pro file. I had to paste in the link to the lib since the dialog doesn't allow browsing of "usr/local/". Also, although I tried to link to the lib alias ("libmarblewidget-qt5.dylib"), the actual lib name is used.
macx: LIBS += -L$$PWD/../../../../../usr/local/lib/ -lmarblewidget-qt5.0.21.80
INCLUDEPATH += $$PWD/../../../../../usr/local/include
DEPENDPATH += $$PWD/../../../../../usr/local/include
I don't understand what this $$PWD/../../../../../ business is.
But it worked and I am able to run the example code at the link in my question.
I wish this install/build stuff wasn't so damned arcane. I've spent endless hours just trying to get things set up – really sucks the joy out of exploring this stuff and I can't say I really learned much of anything from it.
Update
So I cleaned out the "$$PWD" crap and the literal lib name and it works. Not sure what difference it makes – but there you go.
macx: LIBS += -L/usr/local/lib/ -lmarblewidget-qt5
INCLUDEPATH +=/usr/local/include
DEPENDPATH +=/usr/local/include
Either the build is faulty or you need a different version of Qt installed to run it. Usually the app has the Qt libraries that it needs wrapped up in the app itself. If it's not in there it will search your mac for it. The message says that QtCore can't be found in either place. If you look inside Google's Google Earth, you can see where the libraries are stored. You can also copy a version of QtCore into your Marble to see if it will work.
I created a C++ library project in Qt creator. After building the project I have the libMylib.so, .so.1, .so.1.0, .so.1.0.0, Makefile and mylib.o files. I added the library headers to my other project and added the path to my .pro file like this:
LIBS += "/home/peter/Workspace/build-Libtester-Desktop-Release/libMyLib.so"
When building the application I don't get no such file error, but when running it I get this:
/home/peter/Workspace/build-Libtester-Desktop-Debug/Libtester: error while loading shared libraries: libMyLib.so.1: cannot open shared object file: No such file or directory
which I can't understand, because it's right there next to the .so which it seem to find, because when the path is wrong I get a no such file or directory error when trying to build the project.
Could someone explain what I'm missing here?
Thanks for your time.
Fortunately, your problem has nothing to do with both Qt and Qt Creator. The error simply boils down to how shared libraries are searched by LD for dynamic linking on Unix OS family.
Today, I've answered similar question, have a look, please. This question was asked in regard to Mac OS X. However, Linux and Mac OS X are the same in the context of your problem. I've provided additional explanation for Linux at the bottom, so pay attention to it. "it's right there next to the .so" - you seem to have Windows background if you make this assumption, but it is wrong for Unix OS family altogether (as stated in the answer too). If you have further questions, just ask.
You are adding the library incorrectly. You are doing:
LIBS += "/home/peter/Workspace/build-Libtester-Desktop-Release/libMyLib.so"
instead of:
LIBS += -L"/home/peter/Workspace/build-Libtester-Desktop-Release" -lMyLib
The first version works on windows, but not linux.
Basically, you create a library, which will be named "libMyLib.so", and then you specify the path to its folder, prepended by "-L" and then do "-lMyLib" at the end, note that it's not "-llibMyLib", but just "-lMyLib", despite the fact that the .so name is "libMyLib".
Look here: https://wiki.qt.io/How_to_create_a_library_with_Qt_and_use_it_in_an_application for more info.
After installing Qt SDK for Open Source C++ development on Mac OS by following the respective steps
Note for the binary package: If you have the binary package, simply
double-click on the Qt.mpkg and follow the instructions to install Qt.
Yes, that is all I have done to install Qt on MacOsX. Everything was going fine, until I run a sample application, of which compile output resulted in:
No valid Qt version set.
Set one in Preferences
Error while building project qtilk
When executing build step 'QMake'
Canceled build.
Then I tried to change the respective Qt version in Preferences and I hovered over the Path, I realized my mkspec isn't set:
Then I tried querying qmake by qmake -query:
QT_INSTALL_PREFIX:/
QT_INSTALL_DATA:/usr/local/Qt4.6
QT_INSTALL_DOCS:/Developer/Documentation/Qt
QT_INSTALL_HEADERS:/usr/include
QT_INSTALL_LIBS:/Library/Frameworks
QT_INSTALL_BINS:/Developer/Tools/Qt
QT_INSTALL_PLUGINS:/Developer/Applications/Qt/plugins
QT_INSTALL_TRANSLATIONS:/Developer/Applications/Qt/translations
QT_INSTALL_CONFIGURATION:/Library/Preferences/Qt
QT_INSTALL_EXAMPLES:/Developer/Examples/Qt/
QT_INSTALL_DEMOS:/Developer/Examples/Qt/Demos
**QMAKE_MKSPECS:/usr/local/Qt4.6/mkspecs**
QMAKE_VERSION:2.01a
QT_VERSION:4.6.2
QMAKE_MKSPECS seems to be set here??
Will setting my mkspec solve my building problem? I tried setting by typing export mkspec=macx-g++. Still, mkspec seems not to be set to anything. I am all ears waiting for your answers. Thanks in advance.
To set the correct spec, use:
qmake -spec max-g++