• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling Compilling error x64

Insane329

New Member
Joined
Jun 24, 2014
Messages
84
Reaction score
0
Hello. I am trying to compile avesta in 64 bit mode, but here comes an error. Is there anyone who can help me?


Code:
 fileloader.cpp
1>fileloader.cpp(366): error C2780: 'const _Ty &std::min(const _Ty &,const _Ty &,_Pr)' : expects 3 arguments - 2 provided
1>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility(2101) : see declaration of 'std::min'
1>fileloader.cpp(366): error C2782: 'const _Ty &std::min(const _Ty &,const _Ty &)' : template parameter '_Ty' is ambiguous
1>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility(2093) : see declaration of 'std::min'
1>          could be 'size_t'
1>          or       'unsigned long'
 
I will insert the whole file, it's short. For more specification, i am using this visual 2010 express, with WindowsSDK 7.1 (to compile it in 64 bit mode) and with libraries from x32 so i dont know, if it should work, but i am still trying, because i have to do this. I remember that i compiled TFS about two years ago, but dont remember how o.O. Here is a proof that compilling in express is possible in 64bit mode: http://stackoverflow.com/questions/...4-bit-application-using-visual-c-2010-express

code begins from the 365 line. Below i will upload the whole file, it isnt big.

http://pastebin.com/wn5cZzsP


Code:
//get maximun read block size and calculate remaining bytes
            reading = std::min(remain, m_cached_data[i].size - m_cache_offset);
            remain = remain - reading;

            //read it
            memcpy(buffer + bufferPos, m_cached_data[m_cache_index].data + m_cache_offset, reading);

            //update variables
            m_cache_offset = m_cache_offset + reading;
            bufferPos = bufferPos + reading;
            pos = pos + reading;
        }while(remain > 0);
        return true;
    }
    else{
        if(fseek(m_file, pos, SEEK_SET)){
            m_lastError = ERROR_SEEK_ERROR;
            return false;
        }
        size_t value = fread(buffer, 1, size, m_file);
        if(value != size){
            m_lastError = ERROR_EOF;
            return false;
        }
        else{
            return true;
        }
    }
}

bump
 
Last edited by a moderator:
Back
Top