compilation

Fix “Ignoring InnerClasses attribute” warning

时光总嘲笑我的痴心妄想 提交于 2020-01-12 18:27:48
问题 I would like to fix this warning that give me each build this output: Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(com.sun.jna.Native$1) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any "-target" type

How to change interpreter path and pass command line arguments to an “executable” shared library on Linux?

微笑、不失礼 提交于 2020-01-12 16:06:18
问题 Here is a minimal example for an "executable" shared library (assumed file name: mini.c ): // Interpreter path is different on some systems //+definitely different for 32-Bit machines const char my_interp[] __attribute__((section(".interp"))) = "/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2"; #include <stdio.h> #include <stdlib.h> int entry() { printf("WooFoo!\n"); exit (0); } If one compiles it with e.g.: gcc -fPIC -o mini.so -shared -Wl,-e,entry mini.c . "Running" the resulting .so will look

C++ Order of Declaration (in Multi-variable Declaration Line)

拟墨画扇 提交于 2020-01-12 15:18:10
问题 I use the following in my C++ code: int a = 0, b = a; I would like to know if this behaviour is reliable and well defined (left to right order of name declaration) and that my code will not break with other compilers with an undeclared name error. If not reliable, I would break the statement: int a = 0; int b = a; Thank you. 回答1: I believe the answer is no. It is subject to core active issue 1342 which says: It is not clear what, if anything, in the existing specification requires that the

C++ Order of Declaration (in Multi-variable Declaration Line)

随声附和 提交于 2020-01-12 15:17:09
问题 I use the following in my C++ code: int a = 0, b = a; I would like to know if this behaviour is reliable and well defined (left to right order of name declaration) and that my code will not break with other compilers with an undeclared name error. If not reliable, I would break the statement: int a = 0; int b = a; Thank you. 回答1: I believe the answer is no. It is subject to core active issue 1342 which says: It is not clear what, if anything, in the existing specification requires that the

configure: error: leptonica library missing (when building tesseract-ocr-3.01 on MinGW)

丶灬走出姿态 提交于 2020-01-12 07:26:09
问题 When running configure it fails with checking for leptonica... yes checking for pixCreate in -llept... no configure: error: leptonica library missing But I have leptonica 1.69 built (downloaded source and ran ./configure && make install ) Edit I think configure: error: leptonica library missing is a bit misleading, please note that it first says checking for leptonica... yes , and then fails on checking for pixCreate in -llept... no . So maybe the problem is not that the library is missing,

MinGW c++ compiler zlib1.dll missing error?

一世执手 提交于 2020-01-11 19:57:50
问题 I have just started to learn C++ for school, and I'm trying to download the compiler MinGW to compile my source code. However, every time I try to compile a program an error message shows up saying that zlib1.dll is missing. This is the error message the program can't start because zlib1.dll is missing from your computer I have tried installing/re-installing with no luck. I don't know what's the problem here? Can anyone please help me with this problem as I have some homework that I need to

Compiling for iOS with CMake

*爱你&永不变心* 提交于 2020-01-11 19:53:35
问题 I've compiled a C++ static library by using CMake as my building tool and I want to link it to my iOS app. I created a simple 'Empty' application in Xcode and linked my library called libengine.a to it. I tried to compile my iOS project and the linker gave me this warning: ignoring file /Users/.../build/engine/libengine.a, file was built for archive which is not the architecture being linked (i386): /Users/.../build/engine/libengine.a As I understand it, I need to compile my library for ARM

Compiling for iOS with CMake

久未见 提交于 2020-01-11 19:53:09
问题 I've compiled a C++ static library by using CMake as my building tool and I want to link it to my iOS app. I created a simple 'Empty' application in Xcode and linked my library called libengine.a to it. I tried to compile my iOS project and the linker gave me this warning: ignoring file /Users/.../build/engine/libengine.a, file was built for archive which is not the architecture being linked (i386): /Users/.../build/engine/libengine.a As I understand it, I need to compile my library for ARM

Compiling ImageMagick as 64bit under OS X?

微笑、不失礼 提交于 2020-01-11 14:02:09
问题 I'm trying to install moddims on OS X (see previous question), an Apache module with a dependency on ImageMagick. As far as I can tell, the OS X Apache is compiled as 64 bit. My previous attempt to run the moddims module I had compiled gave the following error: httpd: Syntax error on line 117 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/libmod_dims.so into server: dlopen(/usr/libexec/apache2/libmod_dims.so, 10): no suitable image found. Did find:\n\t/usr/libexec

How to analyze Closure Compiler bundle size

时光怂恿深爱的人放手 提交于 2020-01-11 09:20:07
问题 I have an app in ClojureScript, which uses Google's Closure Compiler as a compiler backend. The resulting bundle using advanced optimizations seems way too big for what it is. I blame the dependencies but how do I find out which modules are taking the most bytes in the output bundle? I scanned through all the Closure Compiler options and didn't find anything useful. Then I tried to learn about source maps and use that to calculate individual module size but with no success. I would like a