Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS. Cannot run a project after updating cocos2d library inside this project
    primarykey
    data
    text
    <p>It cannot compile sources and writes:</p> <blockquote> <p>Undefined symbols for architecture i386:<br> "_CTFontManagerRegisterFontsForURL", referenced from: -[CCLabelTTF getFontName:] in CCLabelTTF.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)</p> </blockquote> <p>but when I replace all the code in the following function in CCLabelTTF with "return nil":</p> <pre><code>- (NSString*) getFontName:(NSString*)fontName { // Custom .ttf file ? if ([[fontName lowercaseString] hasSuffix:@".ttf"]) { // This is a file, register font with font manager NSString* fontFile = [[CCFileUtils sharedFileUtils] fullPathForFilename:fontName]; NSURL* fontURL = [NSURL fileURLWithPath:fontFile]; CTFontManagerRegisterFontsForURL((CFURLRef)fontURL, kCTFontManagerScopeProcess, NULL); return [[fontFile lastPathComponent] stringByDeletingPathExtension]; } return fontName; } </code></pre> <p>then I can compile my code but I cannot use labels.</p> <p>So how to solve this without creating of a new project and copying all the sources to it?</p> <p><strong>EDITED</strong></p> <p>Previous version is 2.x, now I have the last rc2 version.</p> <p>I have deleted all the files of the old library, copied the files from the new library into the project folder and added them to project via xcode. xcode can create projects with a new library files, so I took them from this new project. Then I made some changes to remove warnings.</p>
    singulars
    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.
 

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