How can i use libshout library for os x project in XCode - objective-c

there is library called libshout which provides functionality for connecting to icecast server. Could anyone tell how to include it to xcode project for os x application? Or how to compile it and include to the project.
Thank you for any help.

The answer is, that it is possible to install libshout by homebrew for example, then it will be in /usr/local/Cellar/ along with other libraries it needs: libogg, libvorbis, speex, theora. Then you can add all those libraries to xcode project (.h and .a fies or all files..) with libshout, then just include shout.h header to you source file and you can use it.

Related

how to use sqlite3 in Xcode 5.1.1?

how can I utilise the sqlite3.h from sqlite.org in my programs written in xCode 5.1.1?
One of the ways I was thinking was to download the precompiled binaries for Max OSX, http://www.sqlite.org, and then link them somehow to my files in my xCode-project.
How can I link these binaries to my project or xCode so that I can call upon the different sqlite3-functions?
Any help is much appreciated. I have OSX version 10.9.4.
The recommended way to use SQLite is to compile it statically into your program, i.e., just add the sqlite3.c file to your other source files.

Linker error for imported header file Xcode 4.5

I have downloaded a header file and static library file (.a file) from the internet. They are provided by the wireless printer which i bought for my iphone and trying to make print functionality working in my app. The problem is when I run the sample app provided by them to test printer, I get the following linker error...Obviously the app was designed in the previous versions of Xcode and Im using Xcode 4.5. Much appreciated if someone could Guide me..
If you are building an iOS project and it's using the i386 architecture, then you must be building for the simulator. What happens when you build for an actual iOS device?
It's possible that the library was compiled only for the processor architectures for real iOS devices, typically armv6, armv7, or armv7s. You can use the file command in Terminal to see what architectures are in the .a library file.
Check these answers Symbols not found for architecture i386? and symbols not found.
Check your project-> build phases -> Link Binary With Libraries whether there is libwspr240.a file is there or not.
Remove libwspr240.a file and then readd it using
Project --> Build Phases --> Link Binary with Libraries click '+' button to add.
Then Clean and Build the project

Xcode: how to build a static library project correctly?

This question will be easy for Xcode pros but for a MonoTouch developer it seems to be impossible to resolve. :-)
I'm using Xcode 4.5 and I want to target iOS 5.1 and above and iOS Simulator 5.1 and above.
I have a a library project here and it is coming with a prebuilt binary named "DemoLib" (no extension and it is 11MB in size). The library is a fat lib for Simulator and iOS 5.1+.
I can use that library without any problem.
However if I try to build the library myself, I end up with a "DemoLib.a" file (notice the extension and the size of 30MB). How can I get the same build result? What is a .a file compared to the file without extension?
I tried to build the project "for running", and "for archiving" in Xcode. Both results in the same 30MB .a file.
I was expecting some dropdown in Xcode where one could select "DEBUG" or "RELEASE" build and the latter one would create the smaller lib.
Of course I could never tell without seeing the framework's project file. Having said that, there is an excellent guide to creating and compiling iOS frameworks here: https://github.com/jverkoey/iOS-Framework
Using the above guide, you should be able to recreate your framework's project from scratch, add the files you have to it, and properly compile it.
Hope this helps! :)
Did it come with a Makefile? Create a new target, set the build settings of the target to what's in the Makefile, then set your project to depend on that new target.
A file with the .a is a static library, which means it depends on nothing external and all the code it needs is compiled inside it. I think no extension generally implies dynamic library, which means it'll depend on some dependencies being present on your system to link against. Maybe that's why the .a is so much bigger. I think Xcode will build static by default because iOS does not allow the use of dynamic libraries.
The dropdown for what to build is in your scheme. Command+shift+< to view your scheme. Within the scheme you can edit which environment each method of building will use.

How can I set up a Windows build in Xcode with Cocotron?

I have Cocotron set up, I have compiled the Foundation for Windows, and I have set up a project that uses that Foundation. I can't compile the project for Windows though, nor have I been able to find a guide to do so. Does anybody have any ideas to do this?
Start with a working Mac project. Duplicate the Mac target and change its name to Windows, and change the build settings as described here: http://www.cocotron.org/Tools/Build_Settings/?path=Tools/Build_Settings
It's actually shockingly easy. Note that if you use the script at Cocotron/1.0/bin/retargetBundle, you don't even need to figure out how to install the Foundation DLL.
Make sure you add Cocotron's Foundation.framework to your project: Cocoa.framework doesn't actually include Foundation and AppKit properly like it does on OS X.

How do I use a new framework I have built?

I have had some issues with the AWS IOS SDK framekit, since it was not built to work with OSX apps. I found a modified version of the SDK that Brad Larson created.
The directory structure looks something like:
AWSiOSSDK.framework/
src/
--Amazon.Runtime/
--Amazon.S3/
..
--AWSCocoa/
----AWSCocoa_Prefix.pch
----AWSCocoa.xcodeproj
----etc
--include/
So if I go into the xcode project, and build AWSCocoa it compiles. But when I look at the timestamp on the AWSiOSSDK.framework, it hasn't changed. So I don't know what compiling this AWSCocoa gets me, or where I can find the files it creates. So assuming that building AWSCocoa.xcodeproj is supposed to build a new version of the framework compatible with OSX development, where do I find and link what I've built?
The AWSiOSSDK.framework bundle is a precompiled framework, probably left over from my earlier experiments in making a Mac version of this (since you can't use frameworks like this with iOS, only static libraries). Ignore that.
If you are using Xcode 4, your built framework will be created somewhere in your ~/Library/Developer/Xcode/DerivedData/ directory. To find where it lies, go to your project navigator in Xcode 4, expand the Products group, right click on AWSCocoa.framework, and select Show in Finder. This is no different from any other third-party framework you would compile.
Nominally, you'll want to add this framework as a target dependency in your application so that it is built alongside that. You'll also have to make sure that the framework is copied into the appropriate location within your application bundle so that it can be used by your application at runtime.