need help with xcode

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

need help with xcode

Jim Newton
Are any of the musescore developers using Xcode on the Mac?  I'd like to get some help as I'm pretty new to lots of things at the same time.  If one of the developers who knows something about the Mac development environment can help me it would be really great.  Thanks in advance.

As an experiment to try to understand how to use Xcode before attempting any edits on the musescore code base, i'm trying to compile a pretty simple c++ program which uses the boost library.  I'm not even sure whether or not musescore uses it and I don't care yet.

I've installed boost (at least I think I have),  installation log is below, but I can't make the compiler find the include files.  How do I figure out where port installed the boost include files or whether it did at all?

Here is the install log.

bash-3.2$ sudo port install boost
Password:
Sorry, try again.
Password:
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
--->  Computing dependencies for boost
--->  Dependencies to be installed: icu
--->  Fetching archive for icu
--->  Attempting to fetch icu-54.1_0.darwin_14.x86_64.tbz2 from http://lil.fr.packages.macports.org/icu
--->  Attempting to fetch icu-54.1_0.darwin_14.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/icu
--->  Installing icu @54.1_0
--->  Activating icu @54.1_0
--->  Cleaning icu
--->  Fetching archive for boost
--->  Attempting to fetch boost-1.56.0_2+no_single+no_static+python27.darwin_14.x86_64.tbz2 from http://lil.fr.packages.macports.org/boost
--->  Attempting to fetch boost-1.56.0_2+no_single+no_static+python27.darwin_14.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/boost
--->  Installing boost @1.56.0_2+no_single+no_static+python27
--->  Activating boost @1.56.0_2+no_single+no_static+python27
--->  Cleaning boost
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.
Reply | Threaded
Open this post in threaded view
|

Re: need help with xcode

Leon Vinken
Hi Jim,

I switched from Linux to Mac about two years ago. Currently using Xcode 4.6.3 on OS X 10.7.5.

Having skipped the "try something small with Xcode" step, I cannot help you with that. I jumped straight into MuseScore, which I knew very well after developing the MusicXML import/export code since about MuseScore 0.5.

Simply following the instructions in the MuseScore developers handbook was sufficient to be able to build MuseScore. Note that I use MacPorts. See http://musescore.org/en/developers-handbook/compilation/compile-instructions-mac-os-x-git.

Feel free to ask specific questions about building MuseScore on Mac and I will try to help you.

Regards, Leon.
Reply | Threaded
Open this post in threaded view
|

Re: need help with xcode

Jim Newton
Hi Leon, thanks for offering to help with Xcode.

I found the boost include directory.  In fact it is /opt/local/include.  There is a boost subdirectory which contains filesystem.hpp.

However, when I compile with Xcode, it fails on the line
#include <boost/filesystem.hpp>

I don't see /opt/local/include anywhere in the command line of clang.
I've tried adding /opt/local/include to the header search paths, and also to the user search path.

Can you help?


Analyze test1/main.cpp
    cd /Users/jimka/Desktop/test3/test1
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu++11 -stdlib=libc++ -fmodules -fmodules-cache-path=/Users/jimka/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.10 -g -fvisibility-inlines-hidden -Wno-sign-conversion -D__clang_analyzer__ -Xclang -analyzer-output=plist-multi-file -Xclang -analyzer-config -Xclang path-diagnostics-alternate=true -Xclang -analyzer-config -Xclang report-in-main-source-file=true -Xclang -analyzer-checker -Xclang security.insecureAPI.UncheckedReturn -Xclang -analyzer-checker -Xclang security.insecureAPI.getpw -Xclang -analyzer-checker -Xclang security.insecureAPI.gets -Xclang -analyzer-checker -Xclang security.insecureAPI.mkstemp -Xclang -analyzer-checker -Xclang security.insecureAPI.mktemp -Xclang -analyzer-disable-checker -Xclang security.insecureAPI.rand -Xclang -analyzer-disable-checker -Xclang security.insecureAPI.strcpy -Xclang -analyzer-checker -Xclang security.insecureAPI.vfork -iquote /Users/jimka/Library/Developer/Xcode/DerivedData/test1-bilnzxakeyoiwoebtvdqixoswgct/Build/Intermediates/test1.build/Debug/test1.build/test1-generated-files.hmap -I/Users/jimka/Library/Developer/Xcode/DerivedData/test1-bilnzxakeyoiwoebtvdqixoswgct/Build/Intermediates/test1.build/Debug/test1.build/test1-own-target-headers.hmap -I/Users/jimka/Library/Developer/Xcode/DerivedData/test1-bilnzxakeyoiwoebtvdqixoswgct/Build/Intermediates/test1.build/Debug/test1.build/test1-all-target-headers.hmap -iquote /Users/jimka/Library/Developer/Xcode/DerivedData/test1-bilnzxakeyoiwoebtvdqixoswgct/Build/Intermediates/test1.build/Debug/test1.build/test1-project-headers.hmap -I/Users/jimka/Library/Developer/Xcode/DerivedData/test1-bilnzxakeyoiwoebtvdqixoswgct/Build/Products/Debug/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/jimka/Library/Developer/Xcode/DerivedData/test1-bilnzxakeyoiwoebtvdqixoswgct/Build/Intermediates/test1.build/Debug/test1.build/DerivedSources/x86_64 -I/Users/jimka/Library/Developer/Xcode/DerivedData/test1-bilnzxakeyoiwoebtvdqixoswgct/Build/Intermediates/test1.build/Debug/test1.build/DerivedSources -F/Users/jimka/Library/Developer/Xcode/DerivedData/test1-bilnzxakeyoiwoebtvdqixoswgct/Build/Products/Debug --analyze /Users/jimka/Desktop/test3/test1/test1/main.cpp -o /Users/jimka/Library/Developer/Xcode/DerivedData/test1-bilnzxakeyoiwoebtvdqixoswgct/Build/Intermediates/test1.build/Debug/test1.build/StaticAnalyzer/test1/test1/normal/x86_64/main.plist

/Users/jimka/Desktop/test3/test1/test1/main.cpp:9:10: fatal error: 'boost/filesystem.hpp' file not found
#include <boost/filesystem.hpp>
         ^
1 error generated.
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

ABL
Reply | Threaded
Open this post in threaded view
|

Re: need help with xcode

ABL
Are you compiling from inside XCode?
Have you tried to set custom C flags (see here, for example: http://stackoverflow.com/questions/14134064/how-to-set-include-path-in-xcode-project )?

Ciao,
ABL