Or you can generally use some shortcuts with apple tools: grady$ clang++ main.cpp -arch i386 -arch x86_64 -ofat2.outįat2.out: Mach-O universal binary with 2 architecturesįat2.out (for architecture i386): Mach-O executable i386įat2. Grady$ lipo -arch i386 32.out -arch x86_64 64.out -create -output fat.outįat.out: Mach-O universal binary with 2 architecturesįat.out (for architecture i386): Mach-O executable i386įat.out (for architecture x86_64): Mach-O 64-bit executable x86_64 Then: grady$ clang++ main.cpp -m64 -o64.out #Grammarly for mac os x 10.7.5 code#then use lipo to combine them.Ĭonsider nominal C++ code is stored in main.cpp You have a couple of ways to do this, one if to build explicitly with 32-bit and explicitly with 64-bit. I think you are trying build a fat 32/64 bit library. I am sort of lazy and not going to read this, so feel free to vote down. #Grammarly for mac os x 10.7.5 64 bits#So it seems that although the machine A and machine C are both 64 bits they don't use the same stdlib by default which caused the error Undefined symbols for architecture x86_64. Mac OS X Lion 10.7.5 free download standalone DMG image installer for Macintosh. Running g++ with the option -v allowed me to notice the default stdlib was libc++and not libstdc++. Finally, if you want to run a parallel copy of Mac OS X on a virtual. On machine C, when I add to the g++ command the option -stdlib=libstdc++, the "undefined symbols" error disappear and the executable is running correctly. Can anyone please explain what I am missing here? I would have expected the linking problem with machine B that is 32bits and not with machine C that is 64bits but I got the opposite. Ld: symbol(s) not found for architecture x86_64Ĭlang: error: linker command failed with exit code 1 (use -v to see invocation)Īdditional Info on Machine C g++ -versionĬonfigured with: -prefix=/Applications/Xcode.app/Contents/Developer/usr -with-gxx-include-dir=/usr/include/c++/4.2.1Īpple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) "std::basic_ostream >& std::operator >(std::basic_ostream >&, char const*)", referenced from: SimpleClass::SimpleClass() in libtest_sc.a(SC.o) Std::cout >& std::endl >(std::basic_ostream >&)", referenced from: I build a library on machine A, a 2 years old mac with OS x 10.7.5 (that I guess is 64 bits my guess being based on the commands you will see below in Additional Info) using the following files.Ī header SimpleClass.hpp: #ifndef SIMPLECLASS_HPPĪ source file SimpleClass.cpp: #include "SimpleClass.h" So I decided to give an example of situations I face and that I can not understand. Machine type (C++ librairies) : i386 vs x86_64īut I guess I did a mistake by being not precise. Mac OS X Lion 10.7.5 Overview OS X Lion is a stable Mac OS release providing a bundle of powerful features to enhance the performance of the operating system along with various improvements and enhancements. Based on the de facto-standard for X11, the open source. #Grammarly for mac os x 10.7.5 install#I sent a post about my confusion earlier this morning To install AVG, you need to upgrade your Mac computer to latest version and after which you will be able to install AVG without any issue. X11 for Mac OS X offers a complete X Window System implementation for running X11-based applications on Mac OS X. If you fall on this post, you may want to jump directly to the answer
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |