how to create a dylib on mac - macos

I created a dll in Windows. Now i wanted to created something similar on mac/iPhone. I figured out, we can bundle a dylib with the app and that will be the best way to do it.
Firstly, is this the right approach?
Secondly, I'm trying to figure out how to create a dylib and use it in my app/xproj. Could someone please point me to any tutorial or if this query is already answered, please point me to it.
Thank you,
Vinu.

Related

Add dll´s from .nupkg to Unity Project without using nuget

I am trying to use Microsoft´s WorldLockingTools (repo see here) in my Unity Mixed Reality project. Therefore I need to add the Frozen World Engine DLL to my Unity Project. In Microsoft´s Documentation they describe to do this via nuget. I want to add the dependencies manually like described in this thread, since for me it´s not possible to use nuget (I have no network-access on that computer). I was able to extract the .dll, but if I add it to my project as described in that thread, unity still can´t find the dll. Do I need to do some further steps than just adding the dll to my Asset-Folder? If yes, can you please tell me which steps they are? I would be really thankful for that!
Best regards!
OK I figured out the reason behind this misbehavior. The problem is, that there is a c#-Script within the nuget-package additional to the dlls which has to be placed within the WorldLocking.Engine folder. After that all Exceptions disappeared and it seems to work now! I Hope I could help anybody who comes across this Question.

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.

Lost code but I have xcarchive how do I extract my code from it

My mac crashed, lost all my code but I have an old xcarchive how do I extract my code from it?
sorry but you want get back source code that way
the archive only contains compiled code and while you could decompile it in THEORY it won't work in practice.
You all all correct there is no way of doing it, I will have to re-write.
Thank you.

Using a dylib in 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.

Is it possible to use LuaInterface in Mono/Mac OS?

LuaInterface uses two .dlls: lua51 and luanet.
While being able to rebuild lua51 to liblua5.1.dylib (and code actually found all necessary entry points) im completely stuck with luanet.dll.
Does anyone have an idea how to build it on Mac OS or if I have to avoid using it entirely (at cost of losing such stuff as ObjectTranslator and MetaFunctions)?
I already know that there are alternatives like http://github.com/jsimmons/LuaSharp.
You need to configure your DllMap to tell it that luanet.dll should be looked for at lua51.dylib
http://www.mono-project.com/Config_DllMap

Resources