compiler-errors

C++/CLI : How to override Equal method of Object class

I am a newbie to C++/CLI and is having some problems trying to override the Equal method of the base Object class. I get the following compilation warning error for the following code. How should this be corrected? Warning 1 warning C4490: 'override' : incorrect use of override specifier; 'Test::Sample::Equal' does not match a base ref ...

C++ error C2819: type 'List' does not have an overloaded member 'operator ->'

I keep getting this error - error C2819: type 'List' does not have an overloaded member 'operator ->' i can't figure out why? help? Main.cpp - #include <iostream> #include <string> #include <cassert> using namespace std; #include "List.h" #include "Node.h" The error happens here: void PrintList ( List list ) { Node * tem...

Similar syntax causes strange, repeated compile errors when building PHP from source on Windows

I am trying to build PHP from source per these instructions. The configure works really well, but when I get to the nmake part, things fall apart. I have no idea why I am getting errors about struct's, the lines referenced are functions! I have put the problematic zend_interfaces.c here. Zend\zend_interfaces.c(320) : error C2332: 'str...

What causes the "left but not entered" GCC compiler error?

We recently ran into the following compiler error that repeated at different locations throughout our build: line-map.c: file "<a source_file name>" left but not entered The source file was different at different points in the build. After some time, the compiler finally threw the following error: <header file>: In function `<functi...

Error during compiling android source code using make command

Hi, I m trying build android source code 1.6. I got following error. frameworks/base/core/java/com/avaya/endpoint/socialnetwork/TwitterService.java:198: package IListTwitterService does not exist private final IListTwitterService.Stub myListTwitterServiceStub = new IListTwitterService.Stub() { ...

Compiler/Linking Error: Freedup

I've been trying to compile a program for hardlinking duplicate files called freedup. I did try to email the author/maintainer of the program, but it's been a long time and I haven't heard anything back from him. I'm trying to compile the program from a cygwin environment using the latest stable versions of gcc (3.4.4-999) and make (3.8...

Which C# compiler errors are undocumented?

This is meant to be a collection of possible C# compiler errors that are not documented. If you encounter such an error, please post an answer here listing: The error number (CSnnnn) The associated error message If possible, a small snippet of code that will produce the error Example: CS0224: A method with vararg cann...

Prevent MSVC from creating debug symbols by source code pragma?

While compiling a large c++ program with msvc .net 2003 and with debug information, I ran into C1067, the fatal compiler error for to big or to large debug symbols. As it is in boost, and I don't want to fiddle around with the source code, the easiest thing would be, if there is a pragma or something that could switch off the generation ...

Scala 2.7.x type mismatch error when passing null for a reference type

The following Scala code fails to compile in Scala 2.7.7, with a type mismatch error "found: Null(null) required: T" on the last line: /** * @param [T] key type */ class Key[T] class Entry[T](val k: Key[T], val v: T) def makeEntry[T <: AnyRef] = new Entry[T](new Key[T], null) I'm fully aware of the evilness of nulls, but suffice ...

C++ compiler differences ( VS2008 and g++)

I tried compiling the following code in Linux and VS 2008: #include <iostream> // this line has a ".h" string attached to the iostream string in the linux version of the code using namespace std; // this line is commented in the linux version of the code void main() { int a=100; char arr[a]; arr[0]='a'; cout<<"array is:"<<arr...

problem sorting using member function as comparator

trying to compile the following code I get this compile error, what can I do? ISO C++ forbids taking the address of an unqualified or parenthesized non-static member function to form a pointer to member function. class MyClass { int * arr; // other member variables MyClass() { arr = new int[someSize]; } doCompa...

xerces-c++ compile/linking question

After installing Xerces-C++ (XML library): ./configure --disable-shared ./make ./make-install ldconfig And writing the simple program (xmlval.cpp): #include <stdio> #include <xercesc/dom/DOM.hpp> int main() { std::cout << "HI" << std::endl; } And compiling: /usr/bin/g++ -L/usr/local/lib -I/usr/local/include -o xmlval xmlval.c...

c++ - How to get rid of this Constructor error?

Hi there, I've taken 2 OOP C# classes, but now our professor is switching over to c++. So, to get used to c++, I wrote this very simple program, but I keep getting this error: error C2533: 'Counter::{ctor}' : constructors not allowed a return type I'm confused, because I believe I have coded my default constructor right. Here's my co...

Very weird errors when linking (LNK1000)?

Error 1 fatal error LNK1000: Internal error during IncrBuildImage MFC_Test MFC_Test Why do I get this weird error every 2nd time I compile? ...

Solaris C++ stream input >> operator and templates of templates

I there a compiler option I could use in CC compiler to get the following code (which compiles fine in Visual C++) std::vector<std::vector<double>> v2; without the following error Error: "," expected instead of ">>" ...

How do I call a pointer-to-member-function?

I'm getting a compile error (MS VS 2008) that I just don't understand. After messing with it for many hours, it's all blurry and I feel like there's something very obvious (and very stupid) that I'm missing. Here's the essential code: typedef int (C::*PFN)(int); struct MAP_ENTRY { int id; PFN pfn; }; class C { ...

Boost Filesystem Compile Error

I'm writing some code that utilizes the boost filesystem library. Here is an excerpt of my code: artist = (this->find_diff(paths_iterator->parent_path(), this->m_input_path) == 1) ? (*(paths_iterator->parent_path().end() - 1)) : (*(paths_iterator->parent_path().end() - 2)); album = (this->find_diff(paths_iterator->parent_path(), this->m...

Why is g++ saying 'no match for ‘operator=’ when there clearly is, and Visual Studio can see that there is?

I'm writing an interface library that allows access to variables within tables (up to a theoretically infinite depth) in an object of type regula::State. I'm accomplishing this by overloading operator[] within a class, which then returns another of that same class, and calls operator[] again as needed. For example: regula::State t; t["m...

A new expression requires () or... in LINQ

This is driving me nuts. I have the following code that, when a button is clicked, a gridview will be populated with data based on the number a client enters into a text box (tbxHowMany). protected void btnDisplayTopReport_Click(object sender, EventArgs e) { if (radPa.Checked) { CompleteWeightsData...

Why compiler behaves differently with this code?

In C#, the following method will not compile: public bool IsItTrue() { } The compiler errors : 'IsItTrue()': not all code paths return a value, which makes perfect sense. But the following compile without any issue. public bool IsItTrue() { while (true) { } } Which looks wrong as no return statement at all. Why is it ...