Archived

This forum has been archived. Please start a new discussion on GitHub.

link error when Compile a static lib with icetouch 1.1.0

hello all, I am developing a iPhone client that using icetouch to communicate with server.

first,I complete a app demo, use ice,it works well. I need to offer a static lib to others,so Compile a static lib with icetouch 1.1.0. but there's link error like that:
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool failed with exit code 1

Latest Results is that:

/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool: -dynamic not specified, -all_load invalid
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool: -dynamic not specified the following flags are invalid: -ObjC
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool: can't locate file for: -lstdc++
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool: file: -lstdc++ is not an object file (not allowed in a library)
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool failed with exit code 1

How can i fix it ? i am new to iPhone development,and my XCODE 3.2.3,iphone SDK 4
I have try to Compile it with lastest Xcode yesterday,but there is same error.
thinks.

Comments

  • benoit
    benoit Rennes, France
    Hi,

    Could you explain a little more what you are trying to build? The Xcode plugin sets up all the configuration to build Ice Touch applications, if you are trying to create a static library, you'll most likely need to specify those settings manually.

    Cheers,
    Benoit.
  • benoit wrote: »
    Hi,

    Could you explain a little more what you are trying to build? The Xcode plugin sets up all the configuration to build Ice Touch applications, if you are trying to create a static library, you'll most likely need to specify those settings manually.

    Cheers,
    Benoit.

    Could you expand on this? I have the same problem. What settings need to be set manually?
    What specifically does the Xcode plugin do that I need to recreate?
  • benoit
    benoit Rennes, France
    Hi Eric,

    Which Ice Touch version do you use?

    The Xcode plugin installed by the Ice Touch 1.2 installer is supposed to setup the correct settings for compiling your application with Ice Touch. You just need to specify the Ice Touch SDK path in the "Additional SDKs" setting of your project (for example set it to /Developer/SDKs/IceTouch-1.2/$(PLATFORM_NAME).sdk). See also the instructions from the Ice Touch Release Notes.

    Cheers,
    Benoit.
  • benoit
    benoit Rennes, France
    Note that if you are trying to build a static library, it's currently not supported by the Ice Touch Xcode plugin. You will need to manually setup the compiler flags with your Xcode project, so do not set "Additional SDKs" to disable the Xcode plugin and add /Developer/SDKs/IceTouch-1.2/$(PLATFORM_NAME)/usr/local/include to your include directories. You will also need to either manually compile the Slice files with slice2objc or write a script to do it. We will check whether or not we can add support for static library projects to the Ice Touch Xcode plugin.

    Cheers,
    Benoit.
  • That worked
    benoit wrote: »
    Note that if you are trying to build a static library, it's currently not supported by the Ice Touch Xcode plugin. You will need to manually setup the compiler flags with your Xcode project, so do not set "Additional SDKs" to disable the Xcode plugin and add /Developer/SDKs/IceTouch-1.2/$(PLATFORM_NAME)/usr/local/include to your include directories. You will also need to either manually compile the Slice files with slice2objc or write a script to do it. We will check whether or not we can add support for static library projects to the Ice Touch Xcode plugin.

    Cheers,
    Benoit.

    Benoit-
    Thanks! That worked. Only thing is I had to substitute $(PLATFORM_NAME) with 'iphoneos.sdk'.
    It would seem that static library support would be a big need by the community. Adding that to the next release would certainly be great from my point of view.

    I am trying to integrate ICE-touch with MonoDevelop/MonoTouch, and the only way I can think of doing that is by linking to a static library developed with Xcode.
    That brings to mind another question, any possibility for MonoTouch support in the future?

    Anyways- thanks again for the help.
    -Eric