compilation

Is it possible to compile Windows binaries on a linux machine?

At my work all of the project data resides on an NFS that is accessible from both Linux and Windows machines (using Samba). All of the work is done on Linux, but I'm toying with the idea of compiling some of tools for Windows so that I can debug with Visual Studio. I already have a nice makefile that can build the code for both 32-bit ...

Does #include affect program size?

When my cpp file uses #include to add some header, does my final program's size gets bigger? Header aren't considered as compilation units, but the content of the header file is added to the actual source file by the preprocessor, so will the size of the output file (either exe or dll) will be affected by this? Edit: I forgot to mention...

Compiling a 'static' binary from fortran on mac

Hi, I would like to compile fortran code on mac such that it does not depend on any shared library. Ultimately, I want to be able to send the binary to other people and for it to just work (provided the processor has the right architecture). I noticed that g95 and ifort have a -static flag, which does not work on mac. If I consider the...

Compiling Objective-C project on Linux (Ubuntu)

How to make an Objective-C project work on Ubuntu? My files are: Fraction.h #import <Foundation/NSObject.h> @interface Fraction: NSObject { int numerator; int denominator; } -(void) print; -(void) setNumerator: (int) n; -(void) setDenominator: (int) d; -(int) numerator; -(int) denomina...

How to share resource files between .NET CF 1.0 and 2.0/3.5?

Hi, I've created NAnt scripts to compile our codebase for .NET CF 1.0, 2.0 and 3.5. This worked pretty well in the past. Now we started localizing our UI. So our scripts need to compile the resource files (resx) too. And that's where the trouble starts. The resx format changed from VS .NET 2003 to VS 2008. My idea is to continue mainta...

How do I modify the source code of the MySQL Connector and install it on my PC?

In short, what are the steps that one needs to take in order to modify the source of the connector and install it in Windows? I have the MySQL Connector/.NET Version 6.1.2 installed on my machine, but I'm getting an exception for every DateTime with a value of '0000-00-00'. This exception breaks my application. As I solution, I downlo...

[myproject].dll.config files - do I need them?

If I have a project with an App.Config, and when I compile it I get a file next to my DLL called [myproject].dll.config which contains the contents of the projects App.Config. If I want to reference [myproject].dll from another project, do I need to copy the .config file as well? Can the App.Config file be compiled into the DLL so all t...

scala: list.flatten: no implicit argument matching parameter type (Any) = > Iterable[Any] was found

compiling this code in scala 2.7.6: def flatten1(l: List[Any]): List[Any] = l.flatten i get the error: no implicit argument matching parameter type (Any) = > Iterable[Any] was found why? ...

Included file from header/source file

What is the difference between including a file from a header file or from a source file in C++ in regards to performance during compilation? What are the reasons to include files in the source file and not in the header file (except when absolutely required)? Does the one (header) affect compile time and the other (source file) affect...

How should a very simple Makefile look like for Cuda compiling under linux

Hi, I want to compile a very basic hello world level Cuda program under Linux. I have three files: the kernel: helloWorld.cu main method: helloWorld.cpp common header: helloWorld.h Could you write me a simple Makefile to compile this with nvcc and g++? Thanks, Gabor ...

How can I compile changes in only 1 document but keep the original build of the others? (C#, Asp.Net MVC)

Hi, I have a local install and a live install. My live install is working except I changed one of the methods to be restricted via [Authorize(Roles = "Admin, Host")] I want to remove this, but I need to do a build of the solution and move the .dll over for it to work (correct me if I'm wrong). I cannot build the solution because my loc...

Why can't C++ Builder find my headers?

I am required to recompile a C++ builder project, and am come across this problem. one of the unit contains the followings: #include "LMDBaseControl.hpp" #include "LMDBaseGraphicControl.hpp" #include "LMDBaseLabel.hpp" #include "LMDBaseMeter.hpp" #include "LMDControl.hpp" : When I compiled this unit, I got the followi...

Compiler error when using nested operator overloading in C++

I have a URL class that overloads the ==, <, >, and != operators for simple comparison. The URL class has a string data member and some functions to act on the string. The operators work fine when tested with the URL class. I also have a Page class that has a URL data member. I am trying to overload the same operators in the Page class...

nant task to create queue with c# code

<project name="aa" default="createqueue" xmlns="http://nant.sf.net/release/0.85/nant.xsd"&gt; <target name="createqueue"> <echo message="started" /> <script language="C#" > <references> <lib> <include name="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Messaging.dll" /> </lib> </references> ...

CSharp: Not all code paths return a value.

I am writing a simple WinForms application in which I allow the user to drag around TreeNodes in a TreeView control. One of the rules that I enforce is that the user is not allowed to drag a TreeNode into one of its own children. I wrote the following function in a recursive style to check for the parenthood of the destination node. Upon...

Java / Eclipse : How does Eclipse compile classes with only a JRE ?

I need to batch a compilation with a special JRE which has been "customized". Eclipse is able to compile the classes with this JRE, but I need to make a build script outside of Eclipse. What is the method used by Eclipse to generate the .class files without a JDK ? ...

Is it a good practice to always create a .cpp for each .h in a C++ project ?

Some classes, like exceptions or templates, only need the header file (.h), often there is no .cpp related to them. I have seen some projects were (for some classes) there aren't any .cpp files associated to the headers files, perhaps because the implementation is so short that it is done directly in the .h, or maybe for other reasons,...

Problem compiling Python 2.6.4 on AIX 5.3

I'm trying to build Python 2.6.4 on AIX 5.3. I'm running configure like this: ./configure --prefix=/home/chenf/python --disable-ipv6 --disable-shared --with-libs='/usr/lib/libncurses.a' --without-threads --disable-threads --with-ncurses=/utv/sad/ncurses/lib/libncurses.a I seem to be having linking problems with ncurses (see below), w...

Recompiling same code produces different executable in VC++

I developed a Windows command line tool using C, and compiled it in VC++, sometimes back, and checked-in the source code. I cleaned the project before checking-in, which deleted the .exe , .obj files besides others. I continued to use the command line tool though. After a couple of months, I checked out the source, compiled again, but t...

Conversion problem

I'm using gcc 4.3.2. I have the following code (simplified): #include <cstdlib> template<int SIZE> class Buffer { public: explicit Buffer(const char *p = NULL) {} explicit Buffer(const Buffer &other); const char *c_str() const { return m_buffer; } private: char m_buffer[SIZE]; }; typedef Buffer<10> A; typedef Buffer...