• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Framework linking error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Framework linking error


  • Subject: Re: Framework linking error
  • From: Livio Isaia <email@hidden>
  • Date: Sat, 05 Jul 2014 14:55:26 +0200


Il giorno 04/lug/2014, alle ore 22:09, Jens Alfke <email@hidden> ha scritto:


On Jul 4, 2014, at 6:30 AM, Livio Isaia <email@hidden> wrote:

Now, in ViewerCocoa.mm I just make a call to the inline function of the header (with only 1 parameter)

Yes, and this expanded into a call to the version with 2 parameters.

and cannot understand where should be a function readNodeFile with 4 parameters.

It doesn’t have 4 parameters. If you read the message carefully, it has 2 parameters; the first parameter is a std::string expressed as the full template expansion info basic_string that itself has 2 parameters. So the linker error does in fact refer to the function that you called (via the inline function.)

(Making sense of compiler errors is one of my least favorite aspects of C++ :-p Although I must say that Clang’s error messages are actually much, much more readable than GCC’s.)

The error implies that the function isn’t exported from the library. Probably the library was built with no exported symbols, or all the symbols were stripped. You’ll have to look at the linker and deployment build settings of the target that built the library. The ‘nm’ tool is also very useful as a way to check what’s actually exported.

—Jens

Hi,
thanks for replying.

I checked the framework with ‘nm’ and the function is shown as (__TEXT,__text) external:

(__TEXT,__text) external __ZN5osgDB12readNodeFileERKSsPKNS_7OptionsE

and in the header is declared as:

extern OSGDB_EXPORT osg::Node*  readNodeFile(const std::string& filename,const Options* options);

Shouldn’t it be ok?

Is it possible that the framework was not built for ox 10.9 (I didn’t compile it myself)? 
Or may be it’s corrupted somehow?

Thanks again in advance,
regards,
livio

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Framework linking error
      • From: Nick Blievers <email@hidden>
References: 
 >Re: Framework linking error (From: Jerry Krinock <email@hidden>)
 >Re: Framework linking error (From: Livio Isaia <email@hidden>)
 >Re: Framework linking error (From: Jens Alfke <email@hidden>)

  • Prev by Date: Swift crash in dispatch_apply
  • Next by Date: Is Swift really swift?
  • Previous by thread: Re: Framework linking error
  • Next by thread: Re: Framework linking error
  • Index(es):
    • Date
    • Thread