compilation

cmake dependency

I'm trying to create a cmake equivalent to the following make: demo: main.cpp gcc -o demo main.cpp ./demo demo is executed whenever demo is created. This what I came to, but demo is not executed as I want: add_executable(demo main.cpp) add_custom_target(run_demo demo) This is actually equivalent to: all: demo demo: main.cpp...

F# performance question: what is the compiler doing?

Referencing this code: http://stackoverflow.com/questions/2840714/f-static-member-type-constraints/2842037#2842037 Why is, for example, let gL = G_of 1L [1L..100000L] |> List.map (fun n -> factorize gL n) significantly slower than [1L..100000L] |> List.map (fun n -> factorize (G_of 1L) n) By looking at Reflector, I can see that th...

gcc -Wshadow is too strict?

In the following example: class A { int len(); void setLen(int len) { len_ = len; } // warning at this line int len_; }; gcc with -Wshadow issue a warning: main.cpp:4: warning: declaration of `len' shadows a member of `this' function len and integer len are of different type. Why the warning? Update I see there's a w...

Cannot create R.java b/c project has errors...errors result from lack of R.java...

edit: This is an Android project. My problem arose when I added a new .wav file to my 'raw' folder. I seem to have gotten into an endless loop in Eclipse. I deleted my R.java file from my project. Choosing to "Clean" or "Build Project" has no effect (i.e. doesn't generate an R.java file, or put anything into the 'gen' folder, or crea...

AVR_GCC compile errors delay.h

Instructions in the blinky.zip, gcc-section, Teensy++ v.2. Makefile and blinky.c are in the zip. I modified the blinky.c by defining F_CPU at the start because not using Makefile, please, see below. So why do I get the errs and how can I compile the C-files for at90usb1286 chip? $ avr-gcc -mmcu=atmega88 blinky.c In file included from b...

How does compilation work with AOP?

I need quick answer to a simple thing in AOP. If i have a code deployed at client side and i have written new aspects, which i want in the client side software. do i have to "recompile" complete software with "original" code and new "AOP" code? (with aop compiler)? i.e. do i need the source code of original program with source code of...

Java to native code

Is there any way to compile from Java to machine code? ...

Compilers behave differently with a null parameter of a generic method

The following code compiles perfectly with Eclipse, but fails to compile with javac: public class HowBizarre { public static <P extends Number, T extends P> void doIt(P value) { } public static void main(String[] args) { doIt(null); } } I simplified the code, so T is not used at all now. Still, I d...

How do programmers work together on a project?

I've always programmed alone, I'm still a student so I never programmed with anyone else, I haven't even used a version control system before. I'm working on a project now that requires knowledge of how programmers work together on a piece of software in a company. How is the software compiled? Is it from the version control system? Is...

Why does update to a dll need recompilation and sometime not?

Why does update to a dll need recompilation and sometime not? ...

Do different JDK Updates produce different Java byte code?

A hypothetical scenario: I've got a project whose source compliance level is specified to 1.5. Now I compile this project with two different JDKs: At first with JDK 6 Update 7 and then with JDK 6 Update 20. Do these two different JDKs produce different Java byte code, although they only differ in their Update version? ...

How to use a specific Windows SDK with MSBuild?

I have a large project made of many C++ and C# projects, and a MSBuild (3.5) script to build the whole thing. This script is based on the VCBuild (C++ projects) and MSBuild (C# projects) tasks. It is regularly executed by a Continuous Integration server. I want to be able to select a specific Windows SDK (v6.0A, v7.0, v7.1...) to be use...

What's best value for make -j

Hi, What's the best value of -j switch? I usually set this up to the number of CPU/Cores available. Thanks. ...

Trying to compile a linux-based app on Mac OS X

I'm just trying to compile the linux-based FCEUX (NES emulator) on my mac, OS X 10.5 Leopard. I got all the dependencies (SDL, GTK+ 2) going and everything but of all things this is now my problem: Undefined symbols: "_compress", referenced from: SaveSnapshot() in video.o "_gzclose", referenced from: FCEU_fopen(char const*, char const...

CSharpCodeProvider doesn't return compiler warnings when there are no errors

I'm using the CSharpCodeProvider class to compile a C# script which I use as a DSL in my application. When there are warnings but no errors, the Errors property of the resulting CompilerResults instance contains no items. But when I introduce an error, the warnings suddenly get listed in the Errors property as well. string script = @" ...

how to find which libraries to link to? or, how can I create *-config (such as sdl-config, llvm-config)?

Hey, I want to write a program that outputs a list of libraries that I should link to given source code (or object) files (for C or C++ programs). In *nix, there are useful tools such as sdl-config and llvm-config. But, I want my program to work on Windows, too. Usage: get-library-names -l /path/to/lib a.cpp b.cpp c.cpp d.obj Then...

program "is not up to date" execution error in wedit lcc-win32

I'm attempting to compile a simple hello world program in c with lcc-win32/wedit, and i'm a little unfamiliar with windows c programming. #include <stdio.h> int main(void){ printf("hellow\n"); return 0; } When I compile the program the console output is: Wedit output window build: Tue Jun 15 09:13:17 2010 c:\lcc\lib\lcccrt0.obj ...

What does an object file contain

HI everyone, during the various stages of compilation in C or C++, i know that an object file gets generated. i.e., any_name.o file. what does thos .o file contain actually. i cant open it since its a binary file. Could anybody please help me? are the contents of the object file mainly Dependant on the compiler which we use on unix? ...

NVIDIA CUDA SDK Examples Compilation Unsupported Architecture 'compute_20'

On compilation of the CUDA SDK, I'm getting a nvcc fatal : Unsupported gpu architecture 'compute_20' My toolkit is 2.3 and on a shared system (i.e cant really upgrade) and the driver version is also 2.3, running on 4 Tesla C1060s If it helps, the problem is being called in radixsort. It appears that a few people online have had this ...

Compiling .xsl files into .class files

I'm currently working on a Java web project (Spring) which involves heavy use of xsl transformations. The stylesheets seldom change, so they are currently cached. I was thinking of improving performance by compiling the xsl-s into class files so they wouldn't have to be interpreted on each request. I'm new to Java, so I don't really kno...