linking problems in openframeworks

Home Forums Syphon Syphon Implementations – User linking problems in openframeworks

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #4787
    eloimaduell
    Participant

    Hi Everybody !

    Well first of all i would like to congratulate the Syphon team for this amazing new tool which will allow a new brand of interconnections between several environments … congratulations and thanks for letting us play with it !!

    So i’m under Openframeworks 0.62, in a MacBookPro with OSX 10.6.7, with XCode 3.2.4 (64bit) and i’m trying to integrate ofxSyphon in a small app, just for testing how is the integration of Syphon on the OF environemt …

    What i did :

    – download the source’s from svn with this command line :
    svn checkout http://syphon-implementations.googlecode.com/svn/trunk/ syphon-implementations-read-only
    – setup a simple app with the Client code sniffed from SyphonExample project
    – drag & drop the ofxSyphon folder to my Xcode project …

    It compiles fine but i’m facing some linking problems that go beyond my knowledge, sorry i’m quite new at Xcode …

    I got 9 errors like this :

    “_SyphonServerDescriptionUUIDKey”, referenced from:
    _SyphonServerDescriptionUUIDKey$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerDescriptionUUIDKey$non_lazy_ptr)

    “_SyphonServerDescriptionNameKey”, referenced from:
    _SyphonServerDescriptionNameKey$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerDescriptionNameKey$non_lazy_ptr)

    “.objc_class_name_SyphonClient”, referenced from:
    literal-pointer@__OBJC@__cls_refs@SyphonClient in SyphonNameboundClient.o

    “_SyphonServerDescriptionAppNameKey”, referenced from:
    _SyphonServerDescriptionAppNameKey$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerDescriptionAppNameKey$non_lazy_ptr)

    “_SyphonServerRetireNotification”, referenced from:
    _SyphonServerRetireNotification$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerRetireNotification$non_lazy_ptr)

    “.objc_class_name_SyphonServerDirectory”, referenced from:
    literal-pointer@__OBJC@__cls_refs@SyphonServerDirectory in

    SyphonNameboundClient.o

    “_SyphonServerUpdateNotification”, referenced from:
    _SyphonServerUpdateNotification$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerUpdateNotification$non_lazy_ptr)

    “_SyphonServerAnnounceNotification”, referenced from
    _SyphonServerAnnounceNotification$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerAnnounceNotification$non_lazy_ptr)
    ld: symbol(s) not found’

    I’ve checked that Syphon.framework is inside the ofxSyphon addon so i don’t understand this linking problems … any light into my darkness will be appreciated …

    My Xcode project settings … maybe there’s an error here :
    [General]
    Base SDK for all configurations : MAC OSX 10.6
    [Build]
    Architectures : 32-bit universal
    Base SDK : Mac OSX 10.6
    GCC 4.0

    is that wrong ?

    Thanks .

    e*

    #4788
    bangnoise
    Keymaster

    1. Did you build the addon as per the instructions in “Read Me – Building the OF addon.rtf” in the OpenFrameworks folder you got from SVN?
    2. Make sure you’re linking the framework in the Xcode target for your project. If you select the target in Xcode and expand it, there should be a “Link binary with Frameworks” build phase (or similarly named, I only have Xcode 4 to hand) – if Syphon.framework isn’t listed there, drag it from inside the ofxSyphon group in the Xcode project.

    #4789
    eloimaduell
    Participant

    Hi bangnoise …

    1/ Yes, sorry i missed that on my explanation . Here is what i did :

    – after getting the sources from SVN
    – compile ofxSyphon from SyphonImplementations/Openframeworks
    – from this step i got the addon ofxSyphon build and the SyphonExample build
    – i used this folders just created as sources from now on …
    – copy ofxShypon to /addons folder and SyphonExample to /apps/addonsExamples folder

    From here :

    The SyphonExample from you guys works perfect, compiles and links and runs smoothly.
    Except for 1 thing i must change : I got an error on compilation saying :
    codeerror: There is no SDK with the name or path ‘macosx’code
    So i changed on Project Setting the SDK to : MacOSX 10.6 and it all works ok.

    so now …

    I checked that under my Targets, in the “Link Binary With Libraries” there is a Syphon.framework.

    I’ve compared this list with the one on your SyphonExample, and the only difference is that i’m using osc, so osc.a is also linked and that you’re linking also against CoreVideo.framework … is that determinant ? could be the problem ?

    Also I detected that under the “Copy Files” tag on my Target description, i had not present the Syphon.framework. It is present on your SyphonExample so i add it also there.

    Still with this i can’t make it to work and still have the same 9 linking errors.
    Here is a screenshot of my Xcode project and SyphonExample project targets compared : http://www.playmodes.com/pub/syphonErr.jpg

    I’ve never need to do what you’re suggesting on step 2/ so i’m not sure if i’m doing it properly, but now i see both targets with the same stuf …

    Any more ideas / help feedback ?

    Thanks for your attention,

    e*

    #4790
    vade
    Keymaster

    If you check the framework search paths for your target in both projects, does *everything* match? You might not be searching for frameworks in the right location, thus the linker is failing?

    #4791
    eloimaduell
    Participant

    Hi Vade …

    Sorry for being so “sluggy” on this … I’ve not much experience on Xcode and as usually it’s all about Drag&Drop, when i’ve to do something else i need to understand where are things specified …

    In the Project Settings, down under “Search Paths” section, there is a “Framework Search Paths” but it’s empty in both projects (SyhponExample and myApp). On this same section there is a “Header Search Paths” where my app was missing “../../../addons/”, i’ve added on my project but nothing changed.

    On the project GUI, as far as i understand … i see everything on the same way, there are no red_letters that in Xcode usually mean lost reference …

    So i got stuck again … I’ve uploaded both .xcodeprj if anyone expert on XcodeProject could take a look and detect where is my leak … so check out the propper tabs and options … http://www.playmodes.com/pub/XcodeProjects.zip i will appreciate and learn from it …

    Thanks a big RESPECT for such a BIG thing that is Syphon …

    e*

    PD : any idea is we would be able to do so in Linux one day ?

    #4792
    eloimaduell
    Participant

    Hi again …

    Checking more and more i’ve found some “big” differences between both projects.
    On Xcode 3.2.4 where i am, when u clikc on the main icon on the project window, the main icon i mean the one with the Xcode icon on it, on top of the list …

    On the right there’s a list of files and frameworks …

    What i’ve found is that there are many differences between both projects, so maybe comes from here the error ?

    http://www.playmodes.com/pub/syphonAppFrameWorks2.jpg

    There are some missing frameworks on myApp description … but there is Syphon.framework on both …. could be a dependency with another lib or framework ?

    .. .. ..

    thnkx

    e*

    #4793
    bangnoise
    Keymaster

    1. Get Info on the WarpMap_0.1 target and click the Build Settings tab
    2. At the top of the Build Settings is a search box, type Syphon into that
    3. One of the settings that will show up is “FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2” with the value of “$(SRCROOT)/../../../addons/ofxSyphon/libs/Syphon/lib/osx”
    4. Make sure that points to the correct location of ofxSyphon relative to your project (each ../ is travelling up one level in the folder structure)

    any idea is we would be able to do so in Linux one day ?

    One day if Linux adds the requisite features, maybe. Now, no. http://syphon.v002.info/faq.php

    #4794
    eloimaduell
    Participant

    Hi bangnoise again …

    I’ve checked what you suggested and that i think it’s correct.
    so i got :

    FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = “$(SRCROOT)/../../../addons/ofxSyphon/libs/Syphon/lib/osx”

    as u can see on my folder structure here :
    http://playmodes.com/pub/targetFrameworkPath.png
    i guess that the route : ../../../addons/ofxSyphon/libs/Syphon/lib/osx is correct…

    mmm … any more options to check ? ? ?
    thanks for your attention …

    e*

    #4795
    eloimaduell
    Participant

    Hi Bangnoise …

    Well keeping with this i got back to create an empty example with just the ofxSyphon stuff… and it worked with just a few tweaks.

    I followed the steps stated on my previous post … then :

    – copied an “emptyExample”
    – open it with Xcode and then drag&drop the addon ofxSyphon to the project

    If i compile with this i got this error at runtime :

    [quote]GDB: Data Formatter temporarily unavailable, will re-try after a ‘continue’. (Cannot call into the loader at present, it is locked.)
    [/quote]

    So then what i need to do to make it work is :

    -on Targets option in the main window of XCode groups and files …
    -unfold the “emptyExample” tab and drag&drop the “Syphon.framework” present on the addon code folder (ofxSyphon/libs/Syphon/lib/osx/) into the CopyFiles tab, the same place where GLUT.framework is …

    Now it works … I don’t know what i did, i just put that there because i saw it there on the SyphonExample from the Syphon svn … but i don’t quite understand why i need to do so … it’s the first time i need to make something like this to make an addon work … any expert could explain me what i did ?

    Thanks … i hope it’s usefull info if someone gets stuck on a similar level …

    #4796
    bangnoise
    Keymaster

    Ah yes, sorry, didn’t think of that.

    I’ll open an issue for this as it either needs to be made clear that the framework must be copied, or made to work without copying…

    anyway, glad you’re up and running

    edit: this is issue 11.

    #4797
    eloimaduell
    Participant

    Well … in fact i’m up & running from a “emptyExample”, but didn’t solved my issue with myApp where i was testing before … so still there’s something weird on it … really weird …

    I’m still on the same 9 errors :

    “_SyphonServerDescriptionUUIDKey”, referenced from:
    _SyphonServerDescriptionUUIDKey$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerDescriptionUUIDKey$non_lazy_ptr)

    “_SyphonServerDescriptionNameKey”, referenced from:
    _SyphonServerDescriptionNameKey$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerDescriptionNameKey$non_lazy_ptr)

    “.objc_class_name_SyphonClient”, referenced from:
    literal-pointer@__OBJC@__cls_refs@SyphonClient in SyphonNameboundClient.o

    “_SyphonServerDescriptionAppNameKey”, referenced from:
    _SyphonServerDescriptionAppNameKey$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerDescriptionAppNameKey$non_lazy_ptr)

    “_SyphonServerRetireNotification”, referenced from:
    _SyphonServerRetireNotification$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerRetireNotification$non_lazy_ptr)

    “.objc_class_name_SyphonServerDirectory”, referenced from:
    literal-pointer@__OBJC@__cls_refs@SyphonServerDirectory in SyphonNameboundClient.o

    “_SyphonServerUpdateNotification”, referenced from:
    _SyphonServerUpdateNotification$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerUpdateNotification$non_lazy_ptr)

    “_SyphonServerAnnounceNotification”, referenced from:
    _SyphonServerAnnounceNotification$non_lazy_ptr in SyphonNameboundClient.o
    (maybe you meant: _SyphonServerAnnounceNotification$non_lazy_ptr)

    ld: symbol(s) not found

    And even more weird, listen … what i did was to copy the “emptyExample.xcodeproj” to myApp folder – i thought, if i know how to adapt a project from the emptyExample, i can just fill the emptyExample with the rest of my code- … ok so i opened the “emptyExample.xcodeproj”, add the Syphon and the rest of my addons and classes … and … AGAIN … the same link errors …

    So i think there’s some kind of conflict betwen my addons and ofxSyphon ?