compilation

How to integrate Crypto++ into C++ Builder 2010 / [ILINK32 Error]

Hi, I was trying to compile the following (example) code via C++ Builder 2010: http://swarmapps.wordpress.com/2009/11/24/a-simplification-wrapper-for-the-crypto-library/ ( pastebin.com/f6bd13d59 / example.cpp ) ( pastebin.com/f2fc53f83 / BasicCryptoPPWrap.h ) There were no compiler errors but the linking failed: [ILINK32 Error] Erro...

How does C# compile the code with #if preprocessor directive?

Hi I wonder how to compiler compile my code if i using #if directive inside my code. I would like to create special version of my application (commercial demo version) and I want to limit the functionality of my application. I would rather avoid the obfuscation and just don't want to add all my compiled code to executable file. I need so...

C#, C++ project mix: Could not load file or assembly

I have Visual Studio 2010 solution of 2 projects: c# and c++ c++ project using .net framework libraries and exposes class that is referenced from c# project. Everything compiles fine and c# project intellisence helps me with methods exposed from c++. But when I try to launch c# project it crashes with exception: Could not load file ...

Why does gcc not implicitly supply the -fPIC flag when compiling static libraries on x86_64.

I've had numerous problems compiling shared objects that link statically against static libraries. This problem only shows up on x84_64 platforms. When doing the same compilation work on x86_32 I do not have any problems. Perhaps this is a OS specific GCC configuration thing, but my research indicates that its how GCC works on x86_64 p...

How much do forward declarations affect compile time?

I am very interested in some studies or empirical data that shows a comparison of compilation times between two c++ projects that are the same except one uses forward declarations where possible and the other uses none. How drastically can forward declarations change compilation time as compared to full includes? #include "myClass.h" ...

in the build project process what is the meaning of skipped=1

I have a solution with the main project, helping project and installation project When I build or rebuild the main project I get: Build: 1 succeeded or up-to-date, 0 failed, 1 skipped Now since the helping project generate the following message: Build: 1 succeeded or up-to-date, 0 failed, 0 skipped I don't understand what is being...

Using snprintf in a cross-platform application

I am writing a C program that is expected to be compiled with all major compilers. Currently I am developing on GCC on a linux machine and will compile on MSVC before committing the code. To make the cross-compiling easy, I am compiling with -ansi and -pedantic flags. This worked well until I started using snprintf which is not available...

Compiling with header files

Compiling the file main.c with: gcc main1.c -o final gives me: /tmp/cc1cwhAP.o: In function `main': main1.c:(.text+0xb): undefined reference to `hi' main1.c:(.text+0x15): undefined reference to `hi' collect2: ld returned 1 exit status main1.c: #include <stdio.h> #include "incl.h" int main(void) { hi = 1; printf("hi = %d",hi); ...

How to exclude frameworks in simulator builds in Xcode

How can I exclude libraries which I have compiled only for the iOS device architecture (libssh2, etc.) from an Xcode project when I am compiling the app to run on the simulator? ...

Compiling F# code on Mono 2.8

I've been trying to compile some F# code with Mono 2.8 in OpenSuSe 11.3. And I keep running into trouble, I'm currently getting this error thrown at me: parameter error FS0219: The referenced or default base CLI library 'mscorlib' is binary-incompatible with the referenced F# core library '/home/fredrik/Documents/ FSharp-2.0.0.0/FSharp...

How to match compiled class name to an enum member in Java?

In Java, with Sun's JDK 1.6, with an enum such as this: public enum MyEnum { FIRST_MEMBER { public void foo() { } }, SECOND_MEMBER { public void foo() { } }, THIRD_MEMBER { public void foo() { } }; } The compiled files are: MyEnum$1.class MyEnum$2.class MyEnum$3.class MyEnum.class This also means that a stack tra...

How to detect a new value was added to an enum and is not handled in a switch

From time to time I have to add a new value to a enum type in my project. public enum Day { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, FILENOTFOUND //this one is new one } What I would like is to have a compile time error for every switch I have that is not treating the new value, like this one: switch (col...

How does the java compiler find classes without header files?

When we refer to a class className in jar, how does it know whether it's defined or not when there's no header files(like in c/c++) ? ...

How can I compile an Java program in Eclipse without running it?

I would like to compile my Java program in Eclipse but not run it. I can't understand how I do it. How can I compile an Java program to .class files in Eclipse without running it? ...

How can I make my Ruby script (not Rails) run anywhere?

Hello, I'm very new to Ruby. I've recently finished writing a simple script, which uses a bunch of gems. It works well on my own workstation. When I copied the script over to my laptop, it stopped working, even though I manually installed all the gems. I think it may be due to version differences in the gems installed, but I wanted to ...