compilation

javac source and target options usage

谁都会走 提交于 2019-12-25 03:51:19
问题 When we use javac option: -source and -target how does the compiler "knows" the code to produce ? I mean how does any compiler knows the specification of any previous java release or I have to do some setting in order to provide it with some information about them ? 回答1: The javac program knows how to handle these arguments without you providing any extra information. Do note that there is a bit of a trap here, however: these options relate to the source syntax and the class file form and

Compiling Charniak's parser

*爱你&永不变心* 提交于 2019-12-25 03:26:35
问题 A couple of days ago I downloaded Charniak's parser from the web. This parser is used to parse natural languages. I've been trying to compile it but it is not working. When I'm in parser directory and type make this is prompted: /usr/bin/g++ -c -O Bchart.C /usr/bin/g++ -c -O BchartSm.C /usr/bin/g++ -c -O Bst.C /usr/bin/g++ -c -O FBinaryArray.C /usr/bin/g++ -c -O CntxArray.C /usr/bin/g++ -c -O ChartBase.C /usr/bin/g++ -c -O ClassRule.C /usr/bin/g++ -c -O ECArgs.C /usr/bin/g++ -c -O Edge.C /usr

dynamic binding and dynamic linking

荒凉一梦 提交于 2019-12-25 03:24:24
问题 Quoted from Dynamic Binding C++, dynamic binding is orthogonal to dynamic linking... I was wondering how to understand the meaning of orthogonal"? Is it because compilation of source code into machine code is like going deep, and linkage of various machine codes is like going horizontal, and so they are orthogonal to each other, (static/dynamic) name binding is a concept in compilation static/dynamic linking is a concept in linkage? if in dynamic linking, any involved binding, i.e., any

linker could not found object files from different directory with scons

*爱你&永不变心* 提交于 2019-12-25 03:12:16
问题 Currently, I make a project with scons. I compiled source codes and it is time to link them. However, I got an error that ld cannot find object files. The SConscript is located in src/kernel32, and import os, sys # Compile CPP env_gpp_options = { 'CXX' : 'x86_64-pc-linux-g++', 'CXXFLAGS' : '-std=c++11 -g -m32 -ffreestanding -fno-exceptions -fno-rtti', 'LINK' : 'x86_64-pc-linux-ld', 'LINKFLAGS' : '-melf_i386 -T scripts/elf_i386.x -nostdlib -e main -Ttext 0x10200', } env_gpp = Environment(**env

C++ Compilation Issue - Undefined symbols for architecture x86_64 - Mac Os X Mountain Lion

ぐ巨炮叔叔 提交于 2019-12-25 02:54:03
问题 I'm having a compilation issue which I'm unable to solve. I'm developing a cross platform C++ project coding on both Mac Os X 10.8 and Windows. The code compiles and run fine on Windows and on Mac Os X Leopard as well. Since Apple pushes the developers to stick to the latest platform for various reasons I'm forced to develop on Mountain Lion and I'm trying to get the project to work again. I compiled correctly all the libraries I needed (wxWidgets, etc) and I imported the project in the

Compile and execute arbitrary Java string in Android

。_饼干妹妹 提交于 2019-12-25 02:29:48
问题 Is there any way that I can execute arbitrary Java code from a String like Sql.exect(String) . Is there something like Java.exect(String) . Can anyone point me to a command or simple tutorial? 回答1: You can use Janino , take a look at here; http://docs.codehaus.org/display/JANINO/Home 回答2: I'm not sure if I understood you correctly, but maybe try to dig about this Java 6 Compiler API 来源: https://stackoverflow.com/questions/24654188/compile-and-execute-arbitrary-java-string-in-android

unable to compile with library

限于喜欢 提交于 2019-12-25 02:15:34
问题 I would like to experiment with the OpenALPR SDK and have written a little test program. The problem is, I can't get it to compile properly and I'm not sure why. Here's the SDK documentation. My source file looks like: $ cat test.cpp #include <alpr.h> #include <iostream> std::string key = "MyKey"; int main (void) { alpr::Alpr openalpr("us", "/etc/openalpr/openalpr.conf", "/usr/share/openalpr/runtime_data/", key); // Make sure the library loaded before continuing. // For example, it could fail

Angular.js directive template using variable from parent/inherited scope

会有一股神秘感。 提交于 2019-12-25 01:59:46
问题 I want to chose directives templateUrl depending on some variable from its parent scope. I can't use templateUrl function, since it doesn't have a scope yet. I can $compile the template from $templateCache(note that it's already there, I'm not loading it) from inside the linking function, but I am afraid it's gonna have a negative impact on performance(let say this is a table cell directive.. and there's quite a few cells). Do I have any other, better option? 回答1: There is indeed no other way

How do I compile a 32 bit apache module for a 64 bit platform?

假如想象 提交于 2019-12-25 01:34:47
问题 I am trying to comple mod_auth_kerb for apache on mac os x 10.5.7. I get no compilation errors, but when apache tries to load it: org.apache.httpd[95092]: httpd: Syntax error on line 160 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/mod_auth_kerb.so into server: dlopen(/usr/libexec/apache2/mod_auth_kerb.so, 10): no suitable image found. Did find:\n\t/usr/libexec/apache2/mod_auth_kerb.so: mach-o, but wrong architecture I have tried the following in the make file:

The Java Compiler API does not work I keep getting unable to resolve class javax.tools.JavaCompilerTool and other similar ones

倾然丶 夕夏残阳落幕 提交于 2019-12-25 01:17:40
问题 I have read that Java 6 has a compiler api which allows you to compile java files from other java code. However whenever I try to import any such class (eg javax.tools.JavaCompilerTool), I get a unable to resolve class javax.tools.JavaCompilerTool I searched in all the jar files in the jdk1.6.0_26 installation directory and found no reference to JavaCompilerTool in any jar file in the package javax.tools. My understanding is that this functionality is in the 1.6 JDK. I am running my