compiler-errors

Why can't I put a "using" declaration inside a class declaration?

I understand the troubles you can get into when you put a using declaration inside a header file, so I don't want to do that. Instead I tried to put the using (or a namespace foo =) within the class declaration, to cut down on repetitive typing within the header file. Unfortunately I get compiler errors. Seems like it would be a usefu...

xcode "compile source as" override for specific file

Hello, I have a project that has to be set to "Objective-C++" for the "compile source as" value (no, "according to file type" will not work in my main project). I am having a problem with a file I got from a framework (specifically OpenFeint) that has compile errors when compiled as "Objective-C++". error: pointer of type 'void *' used...

GTK+ compile in Bloodshed Dev-C++ compiler error

Hi, I'm trying to compile a C program using GTK+ in bloodshed Dev-C++ 4.9.9.2. I've added all the include files in the compiler options plus all compiler options, but I get the following error: Compiler: Default compiler Building Makefile: "C:\Dev-Cpp\Projects\Makefile.win" Executing make... make.exe -f "C:\Dev-Cpp\Projects\Makefile....

compiler error in a c program:indirection on type void*

void main() { void *v; int integer=2; int *i=&integer; v=i; printf("%d",(int*)*v); } this simple program will result in a compiler error saying: Compiler Error. We cannot apply indirection on type void* what exact does this error mean? ...

java compiler error - unsafe operations

Hello, What does it mean? Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Any sugestions how to avoid that kind of errors? ...

C++ Compiler error with CRTP

I have the following class hierarchy: template <typename T> class base { public: void f() {} }; class class_a : public base<class_a> {}; class class_b : public base<class_b>, public class_a { using base<class_b>::f; }; int main() { class_b b; b.f(); return 0; } Comeu and Intel C++ v11 claim all is...

Why does this code using `::boost::bind` get a compiler error?

This code: #include <boost/signals.hpp> #include <boost/bind.hpp> #include <boost/mem_fn.hpp> #include <iostream> class Recorder : public ::boost::signals::trackable { public: void signalled() { const void *me = this; ::std::cerr << "Recorder at " << me << " signalled!\n"; } }; void signalled() { ::std::cerr << "...

Problem compiling simple C++ progam

Hi, I was provided this simple C++ [I think] program to investigate the maximum size of int that can be stored: #include <limits.h> #include <iostream> void main ( int argc , char * argv[]) { cout << "INT_MAX " << INT_MAX << endl ; cout << "INT_MAX +1 = " << INT_MAX + 1 << endl ; cout << "INT_MAX -1 = " << INT_MAX - 1 ...

How can I resolve linker issues when I compile this C++ program that requires GLUT?

I'm trying to compile this C++ program which utilizes the GLUT32 libraries. Right now I'm getting the following errors: Error 1 error LNK2001: unresolved external symbol _gluPerspective@32 Camera.obj soundCube Error 2 error LNK2001: unresolved external symbol _gluLookAt@72 Camera.obj soundCube Error 3 error LNK2...

What does the "incomplete type is not allowed" error mean?

I am trying to declare a callback routine in C++ as follows: void register_rename (int (*function) (const char *current, const char *new)); /*------------------------------------------------------------*/ /* WHEN: The callback is called once each time a file is received and * accepted. (Renames the temporary file to it...

What causes transient aspx first line compile errors?

Every once in a while, when I'm editing an aspx or ascx page, Visual Studio will start telling me there is an error on the first line of my file. For instance, right now, it is saying Argument missing on line 1. That line is just your typical header, with no apparent problems (to my eyes), and I hadn't even changed that one when the erro...

when I include atomic.h, GCC says No such file, why?

I want to use atomic API, and I include . I don't know how to use it! Thank you! ...

How can I detect errors programatically when building an egg with setuptools?

If I have a script that builds eggs, basically by running python setup.py bdist_egg --exclude-source-files for a number of setup.py files that use setuptools to define how eggs are built, is there an easy way to determine if there were any errors in building the egg? A situation I had recently, was that there was a syntax error in a ...

iPhone needs cleaning targets before recompile

Everytime I do "Build & Go" the app to my device, It installs the app with a white icon, shows a black screen and "Failed to load NSMainNibFile MainWindow" in the debugger. However after cleaning, and then recompiling it works fine. Is this normal? How do I go about this? ...

Compiling error: Function Parameters using Object References are Confused by Constructed Objects

In the unit test of a class, I try to declare a class variable by calling explicitly the empty constructor and pass it to a function that excepts a reference to the interface of the type I'm declaring, but the compiler produces error. When I just declare it without any explicit constructor call the function accepts it. See the code bel...

c++ fatal error c1083 project was fine before, what now?

I have a (com) c++ project, which uses a (.net) c++ dll. The project was compiling and running ok. Now, all I did was make changes to the dll, and I'm getting a fatal error c1083- cannot open include file stdafx.h - when recompiling my (com) project. What can this mean? ...

Problems inheriting from a class in the same namespace in C++

I was happily working in C++, until compilation time arrived. I've got several classes inside some namespace (let's call it N); two of these classes correspond to one base class, and other derived from it. Each class has its own pair of .hpp and .cpp files; I think it'd look like: namespace N{ class Base{ }; class Derived...

c++ compile error: ISO C++ forbids comparison between pointer and integer

I am trying an example from Bjarne Stroustrup's C++ book, third edition. While implementing a rather simple function, I get the following compile time error: error: ISO C++ forbids comparison between pointer and integer What could be causing this? Here is the code. The error is in the if line: #include <iostream> #include <string> us...

How to write a userspace linux block device driver?

Hello, I would like to write a linux block device driver. The driver would not need to access the hardware so it can be in userspace. To start, I have tried to build an example block device driver with this Makefile: obj-m = sbd.o KVERSION = $(shell pwd) PWD = $(shell pwd) all: make -C /lib/modules/$(KVERSION)/build M=$(PWD) modu...

Why does Delphi Prism complain about System type mismatches?

I encountered a strange compiler error in Delphi Prism 2010 that I am unable to resolve. The error is calling a method on an object defined in a third-party assembly that manipulates a specialized image format. The assembly itself was compiled against the .Net 2.0 Runtime. Despite providing the correct list of parameters, I consistently...