linker

IOS linking with missing architecture i386 (AdSupport.framework)

半腔热情 提交于 2019-12-24 12:44:07
问题 I had this question going on, but now I am a little further: I added this framework to my project: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/AdSupport.framework Now this works fine if I run the app on any device, however this framework is just for the architectures armv7, armv7s and arm64 When running the app on the simulator, the build fails because the architecture i386 is missing. This is

Generate LLVM IR for httpd

六月ゝ 毕业季﹏ 提交于 2019-12-24 12:21:42
问题 I am trying to compile apache2 with LLVM, to generate final binaries in LLVM IR. I used flto option in compiling and linking and passed "also-emit-llvm" to the linker through clang. It seems to work for most steps, however I had two concerns 1) Earlier I used LLVM 3.6, whose gold plugin doesn't accept also-emit-llvm, but has emit-llvm only, basically it will emit only elf or llvm. Which the Autotools build system doesn't like. The configure and make script want binaries, while I want llvm.

Visual Studio 2008 C ++ stopping during Linking

佐手、 提交于 2019-12-24 11:40:09
问题 I have written some image processing program using OpenCV 2.1 I received a error during linking, related to "projectname.ilk" file.(message said VS is trying a non-incremental linking). So I triied rebuilding the project. The initial message went away, but now VS never completes "Linking". It prints "1>Linking..." and stays that way. What might be the problem? Thanks 回答1: If clean build fails to remedy, try eliminating /LTCG on the link and whole program optimization in c++. There have been

Link error adding library built with Clang to iOS app built with GCC

自古美人都是妖i 提交于 2019-12-24 11:34:46
问题 I'm trying to add the Dropbox Sync API (v1.1.2) to an iOS app built with Marmalade (v6.3). I'm getting the following link error: Undefined symbols for architecture armv7: "___udivmodsi4", referenced from: _sqlite3BitvecSet in libDropbox.a(sqlite3.o) _sqlite3BitvecClear in libDropbox.a(sqlite3.o) _sqlite3BitvecTest in libDropbox.a(sqlite3.o) ld: symbol(s) not found for architecture armv7 Googling for pertinent parts of that error message finds a number of users of a certain SQLCipher library

IAR define memory region for custom data

血红的双手。 提交于 2019-12-24 11:28:05
问题 I want to define a specific memory region in the STM32 micro where to store some strings. I'm using IAR compiler but I don't find a simple example that can help me to create the region in the correct way using the icf file. How can I create the region and use this region in the code? Thanks 回答1: I found this solution: In the icf file I define the memory region in this way: define region LANGUAGE_region = mem:[from 0x080FB000 to 0x080FC000]; "LANGUAGE_PLACE":place at start of LANGUAGE_region {

getting a char from keyboard using curses.h

余生长醉 提交于 2019-12-24 11:27:33
问题 I'm trying to get a character from the keyboard using curses.h. This is my source (get_char_example.c): #include <curses.h> #include <stdio.h> int main(void) { char ch; printf("Enter a character: "); ch = getch(); printf("\nIts ASCII code is %d\n", ch); return 0; } I use the following command to compile: gcc get_char_example.c -o get_char_example And I get the following error: /tmp/ccjaXwRU.o: In function `main': get_char_example.c:(.text+0x1c): undefined reference to `stdscr' get_char

How to use shell32.dll from C++ console application

做~自己de王妃 提交于 2019-12-24 10:47:49
问题 What I need to do is to get ApplicationData path , I've found in Google that there is function called HRESULT SHGetFolderPath( __in HWND hwndOwner, __in int nFolder, __in HANDLE hToken, __in DWORD dwFlags, __out LPTSTR pszPath ); But it exists in shell32.dll In C# I'd do something like [DllImport] static extern HRESULT SHGetFolderPath() and so on. What do I need to do in C++ Console application, to be able to call this API? Maybe, I can use LoadLibrary() ? But what is the right way to do this

Xcode linker error: ld: library not found for -twsapi

蹲街弑〆低调 提交于 2019-12-24 10:41:49
问题 I have compiled and installed a library using Makefile for i386 architecture. The library is located in /usr/local/lib/twsapi and the headers are located in /usr/local/include/twsapi . To use that library in another project I have added libtwsapi.a under Build Settings > Link Binary With Libraries, and added /usr/local/include to the HEADER_SEARCH_PATH variable. The build process fails during the linking part with the error message ld: library not found for -twsapi even though I have

Migrating code from snow leopard to mountain lion, make and linking errors with 'x86_64'

纵然是瞬间 提交于 2019-12-24 09:19:00
问题 I have a bunch of code that I frequently use which I bundle as a library (.a). Everything was working on my old macbookpro running snow leopard; but I've recently gotten a new laptop, and upgraded to mountain lion -- now I'm having lots of trouble building programs that worked before. At the moment, I'm trying to re-build that library, when I run my makefile, I get the error g++ -g -I/opt/local/include -L/opt/local/lib -M -MT './obj/TB_Numerical.o' TB_Numerical.cpp -MF obj/TB_Numerical.d make

/usr/lib appears not to be a default link location

假如想象 提交于 2019-12-24 09:01:08
问题 EDIT: After a bit more digging I have found that I have a libGL.so at /usr/lib/i386-linux-gnu/libGL.so and if I move this away then linking works correctly again. After looking at the error line for a while I thought that the full path to libGL.so in the message was suspicious because it would have been looking at multiple locations to find it and usually it only shows the name of the library not one specific full path. So the question now is; why did finding the other version cause the