Çözüldü Build alırken hata

Bu konu çözüme ulaştırılmıştır. Çözüm için konuya yazılan tüm yorumları okumayı unutmayın. Eğer konudaki yorumlar sorununuzu çözmediyse yeni bir konu açabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

tc1322

MT Üye
MT Üye
Mesaj
359
Çözümler
16
Beğeni
463
Puan
799
Ticaret Puanı
0
osmanlı filesin buildini almaya çalıştığımda şöyle bir hata alıyorum çözülebilecek bir şey mi?




x:
root@ogstudio:/usr/src/Server/game/src # gmake -j20
compiling FSM.cpp
compiling MarkConvert.cpp
compiling MarkImage.cpp
compiling MarkManager.cpp
compiling OXEvent.cpp
compiling ani.cpp
compiling arena.cpp
compiling banword.cpp
compiling battle.cpp
compiling blend_item.cpp
compiling buffer_manager.cpp
compiling building.cpp
compiling char.cpp
compiling char_affect.cpp
compiling char_battle.cpp
compiling char_change_empire.cpp
compiling char_horse.cpp
compiling char_item.cpp
compiling char_manager.cpp
compiling char_quickslot.cpp
compiling char_resist.cpp
compiling char_skill.cpp
compiling char_state.cpp
compiling PetSystem.cpp
char.cpp: In instantiation of 'CHARACTER::CheckSlowMode(bool, BYTE)::<lambda(aut                                                                   o:1)> [with auto:1 = unsigned int]':
char.cpp:5346:81:   required from here
char.cpp:5317:8: warning: address of local variable 'buf' returned [-Wreturn-loc                                                                   al-addr]
   char buf[128 + 1];
        ^~~
compiling cmd.cpp
compiling cmd_emotion.cpp
compiling cmd_general.cpp
compiling cmd_gm.cpp
compiling cmd_oxevent.cpp
compiling config.cpp
compiling constants.cpp
cmd_gm.cpp: In function 'void do_clean(LPCHARACTER, const char*, int, int)':
cmd_gm.cpp:5468:21: warning: structured bindings only available with -std=c++17                                                                    or -std=gnu++17
    for (const auto& [table, where] : _Deleter)
                     ^
compiling crc32.cpp
compiling cube.cpp
compiling db.cpp
compiling desc.cpp
compiling desc_client.cpp
compiling desc_manager.cpp
compiling desc_p2p.cpp
compiling dungeon.cpp
compiling empire_text_convert.cpp
compiling entity.cpp
compiling entity_view.cpp
compiling event.cpp
compiling event_queue.cpp
compiling exchange.cpp
compiling file_loader.cpp
compiling fishing.cpp
compiling gm.cpp
compiling guild.cpp
compiling guild_manager.cpp
compiling guild_war.cpp
compiling horse_rider.cpp
compiling horsename_manager.cpp
compiling input.cpp
compiling input_auth.cpp
compiling input_db.cpp
compiling input_login.cpp
compiling input_main.cpp
compiling input_p2p.cpp
compiling input_udp.cpp
compiling item.cpp
compiling item_addon.cpp
compiling item_attribute.cpp
compiling item_manager.cpp
compiling item_manager_idrange.cpp
compiling locale.cpp
compiling locale_service.cpp
compiling log.cpp
compiling login_data.cpp
compiling lzo_manager.cpp
compiling marriage.cpp
compiling messenger_manager.cpp
compiling mining.cpp
compiling mob_manager.cpp
compiling motion.cpp
compiling p2p.cpp
compiling packet_info.cpp
compiling party.cpp
compiling polymorph.cpp
compiling priv_manager.cpp
compiling pvp.cpp
compiling questevent.cpp
compiling questlua.cpp
compiling questlua_affect.cpp
compiling questlua_arena.cpp
compiling questlua_building.cpp
compiling questlua_danceevent.cpp
compiling questlua_dungeon.cpp
compiling questlua_forked.cpp
compiling questlua_game.cpp
compiling questlua_global.cpp
compiling questlua_guild.cpp
compiling questlua_horse.cpp
compiling questlua_pet.cpp
compiling questlua_item.cpp
compiling questlua_marriage.cpp
compiling questlua_npc.cpp
compiling questlua_oxevent.cpp
compiling questlua_party.cpp
compiling questlua_pc.cpp
compiling questlua_quest.cpp
compiling questlua_target.cpp
compiling questmanager.cpp
compiling questnpc.cpp
compiling questpc.cpp
compiling refine.cpp
compiling regen.cpp
compiling safebox.cpp
compiling sectree.cpp
compiling sectree_manager.cpp
compiling sequence.cpp
compiling shop.cpp
compiling skill.cpp
compiling start_position.cpp
compiling target.cpp
compiling text_file_loader.cpp
compiling trigger.cpp
compiling utils.cpp
utils.cpp: In function 'std::__cxx11::string mysql_hash_password(const char*)':
utils.cpp:33:2: error: 'ma_make_scrambled_password' was not declared in this sco                                                                   pe
  ma_make_scrambled_password(hash_buf, tmp_pwd);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
utils.cpp:33:2: note: suggested alternative: 'make_scrambled_password'
  ma_make_scrambled_password(hash_buf, tmp_pwd);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
  make_scrambled_password
gmake: *** [Makefile:173: .obj/utils.o] Error 1
gmake: *** Waiting for unfinished jobs....
root@ogstudio:/usr/src/Server/game/src #
 
gcc sürümü ile alakalı sanki
 
utils.cpp dosyasındaki kodları ekler misiniz?
 
başkalarının çöp olarak gördüğü dosyaları kullanmanızı tavsiye etmem. onu paylaşanlar sanıyorum ki acemilik dönemlerinde yaptılar ve geride bıraktılar. kod öyle bişeydir ki elinizden kaçırdığınızda bir daha geri dönmek istemezsiniz.(çorba diyoruz buna genelde :D) 0 dan temiz src üzerinden ilerseniz daha faydalı olur.
 
utils.cpp dosyasındaki kodları ekler misiniz?
C++:
#include "stdafx.h"

static int global_time_gap = 0;

time_t get_global_time()
{
    return time(0) + global_time_gap;
}

void set_global_time(time_t t)
{
    global_time_gap = t - time(0);

    char time_str_buf[32];
    snprintf(time_str_buf, sizeof(time_str_buf), "%s", time_str(get_global_time()));

    sys_log(0, "GLOBAL_TIME: %s time_gap %d", time_str_buf, global_time_gap);
}

#include <mysql/mysql.h>
#ifndef SHA1_HASH_SIZE
#define SHA1_HASH_SIZE 20
#endif
#ifdef WIN32
extern "C" void my_make_scrambled_password(char* to, const char* password, size_t pass_len);
#endif
std::string mysql_hash_password(const char* tmp_pwd)
{
    char hash_buf[2 * SHA1_HASH_SIZE + 2] = "";
#ifdef WIN32
    my_make_scrambled_password(hash_buf, tmp_pwd, strlen(tmp_pwd));
#else
    ma_make_scrambled_password(hash_buf, tmp_pwd);
#endif
    return hash_buf;
}

int dice(int number, int size)
{
    int sum = 0, val;

    if (size <= 0 || number <= 0)
        return (0);

    while (number)
    {
        val = ((thecore_random() % size) + 1);
        sum += val;
        --number;
    }

    return (sum);
}

size_t str_lower(const char* src, char* dest, size_t dest_size)
{
    size_t len = 0;

    if (!dest || dest_size == 0)
        return len;

    if (!src)
    {
        *dest = '\0';
        return len;
    }

    --dest_size;

    while (*src && len < dest_size)
    {
        *dest = LOWER(*src);

        ++src;
        ++dest;
        ++len;
    }

    *dest = '\0';
    return len;
}

void skip_spaces(const char** string)
{
    for (; **string != '\0' && isnhspace(**string); ++(*string));
}

const char* one_argument(const char* argument, char* first_arg, size_t first_size)
{
    char mark = FALSE;
    size_t first_len = 0;

    if (!argument || 0 == first_size)
    {
        sys_err("one_argument received a NULL pointer!");
        *first_arg = '\0';
        return NULL;
    }

    --first_size;

    skip_spaces(&argument);

    while (*argument && first_len < first_size)
    {
        if (*argument == '\"')
        {
            mark = !mark;
            ++argument;
            continue;
        }

        if (!mark && isnhspace(*argument))
            break;

        *(first_arg++) = *argument;
        ++argument;
        ++first_len;
    }

    *first_arg = '\0';

    skip_spaces(&argument);
    return (argument);
}

const char* two_arguments(const char* argument, char* first_arg, size_t first_size, char* second_arg, size_t second_size)
{
    return (one_argument(one_argument(argument, first_arg, first_size), second_arg, second_size));
}

#ifdef ENABLE_IMPROVED_GUILD_WAR_SYSTEM
const char* three_arguments(const char* argument, char* first_arg, size_t first_size, char* second_arg, size_t second_size, char* third_arg, size_t third_size)
{
    return (one_argument(one_argument(one_argument(argument, first_arg, first_size), second_arg, second_size), third_arg, third_size));
}
#endif

#ifdef ENABLE_NEW_PET_SYSTEM
const char* four_arguments(const char* argument, char* first_arg, size_t first_size, char* second_arg, size_t second_size, char* third_arg, size_t third_size, char* four_arg, size_t four_size)
{
    return (one_argument(one_argument(one_argument(one_argument(argument, first_arg, first_size), second_arg, second_size), third_arg, third_size), four_arg, four_size));
}

const char* six_arguments(const char* argument, char* first_arg, size_t first_size, char* second_arg, size_t second_size, char* third_arg, size_t third_size, char* four_arg, size_t four_size, char* five_arg, size_t five_size, char* six_arg, size_t six_size)
{
    return (one_argument(one_argument(one_argument(one_argument(one_argument(one_argument(argument, first_arg, first_size), second_arg, second_size), third_arg, third_size), four_arg, four_size), five_arg, five_size), six_arg, six_size));
}
#endif

const char* first_cmd(const char* argument, char* first_arg, size_t first_arg_size, size_t* first_arg_len_result)
{
    size_t cur_len = 0;
    skip_spaces(&argument);

    first_arg_size -= 1;

    while (*argument && !isnhspace(*argument) && cur_len < first_arg_size)
    {
        *(first_arg++) = LOWER(*argument);
        ++argument;
        ++cur_len;
    }

    *first_arg_len_result = cur_len;
    *first_arg = '\0';
    return (argument);
}

int CalculateDuration(int iSpd, int iDur)
{
    if (iSpd == 0)
        return 0;
    return iDur * 100 / iSpd;
}

double uniform_random(double a, double b)
{
    return thecore_random() / (RAND_MAX + 1.f) * (b - a) + a;
}

float gauss_random(float avg, float sigma)
{
    static bool haveNextGaussian = false;
    static float nextGaussian = 0.0f;

    if (haveNextGaussian)
    {
        haveNextGaussian = false;
        return nextGaussian * sigma + avg;
    }
    else
    {
        double v1, v2, s;
        do {
            //v1 = 2 * nextDouble() - 1;   // between -1.0 and 1.0
            //v2 = 2 * nextDouble() - 1;   // between -1.0 and 1.0
            v1 = uniform_random(-1.f, 1.f);
            v2 = uniform_random(-1.f, 1.f);
            s = v1 * v1 + v2 * v2;
        } while (s >= 1.f || fabs(s) < FLT_EPSILON);
        double multiplier = sqrtf(-2 * logf(s) / s);
        nextGaussian = v2 * multiplier;
        haveNextGaussian = true;
        return v1 * multiplier * sigma + avg;
    }
}

int parse_time_str(const char* str)
{
    int tmp = 0;
    int secs = 0;

    while (*str != 0)
    {
        switch (*str)
        {
        case 'm':
        case 'M':
            secs += tmp * 60;
            tmp = 0;
            break;

        case 'h':
        case 'H':
            secs += tmp * 3600;
            tmp = 0;
            break;

        case 'd':
        case 'D':
            secs += tmp * 86400;
            tmp = 0;
            break;

        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
            tmp *= 10;
            tmp += (*str) - '0';
            break;

        case 's':
        case 'S':
            secs += tmp;
            tmp = 0;
            break;
        default:
            return -1;
        }
        ++str;
    }

    return secs + tmp;
}

bool WildCaseCmp(const char* w, const char* s)
{
    for (;;)
    {
        switch (*w)
        {
        case '*':
            if ('\0' == w[1])
                return true;
            {
                for (size_t i = 0; i <= strlen(s); ++i)
                {
                    if (true == WildCaseCmp(w + 1, s + i))
                        return true;
                }
            }
            return false;

        case '?':
            if ('\0' == *s)
                return false;

            ++w;
            ++s;
            break;

        default:
            if (*w != *s)
            {
                if (tolower(*w) != tolower(*s))
                    return false;
            }

            if ('\0' == *w)
                return true;

            ++w;
            ++s;
            break;
        }
    }

    return false;
}

#ifdef ENABLE_PLAYER_SECURITY_SYSTEM
bool is_digits(const std::string& str)
{
    return str.find_first_not_of("0123456789") == std::string::npos;
}
#endif

buyrun

başkalarının çöp olarak gördüğü dosyaları kullanmanızı tavsiye etmem. onu paylaşanlar sanıyorum ki acemilik dönemlerinde yaptılar ve geride bıraktılar. kod öyle bişeydir ki elinizden kaçırdığınızda bir daha geri dönmek istemezsiniz.(çorba diyoruz buna genelde :D) 0 dan temiz src üzerinden ilerseniz daha faydalı olur.
ana uğraşım temiz srcde zaten :D içindeki bazı parçalar hoşuma gitti
 
ma_make_scrambled_password --> make_scrambled_password
x:
utils.cpp: In function 'std::__cxx11::string mysql_hash_password(const char*)':
utils.cpp:33:2: error: 'make_scrambled_password' was not declared in this scope
  make_scrambled_password(hash_buf, tmp_pwd);
  ^~~~~~~~~~~~~~~~~~~~~~~
utils.cpp:33:2: note: suggested alternative: 'ma_make_scrambled_password'
  make_scrambled_password(hash_buf, tmp_pwd);
  ^~~~~~~~~~~~~~~~~~~~~~~
  ma_make_scrambled_password

yok olmadı yine
 
x:
utils.cpp: In function 'std::__cxx11::string mysql_hash_password(const char*)':
utils.cpp:33:2: error: 'make_scrambled_password' was not declared in this scope
  make_scrambled_password(hash_buf, tmp_pwd);
  ^~~~~~~~~~~~~~~~~~~~~~~
utils.cpp:33:2: note: suggested alternative: 'ma_make_scrambled_password'
  make_scrambled_password(hash_buf, tmp_pwd);
  ^~~~~~~~~~~~~~~~~~~~~~~
  ma_make_scrambled_password

yok olmadı yine

utils.cpp ve utils.h atar mısın
 
Şu kodu;
C++:
std::string mysql_hash_password(const char* tmp_pwd)
{
    char hash_buf[2 * SHA1_HASH_SIZE + 2] = "";
#ifdef WIN32
    my_make_scrambled_password(hash_buf, tmp_pwd, strlen(tmp_pwd));
#else
    ma_make_scrambled_password(hash_buf, tmp_pwd);
#endif
    return hash_buf;
}

Şöyle değiştirip dener misin?
C++:
std::string mysql_hash_password(const char* tmp_pwd)
{
    char hash_buf[2*SHA1_HASH_SIZE + 2] = "";
#ifdef WIN32
    my_make_scrambled_password(hash_buf, tmp_pwd, strlen(tmp_pwd));
#else
    make_scrambled_password(hash_buf, tmp_pwd);
#endif
    return hash_buf;
}
 
Şu kodu;
C++:
std::string mysql_hash_password(const char* tmp_pwd)
{
    char hash_buf[2 * SHA1_HASH_SIZE + 2] = "";
#ifdef WIN32
    my_make_scrambled_password(hash_buf, tmp_pwd, strlen(tmp_pwd));
#else
    ma_make_scrambled_password(hash_buf, tmp_pwd);
#endif
    return hash_buf;
}

Şöyle değiştirip dener misin?
C++:
std::string mysql_hash_password(const char* tmp_pwd)
{
    char hash_buf[2*SHA1_HASH_SIZE + 2] = "";
#ifdef WIN32
    my_make_scrambled_password(hash_buf, tmp_pwd, strlen(tmp_pwd));
#else
    make_scrambled_password(hash_buf, tmp_pwd);
#endif
    return hash_buf;
}
olmadı maalesef

c++:
utils.cpp: In function 'std::__cxx11::string mysql_hash_password(const char*)':
utils.cpp:33:5: error: 'make_scrambled_password' was not declared in this scope
     make_scrambled_password(hash_buf, tmp_pwd);
     ^~~~~~~~~~~~~~~~~~~~~~~
utils.cpp:33:5: note: suggested alternative: 'ma_make_scrambled_password'
     make_scrambled_password(hash_buf, tmp_pwd);
     ^~~~~~~~~~~~~~~~~~~~~~~
     ma_make_scrambled_password
gmake: *** [Makefile:172: .obj/utils.o] Error 1
gmake: *** Waiting for unfinished jobs....

utils.cpp ve utils.h atar mısın
buyrun

Linkleri görebilmek için giriş yap veya kayıt ol.
 

Dosya Eklentileri

  • utils.rar
    3,1 KB · Gösterim: 3
olmadı maalesef

c++:
utils.cpp: In function 'std::__cxx11::string mysql_hash_password(const char*)':
utils.cpp:33:5: error: 'make_scrambled_password' was not declared in this scope
     make_scrambled_password(hash_buf, tmp_pwd);
     ^~~~~~~~~~~~~~~~~~~~~~~
utils.cpp:33:5: note: suggested alternative: 'ma_make_scrambled_password'
     make_scrambled_password(hash_buf, tmp_pwd);
     ^~~~~~~~~~~~~~~~~~~~~~~
     ma_make_scrambled_password
gmake: *** [Makefile:172: .obj/utils.o] Error 1
gmake: *** Waiting for unfinished jobs....


buyrun

Linkleri görebilmek için giriş yap veya kayıt ol.

mysql_hash_password

bu fonkisyonu kullanan bir kısım var mı server sourcesinde? yoksa kaldır direkt utils.cpp den ve utils.h dan.

ben açıkcası kraizy (orjinal dokunulmamış dosyalar) de böyle bir fonksiyon göremedim..
 
mysql_hash_password

bu fonkisyonu kullanan bir kısım var mı server sourcesinde? yoksa kaldır direkt utils.cpp den ve utils.h dan.

ben açıkcası kraizy (orjinal dokunulmamış dosyalar) de böyle bir fonksiyon göremedim..
aktif 1 tane bulunuyor komple silip bi build deneyeceğim

güncelleme: bu seferde

c++:
questlua_global.cpp: In function 'void quest::RegisterGlobalFunctionTable(lua_St                     ate*)':
questlua_global.cpp:1791:27: error: '_mysql_password' was not declared in this s                     cope
    { "mysql_password",    _mysql_password     }, // same as the sql function PA                     SSWORD(<str>) [return lua string]
                           ^~~~~~~~~~~~~~~
questlua_global.cpp:1791:27: note: suggested alternative: 'mysql_port'
    { "mysql_password",    _mysql_password     }, // same as the sql function PA                     SSWORD(<str>) [return lua string]
                           ^~~~~~~~~~~~~~~
                           mysql_port
 

Dosya Eklentileri

  • xxxxx.PNG
    xxxxx.PNG
    38,7 KB · Gösterim: 154
Son düzenleme:
Serverde MySQL yüklü dimi
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst