compilation

Relative or independent paths in libtool .la file

帅比萌擦擦* 提交于 2019-12-03 07:46:48
My .la file has full pathnames in both the dependency_libs= section and the libdir= section which makes it difficult to copy my libraries to a different machine (same arch but different path structure). What is the solution to this, besides having some script to hack the .la file to adjust for the paths on the new machine? ==Details== When I ./configure; make; make install my libfoo , depending on how I use the --prefix , --exec-prefix , and DESTDIR= flags, I'll get an entry in the libfoo.la file that reads libdir=/dir1/lib and I'll have the actual .so files in the same dir as libfoo.la . All

Why does compiling this code cause a compiler stack overflow?

非 Y 不嫁゛ 提交于 2019-12-03 06:58:02
interface Pong<T> {} class Ping<T> implements Pong<Pong<? super Ping<Ping<T>>>> { static void Ping() { Pong<? super Ping<Long>> Ping = new Ping<Long>(); } } Trying to compile this gives the error: The system is out of resources. Consult the following stack trace for details. java.lang.StackOverflowError at com.sun.tools.javac.code.Types$23.visitClassType(Types.java:2579) at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:554) at com.sun.tools.javac.code.Types$UnaryVisitor.visit(Types.java:3260) at com.sun.tools.javac.code.Types$23.visitClassType(Types.java:2592) at com.sun.tools.javac

Compiling Erlang code on Windows

一笑奈何 提交于 2019-12-03 06:55:51
I installed Erlang 13B and tried to follow the tutorials. Every time I get to c(tut) , I get an error instead of (ok, tut) , so it seems like there are no modules installed. Can anyone point me in the right direction? I've tried Emacs but I don't really know how to use it and haven't even got close to getting the Erlang mode working. For instance, where do I type: (setq load-path (cons "C:/Program Files/erl5.6.2/lib/tools-<ToolsVer>/emacs" load-path)) (setq erlang-root-dir "C:/Program Files/erl5.6.2") (setq exec-path (cons "C:/Program Files/erl5.6.2/bin" exec-path)) (require 'erlang-start) For

fatal error: sqlite3.h: No such file or directory

爱⌒轻易说出口 提交于 2019-12-03 06:47:52
问题 I'm trying to build a C application through cross compiling for a Zynq board (ARM architecture). When I type make without mentioning the ARM arch, it works fine on my laptop. But as soon as I modify the Makefile, I get an error saying: main.c:20:43: fatal error: sqlite3.h: No such file or directory #include "sqlite3.h" //library for sqlite3 ^ compilation terminated. make: *** [ws_temp_server] Error 1 The Makefile looks like this: SOURCE=lib/base64_enc.c lib/websocket.c lib/sha1.c lib/sqlite

how to compile opencl project with kernels

最后都变了- 提交于 2019-12-03 06:41:03
问题 I am totally a beginner on opencl, I searched around the internet and found some "helloworld" demos for opencl project. Usually in such sort of minimal project, there is a *.cl file contains some sort of opencl kernels and a *.c file contains the main function. Then the question is how do I compile this kind of project use a command line. I know I should use some sort of -lOpenCL flag on linux and -framework OpenCL on mac. But I have no idea to link the *.cl kernel to my main source file.

Empty function macros

会有一股神秘感。 提交于 2019-12-03 06:22:36
问题 If I define a function macro with no actual body, is it like an empty string with the compiler (i.e. It doesn't generate any extra instructions at compile time)? Example: #define SomeMacro(a) SomeMacro("hello"); // This line doesn't add any instructions, does it? 回答1: You're absolutely correct, the empty macro doesn't generate any code. I've seen two places where this is useful. The first is to eliminate warnings when a function parameter isn't used: #define UNUSED(x) int foo(int UNUSED(value

IntelliJ Idea not generate id in R.java

大城市里の小女人 提交于 2019-12-03 06:21:15
I recently switched to IntelliJ Idea 12. Now created a project on android and immediately ran into a problem: not generated id in R.java Rebuild project does not help. Maybe in IntelliJ Idea have any subtlety is not known to me? error: 12-01 16:08:15.067: ERROR/AndroidRuntime(7108): FATAL EXCEPTION: main android.content.res.Resources$NotFoundException: String resource ID #0x1 at android.content.res.Resources.getText(Resources.java:266) at android.widget.TextView.setText(TextView.java:3624) at com.example.poem_new.MyActivity.invalidateCounters(MyActivity.java:41) at com.example.poem_new

Automate Delphi 2010 project build with MSBuild

瘦欲@ 提交于 2019-12-03 06:18:57
I'm looking to compile my Delphi 2010 project using MSBuild, but something isn't right, I just couldn't make MSBuild to compile my project. I tried this command line: "C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" "C:\MyProject\Myapp.dproj" /t:Release and this: "C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" "C:\MyProject\Myapp.dproj" /p:Configuration=Release /t:Release But MSBuild won't recognize my build configuration! I also changed [ rsvars.bat ] but it didn't work! @SET BDS=C:\Program Files (x86)\Embarcadero\RAD Studio\7.0 @SET BDSCOMMONDIR=C:\Users\Public

Making GCC and Other C++ Compilers Very Strict

删除回忆录丶 提交于 2019-12-03 05:51:17
问题 I'm working on a large collaborative C++ project that is both developed and run on various flavors of Linux, OS X and Windows. We compile across these platforms with GCC, Visual Studio C++ and the Intel C++ compiler. As more and more people start developing code for the project, we're starting to see weird errors in compilation and runtime that are specific to particular compilers on particular operating systems. An example of this is implicit inclusion of headers that certain OS/compiler

npm with node-sass and autoprefixer

折月煮酒 提交于 2019-12-03 05:51:07
问题 I use node-sass to compile all my Sass files to a master.css. This works well but now I want to add prefixes. I would like to use only the npm, no Gulp or Grunt. Here my package.json file: { "name": "xxxxxx.com", "version": "1.0.0", "description": "", "watches": { "sass": "src/scss/**" }, "scripts": { "sass": "node-sass src/scss/master.scss -o dist/css/ --style compressed", "prefix": "postcss --use autoprefixer dist/css/master.css -d dist/css/master.css", "dev": "rerun-script" }, "author":