6

I am quite new to the Unix world and I am trying to install a software called Meep for physics simulations. To get this I need to install a lot of libraries on my Mac OS X 10.10.5; I succeeded in many of them but I had the following error while commanding 'configure' for the script called pkg-config which works over glib.

CCLD     pkg-config
Undefined symbols for architecture x86_64:
  "_CFRelease", referenced from:
  _find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
  "_CFStringGetCString", referenced from:
  _find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
  "_CFStringGetCStringPtr", referenced from:
  _find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
  "_CFStringGetLength", referenced from:
  _find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
  "_CFURLCopyFileSystemPath", referenced from:
  _find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
  "_CFURLCreateFromFSRef", referenced from:
  _find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
  "_FSFindFolder", referenced from:
  _find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
  "_kCFAllocatorSystemDefault", referenced from:
  _find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
ld: symbol(s) not found for architecture x86_64

Looking around I have understood that could be a linker problem to those symbols, but essentially I have no idea to solve the problem. Can anybody help me?

G.Gatti
  • 61
  • 1
  • 2

1 Answers1

13

You need to add:

-framework CoreFoundation

to the link command line of your project.

  • I randomly ran into this with a `cmake` project on macOS 10.13.2 and a project that uses `CoreMIDI` and this fixed the problem. – tresf Jan 10 '18 at 02:07
  • I found I also had to add `-framework Carbon`, otherwise `_FSFindFolder` would not be found. – Alberto M Jan 18 '23 at 15:30