compilation

Eval-when uses?

為{幸葍}努か 提交于 2019-12-04 08:30:30
问题 After reading a lot of documentation regarding Lisp eval-when operator I still can't understand its uses, I know with this operator I can control the evaluation time of my expressions but I can't figure out any example where this may be applicable ? Best Regards, utxeee. 回答1: Compilation of a Lisp file Take for example the compilation of a Lisp file. The Lisp compiler processes the top-level forms. These can be arbitrary Lisp forms, DEFUNs, DEFMACROS, DEFCLASS, function calls,... The whole

ANT_HOME is set incorrectly or ant could not be located [duplicate]

╄→尐↘猪︶ㄣ 提交于 2019-12-04 08:18:23
问题 This question already has answers here : Error installing Ant: ANT_HOME is set incorrectly (30 answers) Closed 4 years ago . I'm trying to build a project in Ant, using BuildFile (build.xml). Although ANT_HOME environment variable clearly exists and is set to the path where "ant.bat" is located, it always displays this error message. How to configure Ant properly to compile builds in Windows? Thanks 回答1: ANT_HOME might be set, but that doesn't mean the path to /bin is in your PATH so the OS

Can elixir or erlang programs be compiled to a standalone binary?

帅比萌擦擦* 提交于 2019-12-04 08:10:00
问题 It sees that elixir has a tool called elixirc and erlang has a tool called erlc to compile modules for use. It says immediately after this that you can then run code with the elixir command line tool. Is there a way to compile a binary executable with elixir or erlang? (one which I can chmod +x binary_name and then run from the same directory with ./binary_name ) 回答1: Escripts support that to some extent but you still need Erlang installed in your machine. See this answer for more information

iPhone SDK Objective-C __DATE__ (compile date) can't be converted to an NSDate

此生再无相见时 提交于 2019-12-04 08:07:31
//NSString *compileDate = [NSString stringWithFormat:@"%s", __DATE__]; NSString *compileDate = [NSString stringWithUTF8String:__DATE__]; NSDateFormatter *df = [[[NSDateFormatter alloc] init] autorelease]; [df setDateFormat:@"MMM d yyyy"]; //[df setDateFormat:@"MMM dd yyyy"]; NSDate *aDate = [df dateFromString:compileDate]; Ok, I give up. Why would aDate sometimes return as nil? Should it matter if I use the commented-out lines... or their matching replacement lines? It can return nil if the phone's Region setting is not US (or equivalent). Try setting the formatter's locale to en_US: NSString

Programmatically compile typescript in C#?

匆匆过客 提交于 2019-12-04 08:05:35
问题 I'm trying to write a function in C# that takes in a string containing typescript code and returns a string containing JavaScript code. Is there a library function for this? 回答1: You can use Process to invoke the compiler, specify --out file.js to a temporary folder and read the contents of the compiled file. I made a little app to do that: Usage TypeScriptCompiler.Compile(@"C:\tmp\test.ts"); To get the JS string string javascriptSource = File.ReadAllText(@"C:\tmp\test.js"); Full source with

zipalign verification failed resources.arsc BAD-1

时光毁灭记忆、已成空白 提交于 2019-12-04 07:42:46
I try to upload my app to gplay but fail because my apk doesn't zipaligned. i try to zipalign but i got verification failed. really don't have idea, someone please tell me what to do. thanks in advance. Vrajesh No need to manually, do this: buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' zipAlignEnabled true //uncomment for automatically zip aligned by studio } } build.gradle set classpath 'com.android.tools.build:gradle:2.2.0-alpha3' to classpath 'com.android.tools.build:gradle:2.1.2' see my answer here I

Does #import <UIKit/UIKit.h> on pch slow down the compile time?

喜夏-厌秋 提交于 2019-12-04 07:28:50
I was reading this post about imports and I had one question. Does the #import that comes in the prefix.pch file by default slow down the compile time? Should I remove it and import only when necessary? #ifdef __OBJC__ #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #endif No. It actually improves the compilation speed. This is a nice tutorial that actually clears all the confusion over use of #import statements and .PCH files. Also it tells you in detail about something new known as "modules", introduced in iOS7. Since Xcode 5, there is a new feature introducing precompiled sources

pipeline echo to gcc?

夙愿已清 提交于 2019-12-04 07:18:53
To call printf("Hello!"); in C from terminal I use echo '#include<stdio.h> void main() { printf("Hello!"); }' > foo.c and then call gcc foo.c to make the output. Unfortunately, the pipelining echo '#include<stdio.h> void main() { printf("Hello!"); }' | gcc fails complaining for no input file. Ultimately, I want to have a script where I can compile a C command from terminal with ./script [command] . Any suggestion would be appreciated. Yes, but you have to specify the language using the -x option. Specify input file as stdin, language as C using -xc ( if you want it to be C++, use -xc++ ). So

Building an android library project with jar dependencies

两盒软妹~` 提交于 2019-12-04 07:18:46
I have been struggling with a problem for a few days now and I am at a loss for how to fix this. I am working with an Android Library project that is being compiled using the Android tool as provided by the android sdk. Inside the project, I follow the standard structure of an an android project (where my jar files are found inside the libs directory of the project: I am finding that when I compile the project using Ant doing: <target name="compile-payment-lib" depends="prepare,init-profile"> <delete file="../payment-lib/project.properties"/> <exec executable="${android.tool}" dir="../payment

Build Python (2.7) module on GCC 4.8 fails

两盒软妹~` 提交于 2019-12-04 07:07:37
问题 I'm trying to build a Python Module/extension write using C API, but it fails: % python2 cmath.py build running build running build_ext building 'c_math' extension creating build creating build/temp.linux-x86_64-2.7 gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python2.7