compiler-errors

Compiler Errors on Master Page

Does anybody have advice on moving a master page from one solution / application to another? I have copied a master page from an existing solution to a new one. The original solution builds and runs fine. In the new solution the page causes build errors These are primarily 'variable' not declared. I have commented out all of the ser...

iPhone app compile error with static libraries on distribution build

Hi, I am currently trying to build the distribution product of my (first) iphone app so that it can be uploaded to the App Store. I have gone through all of the App ID and Distribution Provisioning profile process and finally got the Organizer and target's build configuration to recognize it. The problem is that when setting the "Activ...

Strange VC++ compile error, C2244

Take a look at this peice of code: template <typename K,typename T> Pointer<typename Collection<T>::Iterator> BinaryTree<K,T>::GetBeginning() const { return new BinaryTreeIterator(this,BinaryTreeIterator::Position::atBeginning); } When I try to compile it using VSTS 2008, I get: error C2244: 'BinaryTree<K,T>::GetBeginning' : unab...

Warning: passing argument from distinct Objective-C type

I am currently trying to compile OCMock with GCC4.2 (original: 4.0) and start getting the following warning: warning: passing argument 1 of 'partialMockForObject:' from distinct Objective-C type the calling method is: - (void)forwardInvocationForRealObject:(NSInvocation *)anInvocation { // in here "self" is a reference to ...

Trying to include a library, but keep getting 'undefined reference to' messages

I am attempting to use the libtommath library. I'm using the NetBeans IDE for my project on Ubuntu linux. I have downloaded and built the library, I have done a 'make install' to put the resulting .a file into /usr/lib/ and the .h files into /usr/include It appears to be finding the files appropriately (since I no longer get those err...

C++: Casting for user defined types

How can I get the same handeling of casting for user-defined types as built in, eg: float a = 5.4; std::string s = a;//error, no conversion avaible int x = a;//warning, possible data loss int y = (int)a;//fine int z = static_cast<int>a;//fine float b = c;//warning, possible data loss Now say I have my own Int and Float class, how do I...

GWT Browser Returns Error, but GWT does not

I made some changes to GWT app without testing it in the client browser. I just now tested it in the browser and now the browser is throwing an error: "Error: uncaught exception: java.lang.IllegalArgumentException: Widget must be a child of this panel." How do I figure out why this is being thrown and where to fix it? I made so many ...

How do you define an opaque struct array in C?

I have code in my header file that looks like: typedef struct _bn bnode; I can do bnode b; just fine, but b[i], where i is an int gives me the following error: invalid use of undefined type ‘struct _bn’ Any ideas? ...

How to enclose values in SQL commands?

An error-free column name syntax is [My Column] instead of My Column which causes an error. An error-free string value syntax is '25,00' instead of 25,00 which causes an error. I'm getting an error using single quotes to enclose values, if the column data type is numeric. Are there any other ways to enclose values safely for string or ...

multiple definition of `yyerror'

With Bison (or yacc) how do i solve the error multiple definition of `yyerror' I tried %option noyywrap nodefault yylineno and writing the prototype at the top. No luck. -edit- nevermind. when i copied paste an example to work with i didnt realize i had a yyerror function already. ...

Is there a way to get better information for the context of an error when using msvc? (ex: C2248)

Hi, I'm wondering if there is a way to get better information about the location of an error in msvc (2005)? Exemple, when inheriting from boost::noncopyable in my class I get a C2248 error saying something like: error C2248: 'boost::noncopyable_::noncopyable::noncopyable' : cannot access private member declared in class 'boost::nonc...

Select error in Linq

When i tried the code Actor[] act = new Actor[] { new Actor { Name = "Jacky", ID = "JZ01", FilmList = { new Film { Title = "Twin Brothers", Period = Convert.ToDateTime("01/Nov/1993") }, new Film { Title = "Police Story", Period = Convert.ToDateTime("05/Aug...

Forcing an error when a function doesn't explicitly return a value on the deafult return path?

Is there a way, in VC++ (VSTS 2008), to froce a compiler error for functions that do not explicitly return a value on the default return path (Or any other quick way to locate them)? On the same issue, is there any gaurentee as to what such functions actually return? ...

java compiler oddity: field declared in same class, yet "not visible"

The eclipse compiler refuses to compile the following code, stating that the field s is not visible. (IBM's Aspect J compiler also refuses, stating that "s could not be resolved") Why is that? public class Test { String s; void foo(Object o) { String os = getClass().cast(o).s; } } The Java Language Specification ...

Compile error unqualified-id before

Hi, I have class Node { public: string el1; string el2; string curr; string name; int ID1; int ID2; Node(){ //constructor is here ID1=-1; ID2=-1; } }; And it has 10 different nodes represented with array.. Node [] allNode=new Node[10]; for(i=0; i< 10; i++) { //create new node allNode[i] = new Node(); std::string el = "f"; std:...

Strange gcc error: stray '\NNN' in program

The following issue popped up in my open source library, and I can't figure out what's going on. Two of my users have (gcc) compiler errors that look like: /home/someone/Source/src/._regex.cpp:1:1: warning: null character(s) ignored /home/someone/Source/src/._regex.cpp:1: error: stray ‘\5’ in program /home/someone/Source/src/._regex.cp...

tcp.h error with gcc 4.4.1

I just upgraded to Ubuntu 9.1 which comes with gcc 4.4.1 and I have a problem compiling my application: /usr/include/linux/tcp.h:72: error: ‘__u32 __fswab32(__u32)’ cannot appear in a constant-expression lines in cp.h causing errors: ... enum { TCP_FLAG_CWR = __cpu_to_be32(0x00800000), TCP_FLAG_ECE = __cpu_to_be32(0x004...

GCC compile error : declaration of ‘strlen’ must be available

My problem is that when I want to make a downloaded library I get some weird compile errors from GCC and the code that the compiler demands to correct seems just to be right. The errors are all like this: Catalogue.h:96: error: there are no arguments to ‘strlen’ that depend on a template parameter, so a declaration of ‘strlen’...

error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)

Please don't confuse with the title as it was already asked by someone but for a different context The below code in Visual C++ Compiler (VS2008) does not get compiles, instead it throws this exception: std::ifstream input (fileName); while (input) { string s; input >> s; cout << s << endl; }; But this code compiles fine in...

Template issue causes linker error (C++)

Hi, I have very little idea what's going in regards to C++ templates, but I'm trying to implement a function that searches a vector for an element satisfying a given property (in this case, searching for one with the name given). My declaration in my .h file is as follows: template <typename T> T* find_name(std::vector<T*> v, std::strin...