Qt, clang & PortAudio: what does those errors mean? - c++

I write a cross-platform audio processing program. It uses Qt 5 and PortAudio library. The platform is Mac OS X Yosemite, clang compiler, Qt Creator 3.4.1 IDE. I got those linker errors:
Undefined symbols for architecture x86_64:
"_ellie2", referenced from:
_main in eltst.o
"_hypergl", referenced from:
_main in ltstd.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What does it mean and what needs to do?

Related

My macOS project build failed after upgrade to Xcode9

here is the error description:
Undefined symbols for architecture x86_64: "_verify", referenced
from:
_HIDGetDeviceInfo in HIDUtilities.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code
1 (use -v to see invocation)
It happened after upgrade Xcode to version 9.1
HIDUtilities.o is not third-party SDK, HIDUtilities.h and HIDUtilities.c are files in my project.
Any suggestion is appreciated, thanks in advance.

Linker Error in Xcode 8.1 when trying to build UETorch

I've been trying to build UETorch for OSX 10.12 using Xcode and have encountered the following error:
Undefined symbols for architecture x86_64:
"FlushRenderingCommands()", referenced from:
_CaptureScreenshot in Module.UETorch.cpp.o
InitCapture(UObject*, IntSize const*, FViewport**, APlayerController**, UWorld**, FSceneView**) in Module.UETorch.cpp.o
"FSlateApplication::CurrentApplication", referenced from:
_CaptureScreenshot in Module.UETorch.cpp.o
FSlateApplication::Get() in Module.UETorch.cpp.o
"FSlateApplication::TakeScreenshot(TSharedRef<SWidget, (ESPMode)0> const&, FIntRect const&, TArray<FColor, FDefaultAllocator>&, FIntVector&)", referenced from:
_CaptureScreenshot in Module.UETorch.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It seems like the ld: symbol(s) not found... part is often fixed by using libstdc++ instead of libc++ and I have tried adding -stdlib=libstdc++ to "Other Linker Flags" as well as linking libstdc++.6.0.9.dylib in the Build Phases section but I am still getting the same error.
I don't have the reputation to comment hence adding it here, you get undefined symbols when you try to use the symbol/Call the function and the linker can not find its definition. So if the definition is from some library then add it during your linking stage.
You can check if the definition is present or not in the library by using nm command, e.g. "nm -D"

Working on CS106B through SEE, continued "ld: symbol(s) not found for architecture x86_64" errors when using their libraries

I'm using Eclipse and have been including the relevant libraries in the project folder as I build. Now that I'm a bit further in the course, I'm trying to
#include "vector.h"
but building gives 16 warnings that look like:
In file included from ../CS106B_Prog_Ass01_05.cpp:6:
Finished building: ../CS106B_Prog_Ass01_05.cpp
../vector.h:560:26: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
and the following error that prevents the project from building:
Undefined symbols for architecture x86_64:
"mainWrapper(int, char**)", referenced from:
_main in CS106B_Prog_Ass01_05.o
"__mainFlags", referenced from:
_main in CS106B_Prog_Ass01_05.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [CS106B_Prog_Ass01_05] Error 1
I would love to simply link to the library folder, but that results in a similar error even if I switch it to a different architecture. Has anyone had this problem?

Apple Mach-O linker error: Undefined symbols for architecture i386 Google Protobuf

I am trying to use Protobuf 2.6 with Xcode version 6.3. I've added the libprotobuf-lite.a to my Demo application and added the path to the Header files in the Header Search Paths., but I am getting this error.
Undefined symbols for architecture i386:
"google::protobuf::io::StringOutputStream::StringOutputStream(std::string*)",
referenced from:
attributes::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)
in attributes.pb.o ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see
invocation)

Installing Boost On Mac Issues

Has anyone had this issue on mac while installing boost or know how to fix? I seem to have everything together but this error. I am using OS X 10.10 & and Xcode 6.1.1.
This is what I used for the install and to make the framework.
http://freddy.cellcore.org/post/79587278354/boost-c-libraries-on-osx-xcode-5
https://gist.github.com/faithfracture/c629ae4c7168216a9856
-------------ERROR BELOW---------------
Undefined symbols for architecture x86_64:
"boost::unit_test::unit_test_main(bool (*)(), int, char**)", referenced from:
_main in test.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)