i'm building https://github.com/dev2dev/OpenSceneGraph-port-to-IOS , it depends on freetype ,so we need " #include " in some files.
I always get the build error : 'ft2build.h' not found.
have tried https://stackoverflow.com/a/2109083 ,but didnt work for me.
Have you installed the freetype package? If not, and you have MacPorts, you can install with sudo port install freetype. ft2build.h will then be located at /opt/local/include/ft2build.h.
You will need to follow the instructions on the StackOverflow question you mentioned on how to add /opt/local/include to the User Header Search Paths in Xcode.
Related
I currently have a CMake file that finds and links a library (NCurses) to another library
...
set(CURSES_NEED_NCURSES TRUE)
find_package(Curses REQUIRED)
include_directories(${CURSES_INCLUDE_DIR})
add_library(myLibrary STATIC ${sources})
target_link_libraries(myLibrary ${CURSES_LIBRARIES})
target_compile_options(myLibrary PUBLIC -std=c++20 -Wall -Wconversion)
...
This works fine, however unfortunately it is pulling up a different version than I need (5.7 instead of 6.1)
#include <ncurses.h>
#include <iostream>
int main()
{
std::cout << "VERSION: " << NCURSES_VERSION;
}
outputs: VERSION: 5.7
I do have the desired package installed under: /usr/local/ncurses/6_1.
But the logs seem to say it is pulling it from a different location: Found Curses: /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/libncurses.tbd
How can I specify which of these I want to use?
Okay I have figured this out, to anyone else who might come across this.
First I installed the latest version of ncurses (6.3) from here: https://invisible-island.net/ncurses/#downloads-h2
(I downloaded the gzipped tar)
I then went through and deleted all references in my usr/local i could find to ncurses.
I then extracted the tar, and entered the new directory.
I ran just plain ./configure inside the directory (with no flags).
After that finished, I ran make
Then I ran make install, after removing symlinks to stop collisions, make install was able to run properly.
Ensure that the CMake variable CURSES_NEED_NCURSES is set to TRUE before finding the package:
set(CURSES_NEED_NCURSES TRUE)
find_package(Curses REQUIRED)
and it will work perfectly :)
I have downloaded SDL2.frameworks from https://www.libsdl.org and installed it into /Libraries/Frameworks/. Then I have pointed xcode a path of frameworks and headers in 'Build Settings', in 'General' 'Frameworks and Libraries' pointed at framework file libSDL2-2.0.0.dylib . The I type #include <SDL2/SDL.h> and try to build the project. It shows 150+ warnings, but if I try to Run the program it says that Library not loaded. Why? what is the problem? I'm using Big Sur OS
I have figured it out.
I have installed homebrew from https://brew.sh
I typed in terminal brew install sdl2
Then I have showed the path of framework (in xCode select project file >> build settings >> header search paths) and using cmd+shift+g type /usr/local/include
In General Frameworks & Libraries put libSDL2-2.0.0.dylib (its here
/usr/local/Cellar/sdl2/2.0.14_1/lib)
And most important I have checked Disable Library Validations in Signing & Capabilities
After these steps code started to work for me
You need to codesign the Framework.(The command by the Lazy Foo may be not right).
Find out one's own signature:
security find-identity
Sign the frameworks:
codesign -f -s "XXXX Your signature" SDL2.framework
Don't forget to sign the another hidapi.framework within the ./Versions/A/Frameworks.
You can verify the signature:
codesign -display --verbose=4 SDL2.framework
I want to use boost graph library in one of the LLVM passes I am working on. Boost graph library is header only. So usually I can use it as -I<path to boost source>. My question is how to use it inside LLVM source tree (inside lib/Transforms/MyPass).
I tried the following.
First I tired adding include directory to my pass's CMakeLists.txt like so,
target_include_directories(LLVMMyPass "<path to boost headers>")
Next I tried to change the CPP_FLAGS,
set(CPP_FLAGS "${CPP_FLAGS} -I<path to boost headers> ")
Both didn't work. I keep getting the error.
fatal error: boost/graph/graph_traits.hpp: No such file or directory
#include "boost/graph/graph_traits.hpp"
Update : I tried using -DCMAKE_CXX_FLAGS=-I<path to boost> in cmake command. That also did not help.
system-wide installation of boost solved the problem
sudo apt-get install libboost-all-dev
first of all I am a beginner with c++, my question is how to use e57 library ( that I got from the official Website ), I have tried almost every tutorial, and I have got different problems, i have tried to install boost, Xerces Eigen ... and Im confused because i dont know how to build them, what changes I must do in my Path variable ..., I really need some help,
I will appreciate any kind of help and advice,
my OS : Windows 10
E57 library : C:\dev\E57RefImpl-1.1.312
contains :
bin
built
CHANGES.TXT
E57RefImpl-doc-0.2.60
E57RefImplConfig.cmake
include
lib
README.TXT
..................
Directory of C:\dev\xerces-c-3.1.1-x86_64-windows-vc-10.0
bin
doc
include
INSTALL
lib
LICENSE
NOTICE
README
samples
Did anybody got the luck to know the reason for:
"Project ERROR: Package Qt5GStreamerQuick-1.0 not found".
I have installed: qt-gstreamer-dev package
Not working even after manually adding PKG_CONFIG_LIBDIR:
export PKG_CONFIG_LIBDIR=/home/manojsahu/qt-gstreamer-1.2.0/src/QGst/QtGStreamer-1.0.pc.in
I have also added PKGCONFIG alternatively in .pro file like:
PKGCONFIG += Qt5GStreamerQuick-1.0
PKGCONFIG += QtGStreamer-1.0
Can anybody help to resolve this error.
I am trying to compile example in below mentioned link:
https://github.com/detrout/qt-gstreamer/tree/master/examples/qmlplayer
Thanks, I have got one work around to solve "Project ERROR: Package Qt5GStreamerQuick-1.0 not found".
"Qt5GStreamerQuick-1.0" has dependency with "gstreamer-1".
Download "gstreamer-1.6.3" and perform
make then
make install.
Download the qt-gstreamer code, extract freshly and navigate to extracted folder. In my case it is
cd ~/home/manojsahu/qt-gstreamer-1.2.0/
cmake CMakeLists.txt then
make then
sudo make install
Image of the qmlplayer built
Now the example qmlplayer gets built.
But facing error "Failed to create qtvideosink. Make sure it is installed correctly".
Perhaps It did not installed properly. Any workaround to build completely would be appreciated highly.