linker

build for ARMv6 with gnueabihf

浪子不回头ぞ 提交于 2019-12-23 23:37:49
问题 I try to build an app for ARMv6 but, fail. I guess the problem is the Toolchain which supports Hard Float but, ARMv6 does not. Well, first i set -march=armv6, where compilation fails. /opt/gcc-linaro-arm-linux-gnueabihf-4.8-2014.03_linux/arm-linux-gnueabihf/libc/usr/include/bits/byteswap.h: In function ‘__bswap_32’: /opt/gcc-linaro-arm-linux-gnueabihf-4.8-2014.03_linux/arm-linux-gnueabihf/libc/usr/include/bits/byteswap.h:45:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI Additionally, i

how to prevent linker from discarding a function?

我只是一个虾纸丫 提交于 2019-12-23 22:26:32
问题 I have a function in my C code that is being called implicitly, and getting dumped by the linker. how can I prevent this phenomena? I'm compiling using gcc and the linker flag -gc-sections, and I don't want to exclude the whole file from the flag. I tried using attributes: "used" and "externally_visible" and neither has worked. void __attribute__((section(".mySec"), nomicromips, used)) func(){ ... } on map file I can see that the function has compiled but didn't linked. am I using it wrong?

iOS conditional link static library

本秂侑毒 提交于 2019-12-23 22:13:56
问题 I have a fat static library compiled for armv7 and i386. In my iPhone/iPad project everything works fine, but i can only install my application on armv7 device so iPhone 3gs and up... There is a way to run my project on armv6 so i can install it on an ipod touch and an old iphone version (also if i disable the use of armv7 library). I try this: #ifdef _ARM_ARCH_7 ... //include and use of armv7 library #else ... //not include armv7 library #endif but when i compile my project i have link error

Boost link error when using “--layout=system” on VS2005

梦想与她 提交于 2019-12-23 21:33:32
问题 I'm new to boost, and thought I'd try it out with some realistic deployment scenarios for the .dlls, so I used the following command to compile/install the libraries: .\bjam install --layout=system variant=debug runtime-link=shared link=shared --with-date_time --with-thread --with-regex --with-filesystem --includedir=<my include directory> --libdir=<my bin directory> > installlog.txt That seemed to work, but my simple program (taken right from the "Getting Started" page) fails: #include

Linker gives error “undefined symbol” for integral static const members used in certain contexts [duplicate]

拜拜、爱过 提交于 2019-12-23 21:13:12
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: C++ - defining static const integer members in class definition Note: There are several extant questions re similar issues, but I have reviewed many of them and cannot find an answer that explains this behavior: Say I have code such as the following (in a header file) class Foo { static const int TEST = 33; public: void willItWork(void) { printf("%d", std::max(TEST, 75)); // embedded platform, no streams } };

MSVC: Using link.exe manually

限于喜欢 提交于 2019-12-23 21:05:58
问题 I'm attempting to set up a build system named Waf with a test C++ OpenGL/SDL project, and am running into a few issues with the linking process. As far as I can tell, all of the libraries are being found properly, and being added into the linking command, and yet the linking process seems to be acting as if the libraries aren't linked. In order to attempt to debug the process, I was trying to run the compilation/link process manually in order to understand exactly how it works with MSVC, but

Should I separate cpp and h file in C++?

£可爱£侵袭症+ 提交于 2019-12-23 21:03:57
问题 I have called a template in my C++ program: const matrix::CMatrix<double> M1(3,3,{{5.0,0.0,2.0},{1.0,1.0,3.0},{6.0,7.0,7.0}}); i got such linker error: tests.h:15: undefined reference to `matrix::CMatrix<double>::CMatrix(int, int, std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >)' after massive search, finally i realized it is because i have separated my h and cpp files and template does not tolerate it. In C it is

ld: library not found for -lgcc_s.10.5 Xcode

守給你的承諾、 提交于 2019-12-23 20:49:27
问题 ld: library not found for -lgcc_s.10.5 collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 Can anyone help me to solve this error? 回答1: When I have an ANE build in iPhone-ARM mode, and linking it with iPhoneSimulator-SDK, which needs an ANE build in iPhone-x86 mode, the same error occurs. Hope this can help you. 来源: https://stackoverflow.com/questions/8664891/ld-library-not-found-for-lgcc-s-10-5-xcode

Mac OS X: trying to link (ld) against a framework

半腔热情 提交于 2019-12-23 20:40:45
问题 I am reading "Advanced Mac OS X Programming" by Mark and Aaron. I can't get one terminal statement to work correctly : cc -g -o useadd -F./Adder/build -framework Adder useadd.m It's on page 45 - Chapter 3 (Libraries). As you can see, I am trying to link useadd.m against a framework created using Xcode. When I run this command, I get this error : ld: framework not found Adder collect2: ld returned 1 exit status I made sure that the folder /Adder/build exists under the current directory. Inside

How to change compilation flags for MyFramework_vers.c in Xcode?

自作多情 提交于 2019-12-23 20:33:10
问题 With Apple Generic Versioning enabled, Xcode autogenerates a MyFramework_vers.c file in the DERIVED_SOURCES_DIR , which contains the version string and number defined as const unsigned char[] and const double . However, with -Wmissing-variable-declarations enabled (part of -Weverything ), this produces the warnings no previous extern declaration for non-static variable 'MyFrameworkVersionString' no previous extern declaration for non-static variable 'MyFrameworkVersionNumber' It seems the