compilation

Swift Use of unresolved identifier 'UIApplicationStateInactive'

末鹿安然 提交于 2019-12-04 10:21:36
In my Swift code to handle push notification I have this line: if ( application.applicationState == UIApplicationStateInactive || application.applicationState == UIApplicationStateBackground) { } Which cause the compilation error: Use of unresolved identifier 'UIApplicationStateInactive' Am I missing some import files? Thanks Currently your are using the identifiers for Objective-C. You need to use the identifier for swift: UIApplicationState.Inactive // equals UIApplicationStateInactive UIApplicationState.Background // equals UIApplicationStateBackground Apple documentation for: Swift

Compiling ARM .s file on Mac

ぃ、小莉子 提交于 2019-12-04 09:53:08
I am on Mac Os X and I am having trouble compiling a .s ARM assembly file. my .s file is this: mov r0, r1 just to see if it works. but when i do arm-elf-as my.s i get an a.out file. i do chmod +x a.out and ./a.out but it says cannot execute binary file this has me confused, because it should be able to execute if i compiled it with arm-elf-as. How do i go about compiling this .s? You're assembling it allright, you just can't run it on a Mac since Macs don't have ARM CPUs. If you install Xcode with iOS support, you can compile ARM code: # the file $ cat foo.s mov r0, r1 # compile with llvm-gcc

Is it possible to compile c code using python?

独自空忆成欢 提交于 2019-12-04 09:44:26
问题 I want to build a python program that get as input a path to .c file and then it compile its. The program will output OK to the screen if the compilation is sucessful, and BAD otherwise. I'm been trying to google it, but could not find anything. I've been also trying to run cmd within python with an argument of the compiling program but it didn't work. To clarify - I've already got a very specific compiler in my machine which I want to run. I dont want python to act as a compiler. Just get a

CMake not finding proper header/include files in include_directories

本小妞迷上赌 提交于 2019-12-04 09:38:51
Once again I am getting a "undefined symbols for architecture x86_64" error when I try to compile. I've tried more than I can actually document in this post (because I've forgotten all that I have tried). It is a really simple set-up and should compile very easily with CMake... When I run a make on this it works just fine. But I want to convert it to CMake for interoperability. As you can see I have thrown my "${HEADERS}" variable in a few places, I've tried quite a few placements of it but I keep getting my error. Depending on where I put that ${HEADER} it can also technically generate an

What are the tasks of the “reader” during Lisp interpretation?

本秂侑毒 提交于 2019-12-04 09:23:39
问题 I'm wondering about the purpose, or perhaps more correctly, the tasks of the "reader" during interpretation/compilation of Lisp programs. From the pre-question-research I've just done, it seems to me that a reader (particular to Clojure in this case) can be thought of as a "syntactic preprocessor". It's main duties are the expansion of reader macros and primitive forms. So, two examples: 'cheese --> (quote cheese) {"a" 1 "b" 2} --> (array-map "a" 1 "b" 2) So the reader takes in the text of a

How do I compile my Delphi project on the command line?

青春壹個敷衍的年華 提交于 2019-12-04 09:23:11
问题 Has anyone ever managed to compile their Delphi 6 & 7 (NOT any Delphi > 7 ) projects using the command line? All the instructions I see are not very clear on what exactly needs to go where! Am looking for step-by-step kind of instructions. Answers should be limited to Delphi 6 & 7: I understand Delphi 2006 and > uses MSBuild which is far much easier. Links are also high appreciated. Gath 回答1: This is not difficult to do. I have a standard Delphi 5 install on my machine here, and when I open a

gcc: No space left on device?

99封情书 提交于 2019-12-04 09:10:53
I'm trying to make some C code with a simple gcc command in Ubuntu 10, but for some reason, I keep getting an error: Cannot create temporary file in /tmp/: No space left on device The thing is, though, I have plenty of space on the disk. Here is output of df -h: Filesystem Size Used Avail Use% Mounted on / 3.7G 2.4G 1.1G 70% / devtmpfs 312M 112K 312M 1% /dev none 312M 24K 312M 1% /dev/shm none 312M 80K 312M 1% /var/run none 312M 0 312M 0% /var/lock none 312M 0 312M 0% /lib/init/rw And df -i, in case you are wondering about the inodes: Filesystem Inodes IUsed IFree IUse% Mounted on / 240960

stdexcept On Android

寵の児 提交于 2019-12-04 08:52:22
I'm trying to compile SoundTouch on Android. I started with this configure line: ./configure CPPFLAGS="-I/Volumes/android-build/mydroid/development/ndk/build/platforms/android-3/arch-arm/usr/include/" LDFLAGS="-Wl,-rpath-link=/Volumes/android-build/mydroid/development/ndk/build/platforms/android-3/arch-arm/usr/lib -L/Volumes/android-build/mydroid/development/ndk/build/platforms/android-3/arch-arm/usr/lib -nostdlib -lc" --host=arm-eabi --enable-shared=yes CFLAGS="-nostdlib -O3 -mandroid" host_alias=arm-eabi --no-create --no-recursion Because the Android NDK targets ARM, I also had to change the

How to compile library on C using GCC?

妖精的绣舞 提交于 2019-12-04 08:48:15
问题 I made a library with the files pila.h and pila.c . I compile the file pila.c with gcc pila.c -c and this library works fine. I have tested it. Then I made another library. This library has the files pila_funciones_extra.h and pila_funciones_extra.c . In this library I need to include the first library. In the file pila_funciones_extra.h I put the next line to include it: #include "pila.h" and in the file pila_funciones_extra.c I put the next line: #include "pila_funciones_extra.h" as it has

How to remove strings from a compiled binary (.so)

家住魔仙堡 提交于 2019-12-04 08:38:57
问题 How do I remove strings from / obfuscate a compiled binary? The goal is to avoid having people read the names of the functions/methods inside. It is a dynamic library (.so) compiled from C++ code for Android with the NDK tools (includes GCC) I compile with -O3 and already use arm-eabi-strip -g mylib.so to remove debugging symbols, but when I do strings mylib.so all the names of the functions/methods are still readable. 回答1: These strings are in the dynamic symbol table , which is used when