Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you remove the <code>cMesh</code> constructor, then you are then using the default (no argument, no body) <code>cMesh</code> 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 <code>cMesh</code> 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.</p> <p>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 <code>cMesh</code> constructor. A lot of times with virtual base classes, you may forget to define <em>and</em> 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 <code>#include</code>d correctly. This could compile fine but result in linker errors like you're seeing.</p> <p>If Xcode isn't showing you the full linker error, show the Log Navigator (<kbd>Command ⌘</kbd>+<kbd>7</kbd>), 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 <code>xcodebuild</code> in the Terminal.</p> <p>If it's <strong>not</strong> 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:</p> <ol> <li>In the Xcode Organizer <kbd>Shift ⇧</kbd>+<kbd>Command ⌘</kbd>+<kbd>2</kbd>, click Projects and find the path to the DerivedData for your project.</li> <li>In the Terminal, navigate to that directory (<code>cd ~/Library/Developer/Xcode/DerivedData/proj-&lt;random value&gt;/</code>)</li> <li>Remove (or move aside) the Build directory (<code>rm -r Build</code>)</li> <li>In Xcode, try to build with the <code>cMesh</code> constructor present.</li> <li>Find the Library product file (<code>cd Build/Products/&lt;scheme&gt;-iphoneos</code>)</li> </ol> <p>Your compiled static libraries (<code>&lt;libname&gt;.a</code>) 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 <code>otool -vh &lt;library&gt;.a</code>. You should see something like:</p> <pre><code>$ 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 </code></pre> <p>As you can see, my test library was built for ARMv7.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COThe issue is really strange... XCode didn't report the symbol or at least it did look like it was the whole class missing. I start removing pieces until I manage to narrow down the problematic symbol. It is the destructor of cResource. There is nothing special about it, I manage to make it empty public virtual destructor. If I make the destructor inline I can link, if it's defined in the .cpp then it doesn't link. My constructor is also in the same .cpp file also few other function and they don't seem to be a problem.
      singulars
    2. COMy code base is massive build in over 3 years of work. cResource is used everywhere in it. And since I currently have active projects that don't use Components and they work just fine also my Component app compiles and links under MSVS... I think it may be some compiler/linker issue. I'll give it another try to figure out some more information about this.
      singulars
    3. COThe missing symbols will appear immediately before "ld: symbol(s) not found for architecture." If you're having the problem where the implementation in the .h works but symbol not found in the .cpp, are you *sure* the .cpp is getting build into the library? Sounds like it's only getting build because it's being included in another translation unit. This could be problem with a circular dependency in your libraries (sounds like you have several static libraries which uses other static libraries).
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload