Properly installing frameworks in OSX & linking them to Eclipse IDE project - eclipse

I'm new to OSX and i'm getting used to the way frameworks work.
In c++ projects, when i want to link a preinstalled framework, for example OpenGL.framework, i just type "-framework OpenGL" and i'm good to go.
On the other side, when i copy a new framework into for example /Library/Frameworks, and i go "-framework MyFramework", the framework is not linked properly. Eclipse doesn't find the file. I also add "-F/Library/Frameworks" but still it doesn't find it.
Do i have to do something else than copying the framework to the folder?

If you haven't rebooted since installing the framework, you might have to update the shared library cache manually:
sudo update_dyld_shared_cache
The other option is to reboot. To make completely sure that the frameworks will be rescanned, you can touch the directory containing them first:
sudo touch /Library/Frameworks
sudo reboot
If this does not work, it is likely that the framework you installed is not properly formed. The directory structure, plist file, etc, need to follow a set of rules to form a framework.

Related

Add Libraries from Backed Up Managed Libraries Folder in CoDeSys

Recently I had a computer failure that resulted in reinstalling the windows operating system. Fortunately, I was able to back up my machine before doing the reinstall. However, I am now trying to make my CoDeSys project compile but I can't seem to figure out how to make CoDeSys recognize the libraries located in C:\ProgramData\CODESYS\Managed Libraries\. Before I reinstalled the operating system I was able to back up the managed libraries directory and now I have copied the directory back to the C:\ProgramData\CODESYS\Managed Libraries\ location. I can see the CODESYS library files in the directory through the file explorer but CoDeSys does not recognize them.
I have attempted to add a repository location using the library repository but I when I add a dummy location it won't let me delete the original location (to then re-add it).
I am using CoDeSys 3.5 SP11 Patch 4. I understand this is not the newest version of CoDeSys.
Thanks
It is not enough to copy libraries to this catalogue.
You need to install package with all hardware from your supplier.
What you have to do is download the .package file from supplier of your hardware.
Then you have to open codesys go to tools -> package manager -> install.
After that library will be installed properly.
Please take a look for this youtube movie if I didn't explain it well.
https://youtu.be/GFkA4E1R4aQ?t=393
Cheers!

CoreServices.h file not found in portaudio build on macOS 10.11 Xcode 8.0

This is called though cocoa.h and foundation.h, then NSURLError.h. Not sure why this compiler error just came up when I added portaudio and some other needed frameworks. The error first comes from some existing code. Indeed, there is no CoreServices/CoreServices.h anywhere on the whole system. Do I need to update Xcode?
I found an Apple help answer that said "Those are not makefile directives. How are you trying to build it? Most projects like this come with "configure" scripts that you just need to run from the command line. The only thing you need from Xcode are the Command Line Tools." I don't know what this means or how to do this.
I did run the port audio/configure terminal script, but saw nothing about CoreServices.h being generated. Where does this need to come from?
Thanks.
I further note that in the CoreServices frameworks directory associated with the Xcode project, there is a terminal file called "CoreServices" that when run, generates the error "CoreServices.framework/Versions/A/CoreServices: cannot execute binary file" . What could it be missing?
It's hard to answer your question in this specific case but:
I believe that CoreServices.h can be found at /System/Library/Frameworks/CoreServices.framework/Versions/A/Headers/CoreServices.h, is it not the case on your machine? If not, you might have to re-install Xcode
To install PortAudio, you can also use brew with the command brew install portaudio and then link your project with its headers and libs (/usr/local/Cellar/portaudio/19.6.0/include and /usr/local/Cellar/portaudio/19.6.0/lib) in your Xcode project (under the tab Build Phases > Link Binary with Libraries). That might be the easiest option.

Why compiled and installed gstreamer plugin from boilerplate code is not found by gst-inspect

I followed the instructions in GStreamer Plugin Writer's Guide (1.7.1.1):
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/index.html
in order to build a new gstreamer plugin. Basically I ran make_element and then edited Makefile.am as described. Amazingly make and make install worked and I ended up with:
/usr/local/lib/gstreamer-1.0/libgstframe_grabber.la
/usr/local/lib/gstreamer-1.0/libgstframe_grabber.so
As I understand it, gst-inspect should find this plugin automatically. The guide says that /usr/local/lib/gstreamer-1.0 needs to be added to GST_PLUGIN_PATH in order for plugins in this directory to be found. Another document states that this directory is searched automatically. I tried with and without the environment variable, but no luck.
Now I should say that I have just started to use gstreamer and I am suffering from total information overload. I have read so many documents, yet I don't even know whether I am building a gstreamer1.0 or a gstreamer0.10 plugin (I think the guide is for gstreamer1.0, since the guide's version is 1.7.1.1 but can't be sure).
Can anybody give me a clue here ?
There are many possible reasons that can cause this issue.
First, check if your plugin is blacklisted by command gst-inspect-1.0 -b.
If your plugin show up here, that means it is really blacklisted.
In that case, delete directory ~/.cache/ and then run gst-inpect-1.0 again.
This will force GStreamer to re-scan plugins list. If the reason of blacklist is not solved yet, gst-inpect will probably print out the reason here for you.
Another possible reason (but unlikely happens) is setting GST_REGISTRY_UPDATE as no, which will force GStreamer NOT to rescan the plugin directory, thus not found new plugin
P/s: The guide is for GStreamer 1.0
If you've tried removing your plugin from the blacklist and it still doesn't show up, try this:
export GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0
/usr/local/lib/gstreamer-1.0 is the default directory used by make in case of plugins. If you have defined a different directory, use it.
Then run gst-inspect-1.0 and you'll find the newly compiled and installed plugin.
You'll be required to perform the export every time in the shell whether you either create a static pipeline with gst-launch-1.0 or run code of your own. I couldn't find any alternative to make it permanent other than making entry of this in .bashrc file. If you have one, please suggest via comments.
If you run ./configure --help in the gst-plugin directory you will see the following:
By default, make install' will install all the files in
/usr/local/bin', /usr/local/lib' etc. You can specify
an installation prefix other than/usr/local' using --prefix',
for instance--prefix=$HOME'.
If you do after the original installation:sudo updatedb && locate libgst[NAME_OF_YOUR_PLUGIN].so you should see where the library holding your plugin is located (in my case it is under /usr/local/lib/gstreamer-1.0/ as described by the configure help above).
Now on my machine, the GStreamer "official" plugins are installed under: /usr/lib/i386-linux-gnu/gstreamer-1.0/ . This is where the new created plugin library should be stored.
To store the plugin at the right place, run configure with the following parameter:
./configure --libdir=/usr/lib/i386-linux-gnu followed by make && sudo make install
It is important to override with --libdir and NOT --prefix! The usage of --prefix will stick a /lib that we don't want to have under /usr/lib/i386-linux-gnu.The plugin will not be found by gst-inspect-1.0 if /lib is added to the path.
Extra note :
Even if the plugin is at the proper location, you may still see GStreamer blacklisting it when you run gst-inspect-1.0. One of the cause of the blacklisting could be the shared library/ies required by your plugin not installed or not found on your platform. The ldd command can help figuring out the dependencies your plugin may have. Just run ldd [YOUR_GSTREAMER_LIBRARY].so

How to run the PJSIP in xcode?

I'm new with XCode and still trying to understand objective-C. I'm using xcode 4.3.2, and I have to create an app that integrates with PJSIP.
I found this link. I am still confused about that link, because the article said that we must have installed the command line tool. But the command line tool is already installed in my XCode. How can i use it?
Do I need to create a view base application? how can I run the command line tool like the link says?
The command line tools allow you to compile "traditional UNIX programs" from source, generally using make. If you are using Xcode to create your projects then you don't even need them installed.
EDIT OK you have edited your question, stating the real issue you are facing; You don't know how to use the PJSIP package you have installed. The link you reference is about building PJSIP, not using it, so you can still forget about the command line and concentrate on how to configure your Xcode project to use PJSIP. This will require setting the header search paths and library search paths to find the header files and library file, in order to compile and link against it. Hopefully it's a static library as that will be easier to use; if it's a dynamic library or framework then you have your work cut-out as that's much harder to use.
In newer XCode (4.3 or above) you might have to install command line tools since it has been made optional. Open XCode and go to XCode->Preferences
Open the Downloads panel and click on "Components". If Command Line Tools are not installed already, you will get an option to install them from here.
Do so and you are set.
I done with it by myself. if you face the same problem, you can refer to this link, I already tried and run it. It works both on simulator and device. thanks.

Can't make deb files work using Theos. Manually copying the dylib - works

I'm having a really weird problem. I've developed my first tweak for the iPhone (intended for Cydia distribution). I'm all done developing the tweak and everything works, but I'm having trouble packing it into a deb file. Typing make and manually copying the dylib into Library/MobileSubstrate/DynamicLibraries and the preference file into Library/PreferenceLoader/Preferences - everything works just fine, but when I type make package, my tweak doesn't work at all. The files are copied to their right folders, I can see the settings in the Settings.app, but the dylib won't run, I can't even see my NSLog in the console. I tried using dpkg -b, and even http://www.myrepospace.com/iDeb/ but to no avail.
What can I do?
Thanks!
I'm the author of Theos, and you posted this question in the IRC channel and then summarily left.
I would like to help you, but I need to look at the package that Theos creates.
Barring the usual issues, since it IS a tweak, please make sure to respring after you install the package, as dpkg will not do that for you.
You can find me in #theos (irc.saurik.com) as DHowett.