compiler-errors

fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'AMD64'

Hi, I am using VS 2003 .Net on 32 bit XP OS. I have also installed "Microsoft Platform SDK" on my machine. Can I build vc++ application (binaries) targeted for 64 bit OS? I am using following project options : Name="VCLinkerTool" AdditionalOptions="/machine:AMD64 bufferoverflowU.lib" OutputFile="\bin\Release\MM64.dll" ...

Invalid use of 'void' in C++ when using struct and classes

I have 1 compiler error. It is from this line in my code: cout << myClass->Get_Type().discription; Where as Get_Type() is: void Tile::Get_Type() { return &myStruct; } I'm not quite sure what I am doing wrong. Or what for that matter could be going wrong. ...

OpenSSL not listed under PHP modules but shows up in the configure command

PHP 5.2.12 OS X 10.5.8 If I compile PHP from source with the following configure command ./configure --disable-all --with-openssl=shared,/opt/local it succeeds. However, after a make and make install, php -m does not list the openssl module. Based on what I've read, I think it may be due to multiple installs of the openssl librar...

Php error in closure compiler execution

When I run php-closure i get a PHP error Undefined index: HTTP_IF_NONE_MATCH in <b>/php-closure.php</b> on line <b>183</b> Line 184 of php-closure is trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag) { This error only happens when closure has already written the compressed javascript file to the directory once, if the directory is em...

Compiler error when overriding virtual methods

Using VC71 compiler and get compiler errors, that i don't understand. Here comes the example class A { public: virtual int& myMethod() = 0; virtual const int& myMethod()const = 0; }; class B: public A { public: // generates: error C3241: 'const int &B::myMethod(void)' : this method was not introduced by 'A' virtual int& A::myM...

Strange VS2005 compile errors: unable to locate resource file (because the compiler keeps deleting it)

I AM GETTING THE FOLLOWING ERROR IN A VERY SIMPLE CLASS LIBRARY: Error 1 Unable to copy file "obj\Debug\SMIT.SysAdmin.BusinessLayer.Resources.resources" to "obj\Debug\SMIT.SysAdmin.BusinessLayer.SMIT.SysAdmin.BusinessLayer.Resources.resources". Could not find file 'obj\Debug\SMIT.SysAdmin.BusinessLayer.Resources.resources'. SMIT.SysAdmi...

Why would the VB.NET compiler think an interface isn't implemented when it is?

Update I don't think I was clear enough when I originally posted this quesion. Take a look at these screenshots. (Link to bigger screenshot here) Notice the portions I've boxed in red. The class displayed here does implement INotifyPropertyChanged, but the VB compiler seems to think that the PropertyChanged event as declared does no...

Why does the compiler allow a function to return a value that is stored as a reference

Can anybody explain why this code does not generate a compiler error? class Foo { public: int _x; }; Foo getFoo() { Foo myfoo; myfoo._x = 10; return myfoo; } int _tmain() { // shouldn't this line of code be a compiler error? Foo& badfoo = getFoo(); return 0; } ...

inconsistency between Sun JRE javac and Eclipse java compiler?

This confuses me. The following compiles fine under Eclipse. package com.example.gotchas; public class GenericHelper1 { static <T> T fail() throws UnsupportedOperationException { throw new UnsupportedOperationException(); } /** * just calls fail() * @return something maybe */ public boolean argh() { return fail(); } p...

C# - Cannot implicitly convert type List<Product> to List<IProduct>

I have a project with all my Interface definitions: RivWorks.Interfaces I have a project where I define concrete implmentations: RivWorks.DTO I've done this hundreds of times before but for some reason I am getting this error now: Cannot implicitly convert type 'System.Collections.Generic.List<RivWorks.DTO.Product>' to 'System.Coll...

C++ compilation error when passing a function into remove_if

So here's a snippet of my code. void RoutingProtocolImpl::removeAllInfinity() { dv.erase(std::remove_if(dv.begin(), dv.end(), hasInfCost), dv.end()); } bool RoutingProtocolImpl::hasInfCost(RoutingProtocolImpl::dv_entry *entry) { if (entry->link_cost == INFINITY_COST) { free(entry); return true; } else { return...

Trying to use boost lambda, but my code won't compile

Hi, I am trying to use boost lambda to avoid having to write trivial functors. For example, I want to use the lambda to access a member of a struct or call a method of a class, eg: #include <vector> #include <utility> #include <algorithm> #include <boost/lambda/lambda.hpp> using namespace std; using namespace boost::lambda; vector< pa...

Error starting an Android program.

[2010-04-16 23:31:34 - MobileDataKeeper] Error in an XML file: aborting build. [2010-04-16 23:31:57 - MobileDataKeeper] Error in an XML file: aborting build. [2010-04-16 23:32:28 - MobileDataKeeper] Error in an XML file: aborting build. [2010-04-16 23:34:56 - MobileDataKeeper] Error in an XML file: aborting build. [2010-04-16 23:35:14 -...

C++ enumeration

Hi,my question is about enumeration,my codes are : #include<iostream> using namespace std; int main() { enum bolumler {programcilik,donanim,muhasebe,motor,buro} bolum; bolum = donanim; cout << bolum << endl; bolum += 2; // bolum=motor cout << bolum; return 0; } The output should be 1 3 but according to these ...

New to C/C++ Using Android NDK to port Legacy code, getting compile errors

I have been trying to take some old Symbian C++ code over to Android today using the NDK. I have little to no C or C++ knowledge so its been a chore, however has to be done. My main issue is that I'm having trouble porting what I believe is Symbian specifi code to work using the small C/C++ subset that is available with the Android NDK...

'Invalid conversion from some_type** to const some_type**'

I've got a function that requires const some_type** as an argument (some_type is a struct, and the function needs a pointer to an array of this type). I declared a local variable of type some_type*, and initialized it. Then I call the function as f(&some_array), and the compiler (gcc) says: error: invalid conversion from ‘some_type**’ t...

Suppressing "extra ';'" error in GCC when -pedantic is on

Hi all, I'm building my program with -pedantic flag, which causes an extra ';' error (because of a third-party header using a few macros inconsistently; the error is not shown when -pedantic is off). I don't really feel like turning -pedantic off, and neither do I want to edit the header. Is there any way to suppress this exact error? L...

Qt "no matching function for call"

I have no matching function for call to 'saveLine::saveLine()' error when compiling my application. The construcor is never actually called. saveLine class definition: class saveLine { public: saveLine(QWidget *parent); private: QPushButton *selectButton, *acceptButton; QLabel *filePath; QLineEdit *allias; }; saveL...

strange redefined symbols

...

restrict T to a int value?

How can i solve this error msg? static public class Blah { public static T val<T>(this bool b, T v) { return b == true? v:0; } } error Type of conditional expression cannot be determined because there is no implicit conversion between 'T' and 'int ...