Using a dylib in xcode - xcode

So, I'm trying to add this library in an xcode project.
http://nuclear.mutantstargoat.com/sw/libdrawtext/
I used homebrew to install the library. It's now in /usr/local/Cellar/libdrawtext/
But, even after adding the dylib that is created in /usr/local/Cellar/libdrawtext/0.1/
I checked, and there's even an alias in the usr/local/bin folder.
But for the life of me, I can't seem to be able to include "drawtext.h" in my project.
The sample code here has no indication of how to do this.
Ideas, anyone?

Fixed it. Not sure exactly how, but I followed this tutorial http://mac-dev-env.patrickbougie.com/freetype/
After adding libdrawtext(from the homebrew installation), I also added the source of the library to my project. Works like a charm, though this is a VERY dirty solution.
I'll wait 24 hours, and if there're any better answers, I'll mark them correct.

Related

How to create distribution of Python GTK3 app?

I made an application using GTK3 on Windows (Mingw_x64 installation of GTK) and I cannot really figure out how to make a distribution out of this. According to official documentation of PyGObject, it is possible in some way.
I already tried to make a package using setuptools, but PyGObject documentation is not saying much about this process and I was not able to configure setup correctly to make it work. PyGObject has a lot of dependecies and weird imports, that I do not know how to include.
I also tried Pyinstaller, which claims it has GTK support, and it really can pack it into executable, however it is not working. I tried these two options:
make only one file (.exe), but in this situations, it throws an error, that some file is not found (libpixbufloader-ani.dll)
create a directory with all needed files (libpixbufloader-ani.dll and other libs are included this time), but when running exe, another exeption occurs, this time Struct and 2 other libraries are missing (strangely, there is a folder that contains Struct)
Becouse of the missing files, I tried adding as many paths containing needed libraries as possible to Pyinstaller, but without success.
Does anyone have any experience with packaging GTK appliciations in Python? There is definitely a way to do this, but I am not very experienced with packaging. If needed, I can provide more information.
This is an issue that has been brought up on PyInstaller's GitHub page, as others (including myself) have experienced the same issue that you've mentioned.
The last time I tried the dev version of PyInstaller, the issue still wasn't fixed, but I managed to get a working executable by using PyInstaller to find the dependencies that my Python3/GTK3 app needed, and then I used cx_Freeze to generate the final executable.

How to connect Visualization Toolkit (VTK) libraries to OS X project in Xcode

I am trying to write a simple application trying to get my feet wet with VTK. Here is where I am so far. After searching for a while and attempting to download and build with CMAKE unsuccessfully, I found this blog from KitWare: https://blog.kitware.com/kitware-packages-on-os-x-with-homebrew/
So, I went off, installed homebrew, I believe "installed" VTK and Insight ToolKit. This was followed by self high-fives and all around self-congratulations. But.. I'm still not where I need to be.
I can't seem to sort out where to go from here. I believe I'm at the critical "now link the libraries with your project" state. I can find the installs under "/usr/local/cellar/Vtk/7.0.0_5/include/" and "/usr/local/cellar/Vtk/7.0.0_5/lib/" folders. The "include" folder has a bunch of ".h" files. The "lib" folder has a bunch of ".dylib" files. In a Xcode (V8.1) CoCoa Project, I've linked iokit, cocoa, and openGL frameworks and it builds. However, when I try to include something like "vtkActor.h", it fails to find it unless I specifically link that file.
Updated! Screen shot of search paths:
So, my questions are thus:
Am I actually done installing? I thought I was to end up with some ".a" files. Whats up with that?
If I am done, and I'm linked to all those .dylib files, why isn't it working? Should I link to all the ".h" files?
I've tried linking the folder "usr/local/cellar/vtk" folder, but it fails. Should I be doing that, but making it "recursive" I believe is the word.
Long run for a short slide... Anyone have any good tutorials/examples of a running Xcode OS X project so that I can get an idea how these libraries actually interact once I can even get them linked?
Thanks so much for your wisdom in advance. If anyone would have the kindness for mentorship off-stack until I can get up and running, I'd much appreciate it.

Installing caffe brings up some questions, depending libraries and versions

I wanted to install caffe on openSuse.
Just for the record - it worked out for me, I just don't know what's the "exact" way to do this. The things I did maybe aren't really for someone who's new to this, and also it was kind of a "bad installation". My way was the following:
First, I did
make all
This worked, until it complained that some libraries weren't found (libclbas etc.). So I used
ccmake .
to change the paths to the libraries manually. I needed to manually type the paths to the snappy, boost_python, blas, cblas and lapack libs. After doing that I did
cmake .
and then
make
and everything worked. My problem now is - why doesn't make find the libs, and is there a way to fix this? I think the problem was that I didn't have /usr/lib/libcblas.so but /usr/lib/libcblas.so.3, and similar "problems" with the other libraries.
Another thing - when I tried using ccmake/cmake right from the beginning (without the make part first), there weren't any files in my build directory (like $CAFFE_ROOT/build/examples or $CAFFE_ROOT/build/tools were empty), so the mnist tutorial for example wasn't working. That's why I first called
make all
, what may seem strange to you.
Of course I know how to fix this stuff, but I would like to know how the correct way for a "clean and simple installation" is. Did is miss anything when using make/cmake, is this some kind of inconsistency in caffe or something else? And, what is the clean way to do this?
Maybe look at the Ubuntu installation guide? http://caffe.berkeleyvision.org/install_apt.html
It mentions all the different packages you might need. I couldn't find openSuse installation instructions - but you should be able to translate the apt-get commands for your platform.

How do I get MailCore to work correctly?

I'm trying to build MailCore into my app but I keep getting
"_OBJC_CLASS_$_CTCoreAccount", referenced from:
That is the only error I'm getting and CTCoreAccount is in the project.
In order to use mail core framework, visit the link follow step by step process and you are done.
I have an answer. It is not "The Answer" but I have an answer and it worked.
Eidt: For this: After a slew of issues, I've realized that "this" particular fix is that you need to add libmailcore.a to the frameworks. It keeeps getting deleted by XCode, or you may ahve added the MailCore Framework instead.
Started a fresh project, erased everything by removing application files to trash, then deleting references. "Added" via group (unsure if it matters) all my folers/files from the project I was trying to.
Had to tell it where the pch and Info.plist were, (essentially pointing it to my old project). Re-added all frameworks, and voila, it compiled.
I'm suspecting XCode 4.5 has different framework settings as far as library paths and valid flags for linker, etc. But nothing I tried regarding that fixed it. I would love to do this more direclty, old project is on 4.3, and won't be upgrading it if this is happening. Anyway, up and running, hope others are soon too. Would like real answer myself

Can't make Ada work with Xcode 3.2

I've been looking around the web for an hour and I'm just giving up to ask it here...
I've got to work under Ada. I managed to make gnat work as a command line to compile my files.
But I want to be able to have proper projects in Xcode. My problem is that I've found some templates on the to make ada default templates, I've copy pasted them a bit everywhere (/library/developer/ application support etc) but they never appear in the list when I want to create a project.
My other problem is that when I create an empty project and add a .adb file to it I can't compile at all... How do I specify that I should use gnat with it?
I'm sorry for all these questions if they are stupid but I can't find the answer...
Two alternatives that may be of interest: the Ada plugin modules for NetBeans and the Ada 05 Language Module for BBEdit 9.x and TextWrangler 2.x .
FWIW, templates live in /Developer/Library/Xcode in Xcode 3.1.4.
If you are using the XCode Ada Plugin from here, it looks like it was made to work with Xcode 3.0. You might try downgrading to that and see if you have any better luck.
Personally, my IDE of choice is Emacs, so I can't go into any real detail about XCode past that. I'd suggest talking to the MacAda mailing list if you don't get a good answer here.

Resources