Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7087459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:40:37+00:00 2026-05-28T07:40:37+00:00

I have Core static library, a few Component static libraries that relays on the

  • 0

I have Core static library, a few Component static libraries that relays on the Core one, and then there is an App that links against both Core and Component libraries. My App can link both against Core and Component as long as Component don’t uses classes from Core (App uses classes from Core).

I got the following error in both armv6 and armv7 versions. So my problem is not the very popular linking issue that everyone has.

ld: symbol(s) not found for architecture armv6
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I added reference to Core in Component and even added it in “Link Binary With Libraries” which shouldn’t be necessary for static lib.

Since I start having this issue I start doubting my design… It probably makes more sense in dynamically linking environment but still it should be doable in static one, especially since this already works under Windows with MSVC compilers.

Edit:
I made some progress! Although I still don’t know where to go with it.

Here is my setup:

  • Core has a class cResourceManager that has a templated method GetResource<T>(int id)

  • Core also has class cResource

  • Component has class cMesh that inherits cResource

Here are some tests:

  • If I try from App to call rm->GetResource<cMesh>(…) I get the linking error

  • If I try from App to construct cMesh I get linking the linking error

  • If I try from App to call static method that will return new instance of cMesh I get the linking error

  • If I comment out the construction of cMesh but leave other member cMesh function calls the App links fine. I can even call delete mesh.

I have never seen anything like it!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:40:37+00:00Added an answer on May 28, 2026 at 7:40 am

    If you remove the cMesh constructor, then you are then using the default (no argument, no body) cMesh constructor that is given to you. It almost sounds like there’s a build error or missing code as a result of some code in your cMesh constructor and so the library isn’t actually getting generated, and perhaps Xcode isn’t reporting the error. Xcode is no good at reporting linker errors.

    I would suggest looking at what symbols the linker says are missing and double-check that they are actually defined in your code. My guess is that you’re using one of those symbols in your cMesh constructor. A lot of times with virtual base classes, you may forget to define and implement a method or two in a child class. Could be a result of missing a method based on your template, or your template isn’t #included correctly. This could compile fine but result in linker errors like you’re seeing.

    If Xcode isn’t showing you the full linker error, show the Log Navigator (Command ⌘+7), double-click the last “Build ” entry, select the error, and then press the button on the far-right of the row that appears when selected. The symbols should be listed there. If not, it’s time for xcodebuild in the Terminal.

    If it’s not that case, I’d be interested in seeing the results of whether or not the library is being built for the appropriate architecture, or maybe this can spur some progress:

    1. In the Xcode Organizer Shift ⇧+Command ⌘+2, click Projects and find the path to the DerivedData for your project.
    2. In the Terminal, navigate to that directory (cd ~/Library/Developer/Xcode/DerivedData/proj-<random value>/)
    3. Remove (or move aside) the Build directory (rm -r Build)
    4. In Xcode, try to build with the cMesh constructor present.
    5. Find the Library product file (cd Build/Products/<scheme>-iphoneos)

    Your compiled static libraries (<libname>.a) should be in this directory. If they’re not there, they didn’t build (unless you put your products elsewhere). If your libraries are there, let’s confirm that they actually are getting built for the appropriate architecture. Run otool -vh <library>.a. You should see something like:

    $ otool -vh libtesting.a 
    Archive : libtesting.a
    libtesting.a(testing.o):
    Mach header
          magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
       MH_MAGIC     ARM         V7  0x00      OBJECT     3       1928 SUBSECTIONS_VIA_SYMBOLS
    

    As you can see, my test library was built for ARMv7.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created an application core, in C++, that I've compiled into a static library
I'm currently developing an app that uses Core Data. I'm using two stores/configurations, one
I have an ios app that has alot of static content and static settings.
We have a core library in the form of a DLL that is used
I just got a project that have some core classes that uses static methods.
I have a core file generated on a remote system that I don't have
I have a CORE class that pertains only to my specific site, ie, it
I have a Core Data based mac application that is working perfectly well until
If I have the core of a class defined in one file as public
I'm working on an armv6 core and have an FIQ hander that works great

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.