compilation

Page class outside of App_Code will not compile

I have a website that has 2 files as follows: page.aspx page.aspx.cs It used to be that I could just drop new files onto the web server and IIS would automatically compile the files and I could access the page e.g. http://www.website.com/page.aspx ... and the associated functionality in the page class contained in the .cs file woul...

What is the usefulness of CHECK, UNITCHECK and INIT blocks in Perl?

I know what they all do, but have never found myself in a situation where I've needed any of them. I've used BEGIN blocks on many occasions and ENDs once in a while. BEGIN is especially useful when you need to tweak the environment before code gets run, and I've used END in certain debugging situations to trap important state information...

How to compile a 32-bit binary on a 64-bit linux machines without touching the CFLAGS environment variable

The solution in http://stackoverflow.com/questions/1272357/how-to-compile-a-32-bit-binary-on-a-64-bit-linux-machine-with-gcc-cmake is not possible because i use 3rd party software and other stuff which is using the CFLAGS variable already. And patching their makefiles is not allowed - says my boss. So i have to find another way to enf...

Why doesn't the compiler detect out-of-bounds in string constant initialization?

I read this question and its answer in a book. But I didn't understand the book's justification. Have a look: Question: Will the following code compile? int main() { char str[5] = "fast enough"; return 0; } And the answer was: Yes.The compiler never detects the error if bounds of an array are exceeded. I cou...

Programming benefit of two quad quad core servers

Programmers often whine that if only they had a faster/more memory/more cores machine they would be much happier (they never say more productive). Can anyone think of a programming benift for whatever language/protocol system of having two idle quad quad core servers available in addition to the programmers workstation. I can't because...

Conditional Compilation in assembler (.s) code for iPhone - how?

I have a few lines of assembler arm code in an .s file. Just a few routines i need to call. It works fine when building for the device, however when i switch to iPhone Simulator i get "no such instruction" errors. I tried to compile parts of the .s file conditionally with what i know: #if !TARGET_IPHONE_SIMULATOR But the assembler do...

error: ISO C++ forbids declaration of ‘iterator’ with no type

Hi, I am trying to build/run an old C++ system. I've already been able to built it in Ubuntu 9.10 with g++4.4 Now I'm trying to build in Ubuntu 8.04 with g++4.2. And I am getting the following errors: stringmap.h:353: erro: ISO C++ forbids declaration of ‘iterator’ with no type stringmap.h:353: erro: extra qualification ‘stringmap<_Tp>...

Separating Enums from Class Definitions using Namespaces in C++?

I'm working with a legacy class that looks like this: class A { enum Flags { One = 1, Two = 2 }; }; I'd like to pull out all the enums into a new namespace defined in a new header: // flags.h namespace flags { enum Flags { One = 1, Two = 2 }; }; Then pull these enums back into the class so that I can include just the flags.h...

Storing reporting assemblies (.net) in a database

I'm developing a project where users need to build reporting queries using complex Linq statements to generate data sets. The best way I could think of to compile these user-generated queries and then execute them is to use the CSharpCodeProvider object to build an assembly and then store the result in a database blob. Is there anythin...

How to make this C program compile?

When I type gcc gprof-helper.c to compile the program I get these errors: gprof-helper.c: In function `wooinit': gprof-helper.c:38: error: `RTLD_NEXT' undeclared (first use in this function) gprof-helper.c:38: error: (Each undeclared identifier is reported only once gprof-helper.c:38: error: for each function it appears in.) This is t...

JSP not compiling on GODADDY

HI, I have Deluxe Linux shared hosting account on GODADDY. I have uploaded basic index.html,test.jsp in provided folder. I also configred jsp handle in my web.xml and waited for 1:00am(sceduled server restart for godaddy) but my jsp page is not compiling and showing me all my jsp code in page loaded in browser. What can be the issue? Do...

How Can I Get the Compile Date and Time in Delphi

I'd like to be able to display in a Delphi 2009 program, the date and time that the program was compiled. Is there a simple way to do this? ...

Fix source file search path when doing out-of-source autotools build within emacs

Hi I have a project that uses autotools. A nice feature of autotools is 'out-of-source' builds, wheras instead of doing : cd foobar ./configure make I actually create a folder for builds, in which I do the configuration : cd foobar/builds/linux ../../configure make (The nicety is that my source folder is not crippled with the ge...

How does make know which files to update

I noticed that when I make changes to some files and then I type make, it will run certain commands related to those files. If I don't change anything, then make doesn't do anything, saying that the program is up to date. This tells me that make has a way of knowing which files were changed since it was last run. How does it know? It...

#ifdef #ifndef in Java

Hi all, I doubt if there is a way to make compile-time conditions in Java like #ifdef #ifndef in C++. My problem is that have an algorithm written in Java, and I have different running time improves to that algorithm. So I want to measure how much time I save when each improve is used. Right now I have a set of boolean variables that a...

gcc/g++: error when compiling large file

Hi, I have a auto-generated C++ source file, around 40 MB in size. It largely consists of push_back commands for some vectors and string constants that shall be pushed. When I try to compile this file, g++ exits and says that it couldn't reserve enough virtual memory (around 3 GB). Googling this problem, I found that using the command ...

Compiling time of first page load

Hi, I switched from php to asp.net for a certain project, and i've created a web application and everything went smoothly. I have one question though....when I navigate to my website the very first time, it loads for about 8-10 seconds. I assume the code is compiling in this time. If i go back to the site, it will load very quick. Howe...

ASP.NET precompile fails to merge a single user control

I have rather large third party ASP.NET WebSite project that I precompile and merge using MSBuild and the Microsoft Web Deployment targets. I don't precompile the .aspx and .ascx files, only the codefiles. During the precompilation phase, the user control is compiled into an assembly that is not merged into the final WebSite.dll assemb...

Syntax directed translation, unable to understand the concept

Hya , I am currently studying compiler creation , in which i am studying a chapter called "syntax Directed Translation" and unable to grasp one concept from this chapter. I have already attached the scanned pages of book and the topic in the book is "Top-Down translation" Here are the scanned pages: http://rapidshare.com/files/31480...

Call Groovy Closure from Java Class - Will it Compile?

I have some legacy Java code inside which I'd like to call a groovy Closure. Is this something that the Java / Groovy cross-compiler will be able to handle? I suspect it compiles Java first, but does it do another pass over the Groovy bytecode to resolve all the java references. Or do I need to compile the class with closure first...