Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

258
Visualizações
Undefined symbols for architecture x86_64 on Xcode 6.3

I'am finalising an Open Source C coded CometD library, I thought it would be a good idea to open it to OSX/iOS users, like myself.

In order to ease up the work for OSX/iOS developers I wanted to switch from a static C library to a Xcode iOS Static Libary. So I have followed advices found on the net, and generated a static iOS compatible library.

The problem is that, each time when I am trying to use it, I get an error of type :

Undefined symbols for architecture x86_64: ******, referenced from: -********** in *******.a(*******.o)

This error get repeated for almost every C function that I have in my library.

First I thought maybe the library is not x86_64 compatible, empty, or really doesn't have any x86_64 symbol in it.

So I have checked with a "lipo -info" on the library and here is the answer :

enter image description here

To really be sure i also used "nm -arch x86_64" on the library, and went fetching for several undefined functions reported by Xcode as errors. I thought i will be wrong and find nothing but guess what ?

I found the symbols : enter image description here

enter image description here

So my question is :

If the symbols are present in a x86_64 compatible library, why Xcode prompting this error ? Even if I compiling the library for all arm*/s types I am still getting this x86_64 error.

Am I unaware of something or am I just doing it wrong ?

Your answers are always appreciated.

Update (This is the link to the Xcode Project) : https://github.com/GhostGumm/CometD-x86_64-issue

Update 2 : Mr Trojanfoe attracted my attention on a linking Warning I had when compiling. Indeed the linker seemed to miss load the library looking for a directory that doesn't existed. After moving the library to the right directory, linking it manually, the x86_64 error disappeared.

Sadly the problem is still present. Just after a successful compilation, i tried to use the lib , but, when I "alloc" and "init" my main class like so :

  ZetaFactory *Client = [[ZetaFactory alloc] init]; 

The x86_64 error comes back roaring with the genuine fierce of a billion suns. I posted the link to the Xcode project, please feel free to test it as i don't have any more ideas on how to fix it, but more importantly why and where this gets buggy.

None the less I will continue to investigate.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I downloaded and tried to build your project. Looking at the link errors - init_stack_remove_data not found, for example - they're correct. There is no definition of init_stack_remove_data anywhere in your project source.

In the "nm -arch x86_64" output that you cite above, please note that the "U" before a function definition indicates a use of that function, not a definition of it. The nm output is showing that the linker is correct - those functions are called by your code, but are never defined. When they're defined, you'll see a "T" before the function in the nm output.

You need to update your project with the rest of the necessary source before it'll link without errors.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda