compiler

Statc compiling GLUT?

I have gotten the GLUT 3.7 source and opened the MSVC project. I switched DLL to static lib in the project settings and got a lib. I then linked against it in my application, and added the GLUT_STATIC preprocessor definition. It creates the window and renders one frame of my game and that's it. Whereas the game runs just fine with the dy...

Resources, "GenerateResource" task failed unexpectedly (Image.Save), and TIFFs?

VS2008 SP1 The C# compiler is giving me "Generate" task failed unexpectedly ... (Image.Save) when I try to compile my project, which has a resx file to which I've added a TIFF file. I haven't yet written any code to reference the resource -- just having the TIFF file included in the resource causes the compile failure. How can I compi...

my language & Intellisense in an IDE

I was just wondering. I know how to get visual studios to compile my .blah file into a C++ file (and i believe C#) and link. I would like to use my own language and generate a cs or cpp file however i'd like intellisense. Is there an easy hacky way to allow this? like always assume i am in a body of a function and show me existing functi...

how can I check if an object exists in C++

I am trying to write a function that will check if an object exists: bool UnloadingBay::isEmpty() { bool isEmpty = true; if(this->unloadingShip != NULL) { isEmpty = false; } return isEmpty; } I am pretty new to C++ and not sure if my Java background is confusing something, but the compiler gives an error: Unlo...

How to compile and run a C/C++ program on the Android system (like MinGW on the Windows)?

I want to compile and run the C/C++ program on the Android phone program (like G1). For example, I write a "Hello World.c" program, then compile and run it on my Android phone system. I have never used MinGW to run my code on my Windows system, so I also want to do it on the Android phone system. ...

C++ Forward Declaring a class?

In a .h if I have: #pragma once #include <xxxx.h> #include "yyyy.h" class AAAAAA; class BBBBBB; class ZZZZZZ { public: // etc }; using class AAAAAA; is forward declaring a class right? Why would one do this? Is it needed? What are the benefits? Drawbacks? ...

A tool to tell you what source files are needed in a C++ project?

I am porting a large, messy, 10 year old cold base in C++ from Metrowerks on OS X to XCode. There are so many files and all the other people that touched this over the years are gone. Nobody know what files are actually needed and which are just cruft. Is there any tool that I could run and have it produce a list of what files are ACTUA...

Best C++ compiler and options for windows build, regarding application speed?

I am making a game for windows, mac and GNU, I can built it on windows already with MSVC and MingW... But I am not finding good information regarding how much compilers optmize. So what compiler, and options on that compiler, I can use to make my Windows version blazing fast? Currently the profilers are showing some worring results l...

Is there a portable C compiler for windows?

I want to carry one in my flash drive and run it. Thanks ...

Default Python compilers on MacOS X

I'm trying to install matplotlib for Python on MacOS X. If I use the system Python 2.6.1, the default compiler commands that matplotlib uses (presumably via distutils) are:: gcc-4.2 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes g++-4.2 -Wl,-F. -bundle -undefined dynamic_lookup However, if I simply add the python.org 2.6.6 Python t...

Java 6: Unsupported @SuppressWarnings("rawtypes") warning

I moved to a new machine which has the latest Sun's Java compiler and noticed some warnings in the existing Java 6 code. The Eclipse IDE, suggested that I annotate the assignment with: @SuppressWarnings("rawtypes") For example: class Foo<T> { ... } ... @SuppressWarnings("rawtypes") Foo foo = new Foo(); When I moved back to the mach...

what is/are the purpose(s) of inline?

I had a discussion with Johannes Schaub regarding the keyword inline. The code there was this: namespace ... { static void someFunction() { MYCLASS::GetInstance()->someFunction(); } }; He stated that: Putting this as an inline function may save code size in the executable But according to my findings here and ...

Where to use volatile?

I read about volatile keyword, but I don't know in what situations I should use it. When the memory (variable) is getting updated and process is not aware of that? In what cases should drivers use volatile variables? ...

Exact difference between Compiler and Interpreter ?

Possible Duplicate: How does an interpreter/compiler work Hi what is the exact difference between the Compiler and interpreter ? ...

Jikes RVM as distributed compiler

Can we use Jikes RVM as distributed compiler? Thanks Rahul ...

Basic Javac question. Not seeing other classes, in same dir.

Hey, I wrote a Java program that has 3 classes. When, I use javac, I am getting errors whenever my main class attempts to interact with the other classes. Is there anything special that I need to do? I am just calling javac Main.java. Any help would be greatly appreciated. Edit: DFA myDFA = new DFA(); String test = args[0]; ...

Visual Studio compiles assemblies I want to be content

I have duplicate assemblies with different versions. I cannot recompile projects that use old versions of the assembly, so I manually copy the assemblies into a sub directory of my bin folder, then update the web.config with assemblybinding's. This works fine, but now I am trying to add the old assemblies to the visual studio project so...

MS C# compiler and non-optimized code

Note: I noticed some errors in my posted example - editing to fix it The official C# compiler does some interesting things if you don't enable optimization. For example, a simple if statement: int x; // ... // if (x == 10) // do something becomes something like the following if optimized: ldloc.0 ldc.i4.s 10 ceq bne.un.s do_not_...

Target multiple programming languages/platforms.

Are there any good ways to define interfaces/class hierarchies in a non language specific fashion and then generate corresponding source code in specified languages? In particular, I need to target both Java and C# for a fairly comprehensive API I am creating. I recall at one point seeing a post here on SF where an answer mentioned a pro...

create my own programming language

Possible Duplicates: References Needed for Implementing an Interpreter in C/C++ Books On Creating Interpreted Languages How to create a language these days? Learning to write a compiler Possible Duplicate: Learning to write a compiler Ok so I'm only 13 years old. I know some c++, VERY good at php, pro at css h...