I'm probably missing something simple, but I'm getting the following linker error when trying to build:
Undefined symbols for architecture i386:
"CAStreamBasicDescription::CAStreamBasicDescription()", referenced from:
-[AudioController initializeAUGraph] in AudioController.o
-[AudioController .cxx_construct] in AudioController.o
"CAStreamBasicDescription::AsString(char*, unsigned long) const", referenced from:
CAStreamBasicDescription::PrintFormat(__sFILE*, char const*, char const*) const in AudioController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I can't figure out what's going on here as the compiler is finding CAStreamBasicDescription.h just fine. I've seen suggestions of clearing the framework search path when encountering this type of error, but there's nothing in that path. Probably something simple, but I feel like I'm drinking from a fire hose. Thanks!
Have you added CAStreamBasicDescription.cpp to your project also? It's part of the unofficial Core Audio SDK, so it isn't available unless you compile it yourself.
Related
I am working on a flutter project. My project includes tflite and amplify packages. it works fine with android but whenever I try to build it in Xcode I am getting this following errors:
Undefined symbols for architecture arm64:
"OBJC_CLASS$_FlutterStandardTypedData", referenced from:
objc-class-ref in tflite(TflitePlugin.o)
enter code here
"_FlutterMethodNotImplemented", referenced from:
-[TflitePlugin handleMethodCall:result:] in tflite(TflitePlugin.o)
"OBJC_CLASS$_FlutterMethodChannel", referenced from:
objc-class-ref in tflite(TflitePlugin.o)
"OBJC_METACLASS$_FlutterAppDelegate", referenced from:
OBJC_METACLASS$_AppDelegate in AppDelegate.o
"OBJC_CLASS$_FlutterAppDelegate", referenced from:
OBJC_CLASS$_AppDelegate in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please help me with this. I have been stuck with this issue for more than a week now. Thank you.
I have added a snippet from Xcode which shows the current settings for Architectures. There are past suggestions to add arm64 as a Valid architectures. However, as you see there is no option for that. I added arm64 in excluded architectures as shown in the picture. It didn't work for me.
I have seen similar issues on here which has led me to believe i need to link binary files with library. However, i cannot figure out which ones i need, can any one help me with this ? I have macOS catalina 10.15.3, xcode 10.3, gamemaker 2.2.5.481 and runtime v2.2.5.378
here is my error message:
Undefined symbols for architecture x86_64:
"___isPlatformVersionAtLeast", referenced from:
UpdateIOSControllers() in libyoyo_interpreted.a(IOSGamepad.o)
_SetHomeIndicatorDeferOption in libyoyo_interpreted.a(RunnerViewController.o)
-[RunnerViewController viewDidLoad] in libyoyo_interpreted.a(RunnerViewController.o)
Achievement_TeamPlayerID() in libyoyo_interpreted.a(YoYo_GameCenter.o)
Achievement_GamePlayerID() in libyoyo_interpreted.a(YoYo_GameCenter.o)
PB_Challenges(HTTP_REQ_CONTEXT*, void*, int*) in libyoyo_interpreted.a(YoYo_GameCenter.o)
PB_PlayerPic(HTTP_REQ_CONTEXT*, void*, int*) in libyoyo_interpreted.a(YoYo_GameCenter.o)
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Bluetooth gamepad support is added in iOS 13, which requires XCode 11 to work; you probably only need to upgrade xcode.
Reference:
https://forums.developer.apple.com/thread/123003
About a week ago I moved from Windows and Visual Studio to Mac and Xcode. I want to be able to work on my project on Mac, so I decided to port it.
First of all I need test to work on Mac and Google provides instructions about how to do so. After I build test with my Xcode, I can see three files in the output directory: test.framework, libgtest_main.a and libgtest.a.
Documentation says I need to link test.framework with my project. So, I create new console app project and link it with test.framework file.
Unfortunately my build fails with about 70+ issues. After I link librettist.a to my project, it fails with only 2 issues. Here they are:
Undefined symbols for architecture x86_64:
"testing::internal::EqFailure(char const*, char const*,
std::__1::basic_string,
std::__1::allocator > const&, std::__1::basic_string, std::__1::allocator > const&,
bool)", referenced from:
testing::AssertionResult testing::internal::CmpHelperEQ(char const*, char const*, int const&, int const&) in main.o ld:
symbol(s) not found for architecture x86_64 clang: error: linker
command failed with exit code 1 (use -v to see invocation)
As I understood, linker cannot resolve symbols. If I link my project with libgtest_main.a it changes nothing and this error is still here. So, how can I fix it?
I had the same problem and was unable to figure out why this isn't being created. It does work fine on some 32 bit code, so I'm equally puzzled.
That said, the sample in the gtest package has the following comment:
EXPECT_EQ(expected, actual) is the same as EXPECT_TRUE((expected) ==
(actual)) except that it will print both the expected value and the
actual value when the assertion fails. This is very helpful for
debugging. Therefore in this case EXPECT_EQ is preferred.
and the same is true for ASSERT_EQ and ASSERT_TRUE. So if you make the substitution, you lose some information in the case of failure, but at least you can use it.
Hi, I am using Xcode 4 and trying to set up FLTK 1.3.0 to run Bjarne
Stroustrup's Chapter 12 FLTK Demo at the end of the chapter. I keep
getting the following error when compiling, and have no idea where to go.
I have an idea it might have to do with the linker flags, but I don't know
what flag to add and where...
Here's the error:
Undefined symbols for architecture x86_64:
"Fl_JPEG_Image::Fl_JPEG_Image(char const*)", referenced from:
Graph_lib::Image::Image(Point, String,
Graph_lib::Suffix::Encoding) in Graph.o
"Fl_GIF_Image::Fl_GIF_Image(char const*)", referenced from:
Graph_lib::Image::Image(Point, String,
Graph_lib::Suffix::Encoding) in Graph.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
Are you passing the linker flags present with --use-images? try:
> fltk-config --use-images --ldflags
and check the results to make sure you're getting either the system image libs, or the ones optionally built with fltk.
I also found this to be quite useful:
fltk-config --compile test.cpp
It worked perfectly for me.
For more examples of using fltk-config check out http://www.fltk.org/doc-1.1/basics.html
I'm using Qt4.8 on OSX Leopard and instead of qmake+QtCreator I want to compile a very simple project using CMake on OSX to understand how to do a package.
While the very same project compiles and links smoothly under Linux, under my OSX box, this is the error message I always get in the linking phase:
ld warning: in /Library/Frameworks//QtGui.framework/QtGui, file is not of required architecture
ld warning: in /Library/Frameworks//QtCore.framework/QtCore, file is not of required architecture
Undefined symbols:
"QWidget::mousePressEvent(QMouseEvent*)", referenced from:
vtable for TestFormin moc_TestForm.cxx.o
"QObject::childEvent(QChildEvent*)", referenced from:
vtable for TestFormin moc_TestForm.cxx.o
"QWidget::actionEvent(QActionEvent*)", referenced from:
vtable for TestFormin moc_TestForm.cxx.o
"QCoreApplication::translate(char const*, char const*, char const*, QCoreApplication::Encoding)", referenced from:
etcetera etcetera.
This happens for every project I want to compile with cmake.
Any idea of what's going on?
Check what architecture (i386,x86_64) is being used by cmake (CMAKE_OSX_ARCHITECTURES). Try suggesting the architecture to cmake:
cmake -DCMAKE_OSX_ARCHITECTURES=x86_64