Qt5 project not building with Xcode 7 - c++

I am working on a Qt5.4 project with C++11 using Xcode 6.4 as IDE, built with CMake 3.3.1. Recently, OS X decided to update to Xcode 7.0 (7A220), and as a result.
I now get the following message every time I try to build.
The run destination My Mac is not valid for Running the scheme
'live'.
Any ideas how to make it work again? I have no other destinations to build to, and creating fresh schemes does not solve the issue.

I was a little too quick on the trigger. Re-building with Cmake did the job.

Related

Qt cannot load cocoa plugin

I'm trying to compile and run an application on a MacBook using Qt Creator. There are no issues compiling the project, but when I try and run it, it seems to be unable to load a plugin.
Could not load the Qt platform plugin "cocoa" in "" even though it was found.
The application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
This error occurs both when trying to run the application from Qt Creator or via Finder. It seems to only happen when I use the CMake build system (no issues when using QMake), but my existing project that I need to deploy on MacOS uses CMake.
My steps to reproduce are:
Install a completely clean MacOS (no user data)
Install Xcode 11
Install CMake 3.15
Install Qt 5.13.1 MacOS package
Open QtCreator->New Project->Qt Quick Application - Scroll
Set build system to CMake (important)
Compile and notice error
I am using:
Qt 5.13.1
macOS Catalina 10.15
Apple Clang 11
I recognize that for final user deployment I will need to use the macqtdeploy tool to copy the Qt libraries to the executable folder, but I should be able to run my app from QtCreator without doing this? Especially as it works fine when using QMake.
So it ended up being some kind of name resolution thing where Qt Creator couldn't decide whether to use the debug or release versions of the framework. Supplying DYLD_IMAGE_SUFFIX=_debug fixed this (add this to the environment section under Kits).

building Qt 5.2.0 with mingw 4.8.1

this is the first time i am trying to build Qt from source. so i need help from a expert. previously i used qt by installing it using their offline installers. but open cv library cannot be used with it. so i need to build qu frim source. im using win 7 64 bit OS.
i installed active perl, active python, ruby and git. the niwest versions and and added them to path. my path variable llist looks like follows.
then my mingw gcc version looks like follows.
then i build and installed ICU librarys as discribed in http://qt-project.org/wiki/Compiling-ICU-with-MinGW
then opened a cmd as adminisrtator and cd into qt extracted folder and configured as
configure -prefix %CD%\qtbase -opensource -nomake tests -opengl desktop
after configure complets then mingw32-make
it tooks about 1 hour in my i5 2.6ghz processor and ended with following errors.
what may be dhe mistake. am i doing enything wrong. has enybody successfully compiled Qt 5.2 with mingw 4.8.1 on a win 7 64bit system. if qt build successfully will it end with a messsage that qt was build successfully or somthing similar.
i know qt creator can be installed seperatly. but qt designer, will it also be built with qt librarys. can some expert help me with this issue. im trying this for several days.
eny helpwill be highly appricated... thank you....
Try to run make again. It was the same for me.
After two tries it compiled successfully.
I don't remember if it was the same error, but it always fail first time for me and then after running make again it compiles.
Previous versions didn't have this problem.
I have now problem compiling my code, because gcc crashes, but that's different problem.

Stanford CS106B C++ libraries in XCode 4

I'm trying to use the Stanford CS106B C++ libraries, like simpio.h and genlib.h. I'm using XCode 4 (this is a beta version btw) and Mac OS X 10.6. I installed the libraries, but they don't seem to be showing up when I try to create a new project in XCode. Is there something different I should be doing with XCode 4 to get these libraries in?
There's probably a pretty basic solution to this problem, and if it were just a matter of frameworks in iOS, I could definitely get that to work with this version of XCode, but I've not really done this with C++ and XCode before, so I'm stuck.
Update on 7/20/11
I found a link to download the Xcode 2.5 tools as well as Xcode 3.0, both of which are described in the handout. I'm downloading both of them now. Does anyone know if Xcode 3.0 and 4.2 will run fine on the same machine?
Yes, multiple versions of Xcode work fine together. During the install, after the "Select a Destination" screen, you see a screen with the packages that will be installed. Click "Developer" folder to change to a custom location for each different Xcode version. The other tools (system and UNIX) cannot be moved.
After you have Xcode installed, just install your libraries in the usr/lib folder under your custom Xcode folder, and you should be good to go.

Qt + VTK + MAC version based compilation and execution

I have successfully Built and compiled VTK with Qt on Mac osx 10.6.7. Then according to the requirements I changed configuration in CMAKE so that the target version is 10.5. I compiled VTK with Qt again and it was successful, with cones tutorials examples running. But whenever i compile my own application which is built using QVTK Widget i got this error
"Check with the developer to make sure
Application works with this version of MacOS
X. You may need to reinstall the
application ..."
Following is my CMAKE Configuration
BUILD_EXAMPLES checked
BUILD_SHARED_LIBS checked
CMAKE_OSX_ARCHITECTURES x86_64
CMAKE_OSX_DEPLOYMENT_TARGET 10.5
CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk
VTK_USE_COCOA checked
VTK_USE_CARBON unchecked
VTK_USE_QT checked
VTK_USE_QVT_QTOPENGL checked
I have also ran following command on the terminal
export MACOSX_DEPLOYMENT_TARGET=10.5
Every thing in my application compiles with both QtCreator and XCode but does not execute by giving the error as mentioned above.
In the above if i change everything from 10.5 to 10.6 everything start working. But according to requirement i need to have it compatible with 10.5.
Can someone please let me know is there anything else i need to do? Am i missing something here?
Regards,
Rashid

C++ Programming on a Mac

I have installed Xcode 4.0 (XCode Toolset, System Tools and Documentation components only), but have Netbeans with the C/C++ plugin. However when I try to create a new C++ project in Netbeans it tells me that no compiler was found on my system. The recommended course of action is to install Xcode, which I have done so.
How do I get Netbeans to recognize that I already have Xcode?
Most likely, you reinstall Xcode and this time don't uncheck the option that installs the compiler, etc. under /usr/bin for command line use. What's wrong with just having a full installation of Xcode?
If that doesn't work, it may be an incompatibility due to Xcode 4 installing to /Xcode4 instead of /Developer. You can fix that with a symlink or by installing Xcode 3.