compilation

compiling libmagic statically (c/c++ file type detection)

Thanks to the guys that helped me with my previous question. (linked just for reference) I can place the files fileTypeTest.cpp, libmagic.a, and magic in a directory, and I can compile with g++ -lmagic fileTypeTest.cpp fileTypeTest. Later, I'll be testing to see if it runs in Windows compiled with MinGW. I'm planning on using libmagic ...

JavaCompiler from JDK 1.6: how to write class bytes directly to byte[] array?

So I recently learned of the new JavaCompiler API available in JDK 1.6. This makes it very simple to compile a String to a .class file directly from running code: String className = "Foo"; String sourceCode = "..."; JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); List<JavaSourceFromString> unitsToCompile = new ArrayList...

Can lexical analyzer stage check grammar rules during compilation?

Hi guys, sorry for such silly question, but I had argument with my pals about lexical analyze and we've decided to ask community. The question is: Whether the statement "int some_variable = ;" would be interpreted as invalid during the lexical analyze stage or during the syntax analyze stage in C grammar. Thanks ...

How can I speed up Ant Compilation in FDT / Flex Builder

Is there any way to speed up MXMLC compiles using Flextasks in Ant in Eclipse. Compared to FDT and Flex Builder's in-built compilation, it is painfully slow. ...

How to achieve smaller size of the executable?

Hello everyone! Very recently I have come back to Delphi after a long pause and written a rather straightforward utility app my client requested to support an older release... I know these days the size does not matter much, but it struck me as odd that the one-unit application, when compiled, amounted to 1'084'416 b executable. The on...

How can I speedup Java web application compilation?

I have just started work on an existing Java web application and I find that it takes about 5-10 minutes for the application to compile and run. What are the common ways to reduce this time? It is my first time working on an application of this size. I am used to coding and testing incrementally and find this wait unbearable. Any help w...

Using Grails 1.2.0 and Spock 0.4-SNAPSHOT - Compilation errors

Using Grails 1.2.0 and the latest Spock 0.4-SNAPSHOT (as of 01/28/2010 10:18 EST) I'm getting compilation errors that the Groovy compiler is unable to find: org.apache.commons.httpclient.Cookie and org.apache.commons.httpclient.NameValuePair No matter what I've tried (adding it as a dep in the plugin, adding it as a dep in the app) i...

Eclipse compilation issue

I have a large codebase added into the Eclipse project and have added one External Tool providing the path where the class for that java file is to be kept and the Classpath. The build folder is somewhere else. Now when I need to compile only one file, Eclipse starts building whole of the codebase(>100 MB of Java files), it takes my sys...

C++ compilation for iPhone (STL issue?)

Hello, I am trying to compile some C++ code as a static library to use on the iPhone. If I compile things for the simulator (i386 architecture), everything compiles just peachy, but when I switch the architecture to arm, I get all these include errors, seemingly within the iPhone SDK STL headers. Any idea what's going on? First of the e...

java compilation

Hi, i am not a java developer so is it possible for me to develop java code on windows and then deploy the windows compiled .class files to a solaris server...would it run.. ...

JSP compilation fails on Weblogic 10.3 but works on Weblogic 10

I have below piece of code in one my JSP <%@ page language="java" import = "import com.ecc.SiteAdmin.servlets.*" %> This file compiles and works fine on Weblogic 10 with Sun JDK 5, but fails with below message on Weblogic 10.3 with JRockit 6 SiteAdminLogin.jsp:1:36: No type with this name could be found at this location. <%@ pag...

dependency generation for non-gnu compiler

I am using non-gnu C compiler which doesn't support dependency generation option (-MM in gcc). In this software, they are not using makefiles. They are using some ancient windows batch files to compiler and link the code. These batch files doesn't have incremental building. I traced the batch files and I find that at the end it execute...

Why can't C# compiler follow all code paths through a switch statement

The below code works fine: ListControl lstMyControl; if (SomeVariable == SomeEnum.Value1) { lstMyControl = new DropDownList(); } else { lstMyControl = new RadioButtonList(); } lstMyControl.CssClass = "SomeClass"; Whereas the below code won't compile: ListControl lstMyControl; switch (SomeVariable) { case SomeE...

Is Excelsior jet compiled apache tomcat server redistributable as part of an opensource project?

I stumbled upon excelsior jet http://www.excelsior-usa.com/protect-java-web-applications.html where in they have a compiled version of apache-tomcat which don't rely on jvm anymore. I know for sure apache-tomcat is open source and could be reditributed as part of your compatible opensource project. Now, I want to know if this compiled ve...

Properly compiling modules in subfolders (ocamlbuild)

I recently decided to organize the files in my project directory. I moved the parsers I had for a few different file types into their own directory and also decided to use ocamlbuild (the as the project was getting more complicated and the simple shell script was not sufficient any longer). I was able to successfully include external p...

Compiling command line Linux program on Windows

I need to write a relatively simple command line C++ program to be run a Linux environment. However, I would like to code as well as compile this on Windows. The reason I don't want to port it to Linux is because it requires MySQL interactions, and that would require some messy porting (IMO). It does not have to run on Windows; I just wa...

Compiling nonessential object files with GCC

Consider the following example g++ a.o b.o c.o -o prog If it is the case that c.o does not contribute any executable code to prog, nor are there any dependencies on c.o in any of the other files, will GCC yet include the contents of c.o in prog? Said another way, aside from compilation time, what (if any) negative consequences can th...

bleeding-edge libraries and precompiled headers sizes

Q1: My GCC precompiled header takes up 150 mb -- yes I'm using obscure TMP libraries from Boost. Anyone have any tips of benefiting from a PCH this large ? any makefile snippets which I could use to create a ram-disk(tmpfs) or something (transparently / on the fly) ? Q2: Is there some way I could daemonize GCC ? -- after all if it stays...

Will a program complied in 64-bit work on 32-bit machine?

As title said, I have C program complied and created a binary in 64-bit machine.Will this binary work under 32-bit ? ...

Should i write a Direct3D Shader Model language compiler using flex/yacc?

I am going to create a compiler for Direct3D's Shader Model language. The compiler's target platform and development environment are on Windows/VC++. For those who are not familiar with the Shader Model Language, here are examples of instructions which the language consists of (some of the instructions are a bit outdated, but the syntax...