compilation

Exporting Scala project as jar from Eclipse

浪子不回头ぞ 提交于 2019-12-22 17:47:47
问题 I have a Scala project and I would like to export it as a jar. *1. At first I tried creating a Java class for the project as an entry point public class JMain { public static void main(String[] args) { System.out.println("Java main calling Scala main"); SMain.main(new String[] {""}); //SMain.main is the actual *main* and this worked fine and dandy when launched from Eclipse, but when I export it as jar it'll give me 18 exceptions or so. I do now know how to replicate then "environment" in

how to compile a C/C++ function for python

纵然是瞬间 提交于 2019-12-22 16:58:23
问题 I have a source code written in cpp that I want to compile and be readable in Python. Python must give 2 filenames as input and retrieve a matrix and a vector as output. If I had to do it in C/C++ I'd use 2 chars and 2 pointers but I don't know how a compiled C/C++ program can be seen for Python language. I hope that someone can help me. Thank you very much. 回答1: Try using Swig to generate the glue code necessary to call C/C++ code from Python. It's easier than writing the code yourself. 来源:

Xcode 7 - Cannot open document (storyboard file)

我的梦境 提交于 2019-12-22 14:38:42
问题 I recently updated to Xcode 7 and as usual something has to go wrong. Its really a shame because I was looking forward to the new features in Xcode 7. I am faced with a an error which I cannot seem to fix. Every time I try and build the project I get the following error: I thought there was something wrong with my project, so I made a new Single View application and I still get the same error. I have tried the following things but none of them has worked for me: Restart Xcode (Didn't work).

Compiling JSPs is very slow while uploading on Google App Engine

早过忘川 提交于 2019-12-22 14:14:35
问题 while uploading App Engine Application to server, GAE upload is very slow and gets stuck at "Compiling JSP". I have seen a bug for the same here - http://code.google.com/p/googleappengine/issues/detail?id=4222, but could not find a solution. I have many JSP files. When I cut down the number of jsp files to 10, the files get uploaded in 10-15 mins ... but when I increase the number to 50, there seems to be a lot of delay (in hours). It used to work fine with GAE 1.4.2. The issue is seen on the

How to compile C in both Linux and Solaris?

人盡茶涼 提交于 2019-12-22 13:59:52
问题 I want to make a Makefile to can compile both in Linux and in Solaris. I know how to do so individually, but how can I combine both and be able to detect what kind of OS I am using? I am trying to do this for just a simple C file - but it is the name of the compiler that changes. 回答1: GNU Autoconf was designed to solve this very problem: Autoconf is an extensible package of M4 macros that produce shell scripts to automatically configure software source code packages. These scripts can adapt

Error building wxWidgets using -j (jobs) option with MinGW

こ雲淡風輕ζ 提交于 2019-12-22 13:53:29
问题 I'm compiling WxWidgets for Windows using the following command line: mingw32-make -f makefile.gcc BUILD=release SHARED=1 -j6 The last parameter ( -j ) is used to speed up the compilation by running multiple jobs in parallel, in my case making full use of my 6-core processor. A single-threaded build normally takes very long. However, I get the following output when hitting Enter: if not exist gcc_mswudll mkdir gcc_mswudll if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll if not exist ..\

RISC-V disassembler doesn't match with spike running results?

匆匆过客 提交于 2019-12-22 12:41:44
问题 I've set up a hello world program just for testing my riscv32-unknown-elf toolchain, spike , pk etc. Though I managed to get the hello world printed using spike --isa=RV32 pk hello.elf , I found out that if I added the -d flag for debugging, I was given following instructions (a section of the whole): core 0: 0x0000000000001000 (0x7ffff297) auipc t0, 0x7ffff : core 0: 0x0000000000001004 (0x00028067) jr t0 : core 0: 0xffffffff80000000 (0x1b00006f) j pc + 0x1b0 : core 0: 0xffffffff800001b0

Field not found exception with compiled dll regular expression

不想你离开。 提交于 2019-12-22 12:07:15
问题 I'm having trouble with this error and been searched for a solution on google but there aren't any. Exception: Field not found: 'System.Text.RegularExpressions.Regex.internalMatchTimeout'. My regular expression is : TheExpressions.Add("ExtractURL", @"\b(?:(?:https?|ftp|file)://|www\.|ftp\.) (?:\([-A-Z0-9+&@#/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#/%=~_|$?!:,.])* (?:\([-A-Z0-9+&@#/%=~_|$?!:,.]*\)|[A-Z0-9+&@#/%=~_|$])"); Code to compile with options: CI[Cnt++] = new RegexCompilationInfo((string)de.Value,

Why doesn't Eclipse need me to configure a JDK?

强颜欢笑 提交于 2019-12-22 11:37:07
问题 I recently downloaded Eclipse onto a Windows 7 machine. The machine already had a JRE but I noticed it didn't have a JDK. I was afraid I would have to download the JDK and then hook Eclipse up to it. I was (pleasanly) surprised when I was able to code, compile and run in Eclipse right out of the box. However, now I'm confused. From what I know about Java, Eclipse should need a JDK to compile code and a JRE to execute it. The best I can think of is... Eclipse is packaged with a JDK (if this is

How is the order of compilation of source files decided?

ぃ、小莉子 提交于 2019-12-22 11:31:21
问题 I have a workspace containing many *.c files, which I compile. (I could use any toolchain say MSVC6.0, or gcc etc) Which source file is compiled first? How is the order of the files to be compiled subsequently decided? 回答1: The order of compilation is not specified by the C standard. Since there is no need for the construction of global objects like in C++, there is no situation where the order of compilation is relevant in C. 回答2: Generally, this is not specified anywhere. Especially when