Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

std::terminate undefined in Cocoa App

Tags:

xcode

cocoa

I have a Cocoa app that compiles and links fine. I've since broken out some of the code into a static library and then have gone back and tried to link that libMyLib.a library to my original program.

I now get a linker error

Undefined symbols for architecture x86_64:
  "std::terminate()", referenced from:

referencing one of the source modules that use to live in my main project, but now lives in the library.

I've tried to go back and match up each compiler and linker setting to see which one is different, but I just can't seem to nail it down. My hunch is that I'm linking with a C STD and need a C++ STD, but everything is using the C99 compiler with standard libs.

Any ideas?

Thanks!

like image 436
WebDrive Avatar asked Oct 23 '12 23:10

WebDrive


1 Answers

linking in libc++.dylib fixed the issue

like image 159
WebDrive Avatar answered Nov 13 '22 12:11

WebDrive