linker

Problems when compiling Objective C with Clang (Ubuntu)

不想你离开。 提交于 2019-12-20 19:43:23
问题 I'm learning Objective-C language. Since I don't have a Mac, I'm compiling and running my code within Ubuntu 11.04 platform. Until now, I was using gcc to compile. I've installed GNUStep and all was working. But then I started to try some Objective-C 2.0 features, like @property and @synthesize, that gcc does not allow. So I tried to compile the code with Clang, but it seems that it is not correctly linking my code with the GNUStep libraries, not even with a simple Hello world program. For

ALIGN in Linker Scripts

∥☆過路亽.° 提交于 2019-12-20 18:07:22
问题 What does the ALIGN keyword do in linker scripts? I read many tutorials about linker scripts but I cant understand what really ALIGN do. Can any one explain it simply. Thanks! 回答1: A typical usage is . = ALIGN(8); This means: insert padding bytes until current location becomes aligned on 8-byte boundary. That is: while ((current_location & 7) != 0) *current_location++ = padding_value; 回答2: The ALIGN() instructions tell the linker that section(bss, text) shoul be this much aligned. For a

How to debug GCC/LD linking process for STL/C++

余生长醉 提交于 2019-12-20 12:33:17
问题 I'm working on a bare-metal cortex-M3 in C++ for fun and profit. I use the STL library as I needed some containers. I thought that by simply providing my allocator it wouldn't add much code to the final binary, since you get only what you use. I actually didn't even expect any linking process at all with the STL (giving my allocator), as I thought it was all template code. I am compiling with -fno-exception by the way. Unfortunately, about 600KB or more are added to my binary. I looked up

Xcode 4 unit testing linker error

a 夏天 提交于 2019-12-20 12:21:44
问题 NOTE: "Use GHUnit" is not an acceptable answer to this question. I know most think GHUnit is better than the Xcode4 OCUnit, but that's not what I'm asking about. I'll evaluate that separately. I have an Xcode project that I created in Xcode4 from scratch, with the "Include unit tests" checkbox checked during creation. I have also included some libraries I developed in a previous project. They were added to the project via the "Add Files to x..." dialog and only added to the application target

React native base headers for ios not found

蓝咒 提交于 2019-12-20 11:55:30
问题 During the iOS linking phase, I started seeing errors for my React Native project. React Native version: 0.41.2 , 0.40 , 0.39 All worked fine, I edited the Android version, React Native code didn't change, when this kind of linking errors started showing up with headers on /node_modules/react-native/React/Base/{RCTHeaderName.h} path not being found: In file included from /Users/user/ReactNativeProject/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.h:9: ..

How to speed up c++ linking time

前提是你 提交于 2019-12-20 11:51:49
问题 Is there any way, to optimalize linking time in MS Visual studio C++ (2005) ? We're using Xoreax Incredibuild for compilation speed up, but nothing for link. Currently every linking takes about 30seconds. When I turn on incremental linking, takes abou 35-40 seconds. ( No matter if i compile project with or without incredibuild ) Is there any way, how to profile linker and watch how long what takes ? Or any tool for paralel linking ? Or any tips for code optimalization to speed up linker ?

Force relink when building in QT Creator

扶醉桌前 提交于 2019-12-20 11:36:34
问题 Greetings, I have a subdirs project which wraps a couple libraries and a main application. When I change something in one of the libraries the main application does not relink with them.. does anyone have a trick for getting an application to relink with its statically linked libs automatically when using QT Creator? -Dan O 回答1: There is a workaround for this and also an interesting discussion on the subject (qmake seems to be the problem here) on the Qt Creator mailing list. The workaround

What does the “aw” flag in the section attribute mean?

左心房为你撑大大i 提交于 2019-12-20 10:46:49
问题 In the following line of code (which declares a global variable), unsigned int __attribute__((section(".myVarSection,\"aw\",@nobits#"))) myVar; what does the "aw" flag mean? My understanding is that the nobits flag will prevent the variable from being initialised to zero, but I am struggling to find info about the "aw" flag. Also, what meaning do the @ and # have around the nobits flag? 回答1: The section("section-name") attribute places a variable in a specific section by producing the

Trying to statically link Boost

删除回忆录丶 提交于 2019-12-20 10:33:41
问题 I am working in Linux, Eclipse CDT, g++, with Boost library. Having existing program which uses Boost thread, I try to link it statically instead of dynamically. /usr/local/lib directory contains the following files: libbost_thread.a libbost_thread.so libbost_thread.1.41.0 Dynamic linking works: g++ -o"MyProgram" ./main.o -lboost_thread Static linking: g++ -static -o"MyProgram" ./main.o -lboost_thread produces huge number of messages like: undefined reference to `pthread_mutex_init' How can I

How do I resolve LNK1104 error with Boost Filesystem Library in MSCV?

℡╲_俬逩灬. 提交于 2019-12-20 10:23:38
问题 I am having trouble getting my project to link to the Boost (version 1.37.0) Filesystem lib file in Microsoft Visual C++ 2008 Express Edition. The Filesystem library is not a header-only library. I have been following the Getting Started on Windows guide posted on the official boost web page. Here are the steps I have taken: I used bjam to build the complete set of lib files using: bjam --build-dir="C:\Program Files\boost\build-boost" --toolset=msvc --build-type=complete I copied the /libs