I want to compile SNAP (Stanford Network Analysis Project) c++ source code using terminal on mac by running the make all command and I'm getting the following error:
ld: symbol(s) not found for architecture x86_64
Initially I was getting this error:
clang: error: unsupported option '-fopenmp'
but I found that I should replace the g++ in the Makefile.config with gcc-10 which I installed using the homebrew and now I'm getting the architecture error!
I'm on mac os Big Sur 11.0.1 and everything is up to date! Does anyone have any clue?
clang error
architecture error
Makefile.config
Related
I created a small program to learn some concepts of STL, but when I compile, I get following error:
ld: can't open output file for writing: execs/aligns, errno=2 for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Compiled with:
g++ --std=c++17 aligns.cpp -o execs/aligns
I am using M1 MacBook.
Thanks in advance!!!
I have finally found the solution!
Folder 'execs' simply didn't exist)))
I was able to install the pybind11 example here before I upgraded my MacOS. However, after I upgraded my MacOS to Mojave, when I compile the same example on that link, I see the following error:
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'g++' failed with exit status 1
Am I missing a linker command? I've searched online but couldn't find a solution.
I actually found the answer. I only needed to do
export MACOSX_DEPLOYMENT_TARGET=10.9
The installation went smoothly.
while building my Qt project, an iOS app, I'm getting a symbols not found error for a missing architecture (i386).
The project uses subdirs which again contain 2 self written libraries and an app which links to them.
After some investigating I found out that my libraries use armv7 and arm64 while my app uses i386. What I'm getting from this is that the linker doesn't seem to find the libraries with their respective architectures.
This is what I get from the compiler while building:
ld: warning: ld: warning: ignoring file /Users/me/myprojects/build-myproject-iphonesimulator_clang_Qt_5_7_1_for_iOS-Release/install/lib/libwebdav.a, missing required architecture i386 in file /Users/me/myprojects/build-myproject-iphonesimulator_clang_Qt_5_7_1_for_iOS-Release/install/lib/libwebdav.a (2 slices)ignoring file /Users/me/myprojects/build-myproject-iphonesimulator_clang_Qt_5_7_1_for_iOS-Release/install/lib/libcommon.a, missing required architecture i386 in file /Users/me/myprojects/build-myproject-iphonesimulator_clang_Qt_5_7_1_for_iOS-Release/install/lib/libcommon.a (2 slices)
Undefined symbols for architecture i386:
"CalendarEvent::staticMetaObject", referenced from:
qt_meta_extradata_QMLEventWrapper in moc_qmleventwrapper.o
int qRegisterMetaType(char const*, CalendarEvent::APM_TYPE*, QtPrivate::MetaTypeDefinedHelper::Defined) && (!(QMetaTypeId2::IsBuiltIn))>::DefinedType) in moc_qmleventwrapper.o
"CalendarEvent::colorHex() const", referenced from:
QMLEventWrapper::color() const in qmleventwrapper.o
...
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
...
** BUILD FAILED **
The following build commands failed:
Ld myproject.build/Release-iphonesimulator/myproject.build/Objects-normal/i386/myproject normal i386
(1 failure)
make[1]: * [xcodebuild-release-iphonesimulator] Error 65
make: * [sub-app-make_first] Error 2
Thanks in advance
You are trying to run it on an simulator, which supports architectures i386/x86_64 (the processor of your computer).
Workaround:
Test on a device instead of the simulator
Solution:
Build all used libraries for i386/x86_64 also.
Turned out it was a bug in qmake.
In a very desperate attempt I installed Qt 5.8.0 and tried compiling again. Worked like a charm.
I was using Qt 5.7.1 before which tried to build the libraries for the iPhone instead of the simulator resulting in the wrong architecture.
See https://bugreports.qt.io/browse/QTBUG-58007
Trying to incorporate Vimeo SDK from github into my iOS project.
Xcode 7.3.1
I have cocoa pods installed and my TestVimeo1 project setup but when I attempt target VIMNetworking, AFNetworking and VIMObjectMapper I must not be going about this correct.
ld: warning: directory not found for option '-L/Users/xxxxx/xcodebuild/_buildoutput/TestVimeo1-fktedyrxeulxmicndbpgghnbdjtn/Build/Products/Debug-iphonesimulator/AFNetworking'
ld: warning: directory not found for option '-L/Users/xxxxx/xcodebuild/_buildoutput/TestVimeo1-fktedyrxeulxmicndbpgghnbdjtn/Build/Products/Debug-iphonesimulator/VIMNetworking'
ld: warning: directory not found for option '-L/Users/xxxxx/xcodebuild/_buildoutput/TestVimeo1-fktedyrxeulxmicndbpgghnbdjtn/Build/Products/Debug-iphonesimulator/VIMObjectMapper'
ld: library not found for -lAFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can't find the output directories. Where am I going wrong with setting up the target builds for these git submodules? Thanks!
I am trying to make a demo cryptocurrency based on litecoin but before even starting to do this, I am currently unable to compile litecoin (unaltered) source code into litecoind.
First I installed the dependencies using Macports:
sudo port install boost db48 qt4-mac openssl miniupnpc git
Cloned from github. (https://github.com/litecoin-project/litecoin.git)
In terminal navigated to the src folder and ran:
make -f makefile.osx USE_UPNP=-
It starts compiling and then gives me the following error:
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: * [litecoind] Error 1
I have xcode and have a bit of programming knowledge, but please try and explain in simple terms how to fix this.
Thanks!