Question

Duplicate symbol during linking phase was covered here several times. But i found no answer for this case:

I have own library writen in c++ for objective-c app. To use c++ logic from lib i have change file extension from .m to .mm wich works like a charm. Problems begins when i want to have more than one .mm file. Linker throws at me error duplicate symbol __instance in: and ld: 1 duplicate symbol for architecture i386.

  • I haven't used or declared symbol __instance anywhere in c++ code.
  • I dont need to use or import c++ code to get this errors.
  • There's no duplicated files in compile sources phase
  • Every target in project has set iOS architecture, not i386
Was it helpful?

Solution

The problem was in incorrect implementation of instance method in one class.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top