Jump to content

64bit compile (-m64))


Recommended Posts

Hello, im looking for someone which can help me to tell me how i can make the files compile with -m64 flag On a 64bit machine.

I've already started to change some datatypes, but I'm not 100% sure if all is correct.

 

I would pay for help!

 

Edit: (my current changes)

(These i made long time ago (byte, word, DWORD) and it's fine. (I'm also using it on my 32bit files.
BYTE -> uint8_t
WORD -> uint16_t
DWORD -> uint32_t

 

New changes because of 64bit source:

int -> int32_t
unsigned int -> uint32_t
unsigned char -> uint8_t
long long -> int64_t
unsigned short -> uint16_t
short -> int16_t

(i have changed all types on (common, db, game, libgame, liblua, libsql, libthecore, libpoly))

I'm very unsure because of (size_t, ssize_t, time_t, long) if I try to change them, i get problems. And I'm not sure because of the type changes at libs.

Thank you

Edited by JeeX
Link to comment
Share on other sites

  • Management

Hi,

I made this list for my project, 2 years ago.
For some files, changing the type was not necessary.

If it can help you:

DWORD > uint32_t
WORD > uint16_t
BYTE > uint8_t
IDENT > uint32_t
long long int > int64_t
signed long long > int64_t
long long > int64_t
unsigned long > uint32_t
long int > int32_t
long > int32_t
short int > int16_t
unsigned short > uint16_t
short > int16_t
unsigned char > uint8_t
time_t >  int32_t
size_t > uint32_t
unsigned int > uint32_t
INT > int32_t
int >  int32_t
uint >  uint32_t
signed > int32_t
unsigned > uint32_t
char > don't touch
signed char > char
  • Love 2
Link to comment
Share on other sites

3 hours ago, ASIKOO said:

Hi,

I made this list for my project, 2 years ago.
For some files, changing the type was not necessary.

If it can help you:

DWORD > uint32_t
WORD > uint16_t
BYTE > uint8_t
IDENT > uint32_t
long long int > int64_t
signed long long > int64_t
long long > int64_t
unsigned long > uint32_t
long int > int32_t
long > int32_t
short int > int16_t
unsigned short > uint16_t
short > int16_t
unsigned char > uint8_t
time_t >  int32_t
size_t > uint32_t
unsigned int > uint32_t
INT > int32_t
int >  int32_t
uint >  uint32_t
signed > int32_t
unsigned > uint32_t
char > don't touch
signed char > char

Thank you, this will help too!!!

After I changed long to int32_t i tryed to start and got some Lzo problems

spacer.png

You remember, did you changed all types on (libgame, libpoly, libsql, libthecore, liblua) too? (I made)

In 5 files there i keeped some lines with long, because it wasn't able to convert because of default libarys (for example MySQL (unsigned long)

libsql/Statement.h + .cpp (Problem because of standard library)

common/singleton.h (not possible to change here)

game/src/char_item.cpp (just 1 line)

game/src/questmanager.cpp (2 lines convert from const char* to long i made with std::stoi())

 

size make some problems too after changes. (cipher gave me horrible errors after size change...)

important to know is, should be mostly (99% of libthecore and so on too converted?)

 

thank you very much!

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Management

If I remember correctly, I modified only on common, game, db and qc.
I didn't modify the libraries, unless it was really necessary (Linked error :kekw:).
I haven't touched LZO.

 

My project in 64 bits (MySQL 8 / CLang), If you want to watch / get inspired.

https://metin2.download/file/2F4G99hCLY43bgQ9drjPb50cXs9ujZxe/

I'm not an expert and I may have made mistakes. But I could compile and run a 64-bit server from a dedicated server with FreeBSD 12 or 13.

  • Love 2
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 5

      Effect weapons

    2. 3

      Crystal Metinstone

    3. 3

      Feeding game source to LLM

    4. 113

      Ulthar SF V2 (TMP4 Base)

    5. 3

      Feeding game source to LLM

    6. 0

      Target Information System

    7. 3

      Feeding game source to LLM

    8. 2

      anti exp explanation pls

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.