Hi I'm wondering how to build the LIVE555 library in a new directory. My current method involves manually deleting the .o and configuration files, and I don't think thats very effective or smart.
Currently my workflow is:
./genMakeFiles iphoneos
make
But it builds it all in the same directory and it's so messy, can someone shine some light on an attribute I can change in configuration that will build the binaries and header files in a clean directory?
Thank you!
If you want to have 'clean' output with only libs and includes, then you have to modify build script. I'm not very good in writing scripts, but anyway - you may refer to this post and download already built libs with includes(link to zip in the last comment). The libs are fat, so they contains i386, x86_64, armv7, armv7s and arm64.
For adding everything into the Xcode project you have to specify OTHER_LDFLAGS:
"$(SRCROOT)/<path to live555>/UsageEnvironment/libUsageEnvironment.a"
"$(SRCROOT)/<path to live555>/liveMedia/libliveMedia.a"
"$(SRCROOT)/<path to live555>/groupsock/libgroupsock.a"
"$(SRCROOT)/<path to live555>/BasicUsageEnvironment/libBasicUsageEnvironment.a"
and HEADER_SEARCH_PATH:
"$(SRCROOT)/<path to live555>/UsageEnvironment/include"
"$(SRCROOT)/<path to live555>/liveMedia/include"
"$(SRCROOT)/<path to live555>/groupsock/include"
"$(SRCROOT)/<path to live555>/BasicUsageEnvironment/include"
And that is all. I hope it helps.
You could choose where to install include, libraries and executable setting the PREFIX variable (like the -prefix option of configure) like this :
make install PREFIX=<install root>
In order to remove *.o, *.a and executable just use :
make clean
Related
I want to implement Platinum UPnP for my iPhone Project, but the SDK does not really provide the proper documentation to help.
I tried to follow the below line as per read me file -
MacOSX, iOS:
Open the XCode project file located # Platinum/Build/Targets/universal-apple-macosx/Platinum.xcodeproj
To include Platinum to your XCode projects, simply add the project file then add Platinum as a Target Dependency as well as libPlatinum.lib in Link Binaries.
Alternatively, you can build the Platinum.Framework using the PlatinumFramework target and add it to your project.
But ended up with this error:
clang: error: no such file or directory:
'/Users/ankit.nigam/Library/Developer/Xcode/DerivedData/PlatinumDemo-gahtotovpnfcvyddmpiwgntarctu/Build/Products/Debug-iphoneos/Platinum/Platinum'
Any idea what I'm doing wrong?
I figured it out what was the problem with the - I was to add the Platinum.framework to link binary and add the framework to header search path.
first u must build a release version Platinum.frmework(i386,86,64,armv7),must release version.
and then.pull it and Neptune.frmework in your project.
at last, this is a C++ framework, so you must change .m to .mm where you use is in your file.
I installed the Ogre3D iPhone SDK and tried to compile the sample project in XCode4. I ran into "lexical or preprocessor issue" which many people have been experiencing in XCode4. In my case, XCode was not able to fine "OgreCamera.h".
I managed to solve this problem by creating an "Indexing" group folder in my project and dragging the header files into it as suggested in this thread:
Compile, Build or Archive problems with Xcode 4 (and dependencies)
However, I ran into the same issue again in a different form. There are no more errors about "OgreCamera.h", but now I'm getting "'boost/thread/tss.hpp' file not found". I've dragged the boost folder and the individual boost header files into the Indexing group, to no effect.
All my include paths are configured correctly, XCode should be able to find these files based on my build settings.
I don't know what to do. I've searched for solutions to this and failed to find any. My best guess is that the contents of the Indexing group need to be a flat hierarchy with no sub folders, but Ogre references the boost headers files using a file path: "boost/thread/tss.hpp", and this causes problems for some reason. But I don't know how to go about fixing it.
Does anyone have any suggestions?
Thank you.
I had the same problem. I was copying boost into the root of the OgreSDK and then adding the following to my header search paths
$(SRCROOT)/boost
You'll notice the file being included is "boost/thread/tss.hpp". So using the above header search path it would be looking for $(SRCROOT)/boost/boost/thread/tss.hpp.
Assuming you have $SRCROOT/include in your header search paths - the solution is just to move the boost folder to your include directory.
PS... if you don't have a boost folder you'll need to download boost and copy it in there.
Has anyone had success using xcode 4 as an IDE for AVR microcontrollers? Is it possible to have the same amount of integration as the plugin for eclipse?
Yes. I use Xcode 4 as IDE when writing AVR code.
But it only works as a "wrapper" for the avc-gcc command line tools. I have three Xcode targets in the project: build ("make all": compile only), fuse ("make fuse": program fuses) and flash ("make flash": compile and download to AVR). Just select the appropriate target and hit Cmd-B to build.
There is not much integration. I still have to edit the Makefile to set clock frequency, programmer and device model and fuse values. And if I add more .c files I also have to add the corresponding .o file to the Makefile. But at least I can do it from within Xcode.
I have created a minimal project template that will allow you to create a new AVR project in Xcode. Get the file here http://dl.dropbox.com/u/1194636/AVR_Xcode4_template.zip. Extract the archive and put the Atmel AVR® folder into ~/Library/Developer/Xcode/Templates (you might need to create the Templates folder).
Template from second answer (http://dl.dropbox.com/u/1194636/AVR_Xcode4_template.zip) works fine but with some tweaks.. You have to put these in file "makefile" in the template to be able to include multiple files in the project:
OBJECTS = main.o $(OBJ)
SRC = mynewfile.c
OBJDIR = .
OBJ = $(SRC:%.c=$(OBJDIR)/%.o)
LST = $(SRC:%.c=$(OBJDIR)/%.lst)
in SRC section you need to enter all files that are built in the project (for example mynewfile.c).
One more enhancement is to clear all the obj files from the project, after the linking ... Find the section main.hex in makefile and change rm -f line with following
rm -f main.hex $(OBJ) $(LST) main.o
Other then that, everything stays the same. What i couldnt find out is how i can enable code complete for this template. If anyone knows i would appreciate the help.
I'm trying to get MGTwitterEngine to work for the iPhone SDK. I've followed the read me below and now I keep getting the following errors:
TCDownload.h: No such file or directory
yajl_parse.h: No such file or directory
Now, I've done a search on my system and don't have either one of them. So am I missing something? Also, I've downloaded the MGTwitterEngine code within the last couple days from gitub.
READ ME
Add libxml2.dylib in Other Frameworks. You'll find the library in:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/lib/libxml2.dylib
Add "$SDKROOT/usr/include/libxml2" as a Header Search Path in your Project Settings.
Although I've never used MGTwitterEngine, that error basically says that you are missing yajl library.
You can install it manually by doing (I assume you install to default /usr/local location):
git clone git://github.com/lloyd/yajl
cd yajl
./configure
sudo make install
Then in your xcode project:
Add libyajl.dylib or libyajl_s.a (dynamic/static - whichever you prefer, either should be located in /usr/local/lib/) to 'external frameworks and libraries' in your project tree. In project settings add "/usr/local/include/yajl/" and (possibly) "/usr/local/include/" to Header Search Paths (in Search Paths section).
After that it should build.
On mac, you can use port (See how to install here)
After install simply type in terminal :
sudo port install yajl
And like ttvd say before:
In your xcode project:
Add libyajl.dylib or libyajl_s.a (dynamic/static - whichever you prefer, either should be located in /usr/local/lib/) to 'external frameworks and libraries' in your project tree. In project settings add "/usr/local/include/yajl/" and (possibly) "/usr/local/include/" to Header Search Paths (in Search Paths section).
This works if you don't care about YAJL:
"Guys – the yajl/yajl_parse.h error is confusing and the reason the demo works is that the files that need yajl are excluded from building, even though they’re in the project. To fix in your own project go into the MGTwitter folder via xcode and select each .m file with the term yajl in it (there should be 6), right-click -> Get Info -> Targets tab and uncheck the box next to your app name. HTH, Jon"
One of the comments on http://aralbalkan.com/3133
I am just going to add something because I think it is important and I usually hacked around it in the past.
---->>
The header search paths are defined in project settings but are over-ridden in the target settings so if you are having problems including certain files check the header search paths that are set in your target settings. If they are bold then they are being used and overriding the default settings for the project.
dl and install this: http://cmake.org
before
git clone git://github.com/lloyd/yajl
cd yajl
./configure
sudo make install
then add the dylibs and you should be ok!
The motivation for this question is me trying to get LDAP functions to work with an iPhone application which is a project I'm attempting for part of my dissertation.
When I was developing the application I used the ldap.framework framework that is part of Mac OS X. This works fine in the simulator, but when I try to now get the app on a device it tells me that I'm not allowed to use this framework.
After some research I found that I could build openldap using the arm architecture and add the static library to my application destined for my device.
I eventually managed to compile configure and build openldap by setting variables as mentioned here and using the following commands...
Ade$ ./configure CC=$DEVROOT/usr/bin/arm-apple-darwin9-gcc-4.0.1 \
LD=$DEVROOT/usr/bin/ld --host=arm-apple-darwin --with-yielding_select=yes
Ade$ make depend
Ade$ make
I was told that the file I'm looking for will have an extension of '.a' so I searched for a '.a' file that mentions ldap...
Ade$ sudo find / -name *ldap*.a
Password:
/Users/Ade/Desktop/openldap-2.4.16/libraries/libldap/.libs/libldap.a
/Users/Ade/Desktop/openldap-2.4.16/libraries/libldap_r/.libs/libldap_r.a
So I assume these are the files I need?
My question is what do I do next? I know I need to add the library to the Xcode project and probably add a load of '.h' files too?
If anyone can give me a pointer to documentation or shed any light on the next stage I would be really grateful.
Many thanks,
Ade
ps. I have also talked about this process on my blog at www.greenpasta.com.
I've done this same thing to build an LDAP client for the iPhoneOS 2.2. You just to drag the .a into the "link with libraries" build stage. I recommend using the regular (non _r) version of the library, unless you specifically need reentrancy on your ldap stuff (which I don't recommend). You can also add the .h's to your project, which is generally the easiest way to access them.
Simply drag the .a files into the Xcode project and choose "copy files into project". I'm not familiar with OpenLDAP but I think the _r version is just a threadsafe version. I would recommend using that and not copying the other. You should probably not copy both files into Xcode or you will get link errors.
Then do the same for the .h files that define the client APIs of OpenLDAP - again I'm not sure which these are but I'm sure you can find out easily.
I would advise organising the .a and .h files together in a Xcode group under resources.
Include the header files in your source and you should be good to go.
You may also need to add -lldap to your linker command (in the build settings pane).