I'm having trouble getting GLFW to work on my Xcode 8 and getting the demo from the website working in Xcode. I'm using c++ through the command line type project in Xcode and I imported the cocoa and OpenGL frameworks. Using MacPorts and using sudo port install glfw, I got the libglfw.3.2.dylib and imported that framework into my project. However it still cannot recognise
#include <GLFW/glfw3.h>
As for some reason, Xcode is unable to find the file. What am I doing wrong? My aim is to create a graphical standalone executable file from Xcode through c++.
You need to set search path in "Build Setting" to be where header file is, like for example: "/usr/local/include"
Related
I'm trying to embed the Mono runtime in a C++ application. I installed Mono using homebrew(I use mac), and now I'm trying to include & link it with CMake.
include_directories(/usr/local/Cellar/mono/6.12.0.122/include/mono-2.0/)
Including the headers with this line of CMake works fine, but linking with this line does not.
target_link_libraries(Alchem /usr/local/Cellar/mono/6.12.0.122/lib/)
What am I doing wrong?
Also, what is the right way of doing this? Hardcoding paths like this is not very platform independant, so what is the correct way of including Mono that works cross platform out of the box?
Edit: I've also tried this cmake findMono script, but it doesn't work with mac.
Hi i've been having alot of trouble trying to set these things up correctly on mac OSx.
Ive downloaded qt, downloaded Cmake and downloaded VTK with qt from the shell on mac.
However, im having some trouble with a test project and compiling the files in there.
VTK configuration of cmake
Could someone provide some assistance please?
I'm using Xcode 4.6.3 and SFML 2.1. I just installed SFML and created a project using the "SFML App" template, and I get 202 errors and 2 warnings when I try to run it.
The two warnings are:
"warning: The specified SDK “Current OS X” does not appear to have all of the necessary headers installed. Update your project to use a built-in SDK (“Latest OS X” is recommended) or install the system headers (included with the “Command Line Tools” package) from the “Downloads” pane in the Xcode preferences."
and
"-Wuninitialized is not supported without -O"
I get the error "No such file or directory" for the headers "String", "Foundation/Foundation.h", "Ostream", "Locale", "Cstdlib", "Algorithm", "Vector", "Set" and "Map".
When I installed SFML I first tried to run the install.sh script that is included with SFML. I couldn't get it to work because I didn't use sudo when running the script. I then tried to copy the files to where they should be manually. It said that some; or maybe it was all, of the files already existed, and asked if I wanted to replace them. I said yes. When I tried create a new project in Xcode, none of the SFML templates appeared. I then realized that install.sh might work if I use sudo when running the script. I was then able to create a project using the SFML template but got these errors and warnings.
Highlighting part of the official tutorial you have already read:
With recent versions of Xcode you also need to install the Command Line Tools from Xcode > Preferences > Downloads > Components.
Did you follow these instructions?
SFML and XCode
I am trying to port a C++ project to OS X. I am getting a file not found error from the compiler on this line:
#include <GL/glx.h>
To solve this problem, this question lead me to download xQuartz and run the installer. openGL glx.h missing form xcode 4 mac lion
Now what do I do? When I search the X11 folder I don't see a glx.h file
Does the project use a configure script? If so, there's a good chance it uses the AC_PATH_X or AC_PATH_XTRA macro. And then it will accept --x-includes=<dir> and --x-libraries=<dir> options. For Xquartz, try:
./configure --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib
If it doesn't use a configure script, you'll need to pass those paths to the compiler with -I and -L, respectively.
I am trying to set up a development environment to play around with developing Qt apps for Symbian devices. I have succesfully set up the environment and am able to create simple apps such as HelloWorld and get them to run on my device. I would now like to try using the QtMobility package, but I am struggling to get it to work in QtCreator.
I got some sample code for using the camera (initially I only had QtMobility 1.0.2, but I have now downloaded the 1.1.0 technology preview version). I followed the instructions in the help file to install it, here is what I did:
Extracted the zip file to C:\QtMobility
Opened a Qt Command prompt and ran configure (in the QtMobility directory)
Ran mingw32-make
Ran mingw32-make install
Finally I updated my PATH variable to include C:\QtMobility\lib
I went back to QtCreator (restarted it) and looked at the cpp file that first calls the macro QTM_USE_NAMESPACE but it is still underlined in red, because it can't find the qmobilityglobal.h file.
Does anyone know if I have missed anything out during the installation that will tell the QtCreator where to find the QtMobility header files?
mingw32-make suggests you're building for win32-mingw target environment. To work with Symbian SDKs, you should be building for e.g. symbian-abld instead. The configure.bat script will auto-detect the target you are building for. Just make sure that QT_PATH environment variable points to a location where you have a Symbian build of the Qt toolchain.
(Also note that make install is unnecessary with symbian-abld - the build step already puts everything in place in Symbian SDK directories.)