Convert a static library (.a file) to a universal shared lib (.dylib)

I'm working on an extension to a ruby based application. I'm using the ruby/dl extension capability for calling out to a dynamic library.
I'm accessing a wrapped version of the Newton Physics SDK which ships with a universal static library (newton32.a).
I've worked out a process for using LIPO to thin the .a down to the intel only version of the lib and then dump all the .o files. I then use g++ to relink into a dynamic library and I can access it successfully using ruby/dl.
however, I'd like to create a universal shared lib. Anybody got the recipe for doing this???

Probably not legally. You might want to check with your library to see what you can do with them, for example, can you burn them to an audio CD? The whole purpose of the DRM is to prevent you from converting or copying the files in ways the rights holder hasn't authorized. Discussions about how to circumvent DRM are not allowed according to the terms of use of these forums. Sorry.

Similar Messages

  • Possible to create a static library (.a) file for Xcode with Flash Builder?

    Is it possible to write code in AIR that can be compiled to static library (.a) to be used in an iPad app?

    Hey paulhart83,
    My guess is therabbitwindfall's answer was correct but where you able to find a solution to your question? If so, please do share. I need to embed my app within another app and the only way is through a static library. I'd rather not have to re-develop my app in Xcode in order to generate the .a file.
    Thanks.
    Novian

  • Is that possible to call a static library?

    Hi,
    I'm using JNI to call a third party static library (.a file), but I always got the java.lang.UnsatisfiedLinkError. I'm not sure whether it is possible to invoke APIs from static c libraries. Anyone here has this kind of experience ?
    Here is my scenario:
    I have a native method in java class named sendMessage(), and implement this method in message.c(function: Java_MessageSender_sendMessage()) by calling a API in a third party static library(msg.a). However when I run the java class, I always got the error. But If I just run the main() of message.c which also calling the Java_MessageSender_sendMessage(), it will be ok.
    some code of c file:
    Java_MessageSender_sendMessage()
    printf("hello");//this line can be executed
    sendMessage();//this line is calling the static library, and error occurs here when the function called from java side
    int main(int argc, char *argv[])
    Java_MessageSender_sendMessage()//It's ok when directly run this application
    Any information will be helpful to me.
    Thanks in advance

    Hi, bschauwejava
    Thanks for your reply.
    As you have said, the static libraries already have been linked when I made the libmessage.sl using aCC:
    aCC -z -b -o libmessage.sl message.o -lmsg
    Is there anything wrong with the command?

  • I Just converted my iPhoto library to Photos. Now I can't find my RAW files. I need to have all the images in my old library show up in their RAW format.

    I Just converted my iPhoto library to Photos. Now I can't find my RAW files. I need to have all the images in my old library show up in their RAW format.

    Unfortunately no - Photos use extensions and the vendor (adobe) will have to implement the extension to allow external edits in PS or PSE
    For now you must export the photo, edit and then import - not great but a work arond
    And you can continue to use iPhoto until Photos meets your needs - launch it in your applications folder - if you need assistance on this see Why won't my iPhotos open?
    LN

  • Problems loading nib files after class is split into a static library.

    I've recently split a project so that the common re-usable controls are in their own class library. My original application project now references these using a cross project reference.
    However, since I have split the projects up, my original project crashes when it loads main.xib because it cannot find one of the custom classes which is defined in the library project.
    When I first split up the projects, I noticed that there were problems with the nib files not being able to find the IB outlets of the custom classes, but I managed to get around these by going importing the relevant library class files manually (File > Read Class Files…).
    I have made sure that all of the nib files compile without warning, so as far as I can tell, Interface Builder is able to read the necessary class headers, but when I try to run the app, it crashes saying that there is an unknown class in the Interface Builder file and that the class is not coding compliant.
    Are there any steps I've missed or advice on how to troubleshoot this?

    I did a bit of digging. The reason why this wasn't working is because the class in question was referenced by the nib files, but not in code. Therefore, while the code compiled and there were no warnings with the nib files, the linker was not linking the classes because no code used them directly.
    This can be fixed by going to the Project Settings, and on the Build tab, underneath the Linking heading, adding -ObjC to the Other Linker Flags section.

  • How to convert java class to dll file for using in Microsoft Technology(.n)

    hey hemmj !!!!!!
    nice replying , first of all i d like to say thanks for response me so frequently..... i like such type of guy... i d never forget ur online support.
    hey buddy, i ve a problem with applet application...
    i m working on java chat server build on swing applet. As it is chat server, it is divided into two parts, one is server application and other is client application. I want to run this server app on the client server and the basic thing with this site is that it is running on .net platform(Microsoft). and the other app ll running on the client machine or end user. Now the problem is that this site would run only if the server app ll be run on server. This server app ll open the socket of server, which ll listen the request of the user...... So, the requirement is to convert this java sever class file into dll file and register this dll file with the IIS server.So, It run and stop with the IIS server.
    I ve already search the way to convert the java class file into dll file. This is possible in such way........... below code is for the java class file...
    import java.net.*;
    import java.io.*;
    import java.util.*;
    public class chatServer
    public static void main(String args[]) throws Exception
                        ServerSocket sersoc=new ServerSocket(1234);// Any port number above 1000 should do
    // as most ports below 1000 are used by system
    Vector socvec=new Vector();
    String data="";int i,j=0;
    BufferedReader in;
    //System.out.println("Listening of port " + sersoc.getLocalPort());
    //System.out.println("Waiting for connections...");
    while(true)
    Socket soc=sersoc.accept();
    socvec.addElement(soc);
    chatServerReadThread csrt=new chatServerReadThread(socvec, soc);
    in=new BufferedReader(new InputStreamReader(soc.getInputStream()));
    PrintStream out=new PrintStream(soc.getOutputStream());
    out.println("Connected to chat server");
    out.flush();
    data= in.readLine();
    for(i=0;i<socvec.size();i++)
    soc=(Socket)socvec.elementAt(i);
    out=new PrintStream(soc.getOutputStream());
    out.println(data + " connected");
    out.flush();
    //System.out.println(data + " connected");
    csrt.start(); // error is comming from here..... plz help me.
    class chatServerReadThread extends Thread
    Vector socvec;
    PrintStream out;
    chatServerReadThread(Vector socvec, Socket soc)
    this.socvec=socvec;
    try
    out=new PrintStream(soc.getOutputStream());
    }catch(Exception e){}
    public void run()
    try
    String data;
    Socket soc;
    BufferedReader in;
    while(true)
    for(int i=0;i<socvec.size();i++)
    soc=(Socket)socvec.elementAt(i);
    in=new BufferedReader(new InputStreamReader(soc.getInputStream()));
    if(in.ready())
    try
    data=in.readLine();
    if(data.charAt(0) == ']')
    data = in.readLine() + " exited";
    //System.out.println(data);
    socvec.removeElement(soc);
    for(int e=0;e<socvec.size();e++)
    soc=(Socket)socvec.elementAt(e);
    out=new PrintStream(soc.getOutputStream());
    out.println(data);
    out.flush();
    else
    for(int e=0;e<socvec.size();e++)
    soc=(Socket)socvec.elementAt(e);
    out=new PrintStream(soc.getOutputStream());
    out.println(data);
    out.flush();
    }catch(Exception e){socvec.removeElement(soc);}
    }catch(Exception e){e.printStackTrace();}
    first i ve made the jar file of this class
    jar cvf chatServer.jar chatServer.classafter getting the jar chatServer.jar. I ve opened the .net dos prompt and
    type this command which ll make dll file automatically....
    > jbimp /t:library chatServer.jar
    And you'll see the following output:
    Microsoft (R) Java-language bytecode to MSIL converter version 1.1.4322.0
    for Microsoft (R) .NET Framework version 1.1.4322
    Copyright (C) Microsoft Corp 2000-2002. All rights reserved.
    Created chatServer.dll
    I cant get the problem origin from where it is comming, when i tried to convert it into .dll file it shown an error that, it did not recongnized the method in first class
    public static void chatServerReadThread.start() method
    is not recognized by .net dos prompt commnad. But when i omit this method it gets created the .dll file. This start method is basically the default method of thread class that run the thread from the same class..
    By vewing the code u can visulize the thing,, i ve marked the code from where the error is comming.
    Plz do it as soon as possible, i ll waiting for ur reply......
    I ll be really thanking u for that....
    Thanx and regards
    Niraj Kumar Singh

    I wonder if this will work:
    jbimp /t:exe chatServer.jar
    Your chatServer is an application that can be started from the commandline.
    A dll is a library to be used in com, com+, other executables or ....

  • Creating a static library with XCode cross-project references.

    I have a project and am trying to move a lot of the code into a static shared library, and added a cross project reference to this library in my app.
    However, when I moved a file from my app to the library (removing the reference in my app and moving the file to the library's project directory), and try building my app, I get compiler error messages as if the file I have moved doesn't exist.
    When I build my library project, it says the build has succeeded, but the library.a file remains red. It is also red in the my referencing app project.
    If anybody has any experience setting up cross-project references in XCode, I'd appreciate any help.
    If it helps identify where the problem is, I've performed the following steps to setup the library and cross-project reference:
    1. I created a new Cocoa Touch static library project in XCode which would house the shared code.
    2. I changed the global settings in XCode to place the build products in a shared build directory (rather that the project directory), and made sure the intermediate build files are placed with the build products.
    I changed this using the Preferences menu, but have also gone into the project info for both my app project and the library project and made made sure it is set to place the build projects in the custom shared build directory.
    3. I then added a Source Tree, and made sure that the Path of the project directory of the library project.
    4. I added a project reference to the library project's .xcodeproj file in my application project. I changed the library project reference so that it was relative to JIGSAW24LIBRARY.
    5. I configured the library dependencies by going to my app's target's info, and adding a direct dependency to the library project.
    6. In my app's info build tab, I changed the user header search paths so that it uses the search tree I setup (I used the $(SEARCHTREE_NAME) notation, but checked that this resolves to a valid path). I also made sure that the Always Search User Paths checkbox is checked, and that the Library Search Paths is blank.
    7. I click-dragged the library.a file under the library project so that it was under the Link Binary With Library sub folder of my app's target.
    For step 5, I've also tried adding the reference to the other project as a linked library, rather than a direct dependency, but this doesn't seem to work either.

    I managed to fix the problem. The steps above seem to be correct. The problem seems to be related to the source trees that are defined...
    I was previously using an absolute path for the source tree which pointed at the folder containing the library project. I changed this to a relative path to the same folder (relative from the calling project) and this seems to fix it.
    I'd double checked that the absolute path specified was correct, so it looks like the user header search paths specified must be relative to the current project.

  • How to create a static library in Xcode 4.2

    I need to make a static library from a project that consists of only two files, a c module and a header file.  I haven't used Xcode before, but had no problem figuring out how to create a new project and setting up what seemed like reasonable the build options, and the build reports success.  But no output files are being created.
    I figured it was time to dig into the documentation, but when I did some searching I turned up several horror stories about not being able to get this to work.  And from people who appear to know a lot more about this than I do.  So I thought I'd ask--is it a problem doing what ought to be a relatively simple task using Xcode 4.2?
    This is not an iOS thing, just a C function that I need to call from Python.
    Any suggestions as to how I can get this to work?

    Thanks for the response.  Yes, that's how I started.  I have now managed to get it to build static libraries; the piece I was missing was the scheme stuff.  I also tried to build dynamic libraries, but still no luck with those.  It was a little confusing because sometimes if I started a new project the scheme would allow me to create output as is; other times I had to edit the scheme first.  So reading the documentation appears to have paid off after all.
    FWIW, what I was trying to build was a missing library needed for a project in Python.  The entire project has two C libraries, which I've managed to build now, altough I don't know if there are some specific options that I need to set for them to work with the C wrapper.  The C wrapper is written in Cython, which creates a C file from Python-like statements.  The end result of linking the two libraries and the compiled C wrapper should be a file that can be imported into Python, which should have an extension of ".so".
    So far the last part is not working, so I don't know if the problem is with the build settings for the libraries, or something else.

  • Adobe DNG Converter can't recognize any files

    Hi All!
    I'm new here and would very  much appreciate help.
    I am running a Mac OS X 10.04.11 and would  like to open .CR2 files (native file from my Canon 500D) in PS4      / Bridge  CS4. My problem is that although I have downloaded the Adobe DNG Converter and Camera Raw 5.1  update as described  here: http://www.adobe.com/support/downloads/detail.jsp?ftpID=4057,  the DNG Converter can't recognise any files at  all (they are greyed-out  when I go to select any folder). I also followed these steps from the aforementioned link (well at  least I hope I did it right, I found the reference to step 4 slightly  confusing):
    To install with Adobe Creative  Suite 4 or Photoshop CS4:
    Automated installation on Mac or Windows®:
    1. Select "Updates..." from the Help menu
    2. Follow the on-screen dialogs to download and  install the latest  available Camera Raw update  
    Manual installation on Mac:
    1. Exit Photoshop CS4 and Adobe Bridge.
    2. Open the Finder.   
    3. Navigate to the root of the local disk (not the user's home  folder).   
    4. Navigate to: (Please read directory carefully)
    Library/Application Support/Adobe/Plug-Ins/CS4/File Formats
    5. Move the existing plug-in to another location (for example, a new  folder on your desktop). Ensure you keep this version in case you need  to revert back.
    6. Copy the Camera Raw plug-in, Camera Raw, from the download  into the same folder as in Step 4.   
    7. Launch Photoshop CS4 or Adobe Bridge.   
    Is that version the right one for CS4?
    Only Finder and the Canon Software can preview my .CR2  files, Photoshop still gives the message: "Could   not complete  your request because Photoshop does not recognise this  type of file." and   Bridge only shows me a generic RAW thumbnail. This message also  appears in PS when I double-click on the  Camera-RAW.plugin. I also  restarted my computer,  but that didn't fix it.
    Can  anyone help me out please? I'd urgently need a solution.
    Thanks in advance!

    I now uninstalled the older 5.1 version and  instead installed the DNG Converter 6.3 separately and it works  perfectly.
    About the Camera Raw 5.6 update: I also downloaded the plug-in  (which I think should be the last version CS4 supports) and can now open  my .CR2 files in PS, Bridge previews them too. :-)
    Is it advisable to keep both, .CR2 as well as .DNG files? Why is it  that my .DNG files are lighter than the native .CR2?
    Thanks again!

  • How to create a static library using xcode ?

    Hi,
    I need to create a C static library using xcode in order to use it in another developement environment which is Free Pascal Compiler/Lazarus.
    I have very few knowledge about C. I just know how to program the function I need and I've already written my C function using xcode.
    Using Lazarus (Pascal IDE), for example, as I use IOKit, I have declared the path of IOKit in the linking section (that is /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/IOKit.framework/IOkit) . IOKit is a unix executable, and I can use the exported functions it contains in my Pascal code.
    So, I would build such kind of unix executable where I can put my own functions written in C. But I can't figure out how to do it.
    How to export my functions ? Must I use some specific C keywords to "publish" them (export, __export,...) ? How to create an executable file like IOKit ? Which kind of project must I choose in XCode ?...
    André.
    Message was edited by: sinfoni12345
    Message was edited by: sinfoni12345

    Thanks for the response.  Yes, that's how I started.  I have now managed to get it to build static libraries; the piece I was missing was the scheme stuff.  I also tried to build dynamic libraries, but still no luck with those.  It was a little confusing because sometimes if I started a new project the scheme would allow me to create output as is; other times I had to edit the scheme first.  So reading the documentation appears to have paid off after all.
    FWIW, what I was trying to build was a missing library needed for a project in Python.  The entire project has two C libraries, which I've managed to build now, altough I don't know if there are some specific options that I need to set for them to work with the C wrapper.  The C wrapper is written in Cython, which creates a C file from Python-like statements.  The end result of linking the two libraries and the compiled C wrapper should be a file that can be imported into Python, which should have an extension of ".so".
    So far the last part is not working, so I don't know if the problem is with the build settings for the libraries, or something else.

  • How to link a static library in java

    Hi all
    I would like add a static library (with an extension of ".a") to my java program
    and use the rutines in it. I made a search on the Internet but could not find much.
    The library created by compiling several fortran programs.
    Does anyone know how to do this (linking & calling the subrutines)
    Thanks

    Thanks for the suggestion and for the tip again. I am doing what
    you suggested (writing a C program to interface java with that static library
    ( ".a") ) But where in the C code do you specify and include that static library?This is mainly a linking issue. Suppose the FORTRAN API exposes the following
    functions: FBQ001, FCQ042 and FDB005 (well, this is FORTRAN, so the names
    should be silly ;-)
    For the sake of simplicity, assume that these three routines don't take parameters
    and don't return a value.
    You could create a little Java class that could (indirectly) access those three
    routines:public class FORTRANWrapper {
       public static native void FBQ001();
       public static native void FCQ042();
       public static native void FDB005();
       static {
          System.loadLibrary("wrapperlib");
    }Note the little static block that loads your own wrapper lib. Read on:
    use javah against this little class above. It'll generate a .h file containing the
    prototypes of the three wrapper functions for your FORTRAN API.
    Note the funky names generated by javah. Don't change them but create a
    simple .c file with the implementation of those functions. These functions
    should simply call the FORTRAN functions; check your manuals how to
    call FORTRAN routines from C.
    Finally, compile your .c file and link it against the static FORTRAN .a library.
    Use the correct linker flags (system dependent stuff here) to create a
    shared object (.so) file. This should generate your wrapperlib.so file,
    loaded by the System.loadLibrary method (see above).
    kind regards,
    Jos

  • Is XIB not supported in static library (for creating Native Extension)?

    Hello,
    These day I'm trying to build a static library in XCode to build a Native Extension. The original project from which I'm creating a static library is runs well on device. But when I creates a static library project along with one XIB file within, and port it to the Adobe AIR, the expected XIB view never opens up.
    Somewhere some gentleman mentioned that static library can not include XIB, graphics file etc. Is that true (http://stackoverflow.com/questions/2797214/trouble-using-xib-files-in-libraries)? Can't I bundle an ANE with XIB support?
    Thanks.
    Santanu

    Also want to know this Current project may require loading xib over Adobe Air. I suggest to start from here http://stackoverflow.com/questions/7814928/how-to-load-a-xib-file-in-a-uiview and this http://forums.adobe.com/message/4621408
    Let me know if this works and would be gr8 if you can share your solution as opensource

  • I recently switched from years of PC to iMac ( OSX 10.7.5) and need to batch convert thousands of old WordPerfect files (many without an apparent file extension) into my new Microsoft 2011 Word.  I am a computer nitwit and am hoping for some simple sol'n.

    I recently switched from years of PC to iMac ( OSX 10.7.5) and need to batch convert thousands of old WordPerfect files (many without an apparent file extension) into my new Microsoft 2011 Word.  I am a computer nitwit and am hoping for some simple solution.

    Try reindexing the mailbox. This can take awhile if you have a lot of mail.
    Reindex messages.
    If that doesn't work try deleting MessageUidsAlreadyDownloaded3.
    Quit the application.
    You need to look in your user Library. Either hold down the option key while using the Finder “Go To Folder” command and select your user Library in your home folder or use the Finder “Go To Folder” command and enter ~/Library/Mail/V2/Mail Data/MessageUidsAlreadyDownloaded3.  Move the file to your desktop.
    Open the application and test. If it works okay, delete the file from the desktop.
    If the application is the same, return thefile to where you got it from, overwriting the newer ones.
    If you prefer to make your User library permanently visible, use the Terminal command found below.
    Show User Library
    You might want to bookmark the command. I had to use it again after I installed 10.8.5. I have also been informed that if you drag the user library to Finder it will remain visible.

  • How can i convert my whole library to flac or apple lossless

    how do i convert my whole library to flac or apple lossless?!!?!!?!?!?!

    First, FLAC is not supported by iTunes and the same probably applies to the iPod.
    Second, are all your files currently in AIFF or WAV format, or on CDs?  If you have mp3 files or AAC files the only thing that will happen by you converting them to lossless is you will use up more space for the music with no gain in quality.  Quality is lost when you convert to mp3 or AAC and converting it to lossless won't get it back.
    It looks like current ipods support Apple Lossless.  Still, the whole idea behind ipods is to use compressed format so you can fit on the most music.  Read http://forums.macrumors.com/showthread.php?t=85227
    If after doing all that you still want Apple Lossless, you need to set the preferences to ALAC in your iTunes preferences, then convert with the Advanced menu command.  Mind you, I use an older iTunes so you may have to explore a bit to find where they have those features now.  This conversion will place a copy of the file in iTunes in the new format but also leave the old one there, so you'll need to delete the old ones if you don't want them.
    Message was edited by: Limnos

  • ITunes Library .itl file is not updating

    I want to move my 45,000 song 250Gb iTunes library from my old G5 desktop to my MacBook Pro, using the same external HD for the ITunes Media folder that I am already using with the G5.
    I've looked at all the relevant tips and discussions I can find and have copied my iTunes folder from the old Mac to the new one, connected up the same HD, then started iTunes 11 on the MacBook with Alt held down and pointed it at the .itl file from the old machine.
    (The old library is from iTunes version 10.6.3 and the G5 OS is 10.5.8)
    It took a little while converting the library to work with iTunes 11 and the whole process worked as it should  – but with just one problem, Nothing I added to the library after June 5, 2012 (more than 2,000 tracks) is showing up on the new computer.
    Looking into the iTunes folder on the G5, June 5 , 2012, is in fact the Last Modified date on the ITunes Library.itl file. There are two XML files in there where there should be one. One is called iTunes Music Library.xml (16Mb) and the other is called iTunes Music Library.xml.xml (95Mb). Both have the correct modification date from when I last added content (earlier today).
    There is also an ITunes Music Library (Damaged) of 89.5Mb which also has a date of June 5 last year. I don't recall having a specific iTunes problem then, although my G5 sometimes freezes and crashes for no apparent reason, usually while playing music.
    The content I have added since last June shows up in the old library as it should and plays without a problem except for these very occasional freezes.
    So I found this page – http://support.apple.com/kb/HT1451
    Following the advice there, I'm now trying to reconstruct the .itl file on the G5 by starting a blank library in a new and separate iTunes folder, changing the media folder to the external drive, then importing  iTunes Music Library.xml.xml (which I moved to the desktop) as a playlist.
    It's been importing the file for nearly three hours now and I not feeling confident that it will ever end.
    Any ideas that will be less trouble than reimporting the 2,000 tracks (all CD rips) from the external HD back into the iTunes window? I'd rather not lose the existing play counts and date added information if possible.

    Usually when you get this problem in vista, it is to do with folder permissions.
    The account you are using needs full control of the iTunes and iTunes Music folder.
    Vista file folder permissions help
    http://windowshelp.microsoft.com/Windows/en-US/Help/2464a180-e5dc-45d1-a2b8-3c8a 2b571e9d1033.mspx
    http://www.mydigitallife.info/2007/05/25/how-to-take-ownership-and-grant-permiss ions-in-windows-vista/

Maybe you are looking for