Giter VIP home page Giter VIP logo

Comments (7)

E-B-Smith avatar E-B-Smith commented on June 25, 2024

Make sure that Utilities.m from the ProtocolBuffers run time is included
and linked to your project.

On Wed, Aug 26, 2015 at 12:21 PM, albright888 [email protected]
wrote:

It seems no matter what I try, I cannot get around a link problem in my
project:

Undefined symbols for architecture arm64:
"computeDoubleSize(int, double)", referenced from:
-[SCFrameScores serializedSize] in Asap.pb.o
"computeFloatSize(int, float)", referenced from:

It is the same for all architectures I try to build for : i386 or x86_64
or arm64
It seems that my project is not finding the protobuf library. I have tried:

  • adding ProtocolBuffers.xcodeproject as a sub projet - same problem
  • using Cocoapods to install ProtocolBuffers (1.9.8) - same problem
  • building ProtcolBuffers.xcodeproject's framework and adding manually
    to my project - same problem

I imagine it is some simple change, but I can't seem to find it.

Thanks for your help!


Reply to this email directly or view it on GitHub
#56.

::: E.B. Smith
::: [email protected]
::: gmail

from protobuf-objc.

albright888 avatar albright888 commented on June 25, 2024

The ProtcolBuffers.xcodeproject seems to have the Utilities.m is included in the ProtocolBuffers.framework build settings, so if I include this framework in my project, I should have that correct?
It is the case that all the Undefined symbols are methods from the Utilities.m file however. If I run 'nm ProtocolBuffers.framework/ProtocolBuffers' it appears these methods are in there.
I am confused.

from protobuf-objc.

E-B-Smith avatar E-B-Smith commented on June 25, 2024

Huh. If 'nm' says it's there, it is.

It seems obvious, but is the linker search path set correctly?

::: E.B. Smith
::: [email protected]
::: https://shimmering.blue
::: gmail

On Wed, Aug 26, 2015 at 2:25 PM, albright888 [email protected]
wrote:

The ProtcolBuffers.xcodeproject seems to have the Utilities.m is included
in the ProtocolBuffers.framework build settings, so if I include this
framework in my project, I should have that correct?
It is the case that all the Undefined symbols are methods from the
Utilities.m file however. If I run 'nm
ProtocolBuffers.framework/ProtocolBuffers' it appears these methods are in
there.

I am confused.


Reply to this email directly or view it on GitHub
#56 (comment)
.

from protobuf-objc.

albright888 avatar albright888 commented on June 25, 2024

OK, I think I found the smoking gun. I tried a completely clean iOS project, brought in my generated proto objective-c classes, and it was working fine.
I discovered that my project had "Compile Source As" setting to Objective-C++. Turning this to "According to File Type" fixed this issue. I'm not exactly sure why the Objective-C++ setting causes these Utilities.m methods to not be found, but it does in both my projects.

from protobuf-objc.

E-B-Smith avatar E-B-Smith commented on June 25, 2024

When that option is set I think it is using C++ name mangling on the
compiled functions, and then the linker is looking for the un-mangled names.

::: E.B. Smith
::: [email protected]
::: https://shimmering.blue
::: gmail

On Fri, Aug 28, 2015 at 8:57 AM, albright888 [email protected]
wrote:

OK, I think I found the smoking gun. I tried a completely clean iOS
project, brought in my generated proto objective-c classes, and it was
working fine.
I discovered that my project had "Compile Source As" setting to
Objective-C++. Turning this to "According to File Type" fixed this issue.
I'm not exactly sure why the Objective-C++ setting causes these Utilities.m
methods to not be found, but it does in both my projects.


Reply to this email directly or view it on GitHub
#56 (comment)
.

from protobuf-objc.

E-B-Smith avatar E-B-Smith commented on June 25, 2024

Glad you've resolved this.

::: E.B. Smith
::: [email protected]
::: https://shimmering.blue
::: gmail

On Fri, Aug 28, 2015 at 9:01 AM, Edward Smith [email protected] wrote:

When that option is set I think it is using C++ name mangling on the
compiled functions, and then the linker is looking for the un-mangled names.

::: E.B. Smith
::: [email protected]
::: https://shimmering.blue
::: gmail

On Fri, Aug 28, 2015 at 8:57 AM, albright888 [email protected]
wrote:

OK, I think I found the smoking gun. I tried a completely clean iOS
project, brought in my generated proto objective-c classes, and it was
working fine.
I discovered that my project had "Compile Source As" setting to
Objective-C++. Turning this to "According to File Type" fixed this issue.
I'm not exactly sure why the Objective-C++ setting causes these Utilities.m
methods to not be found, but it does in both my projects.


Reply to this email directly or view it on GitHub
#56 (comment)
.

from protobuf-objc.

albright888 avatar albright888 commented on June 25, 2024

Yes, thanks for your help - and nice work on this package!

from protobuf-objc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.