This site has been archived and made available for preservation purposes. No edits can be made.
-
Vaultmp wont compile (code::blocks)
OS: Windows 7 SP1
Code::Blocks: 13.12
MinGW: 4.8.1
Time64 & iniparser are inside root directory (
C:\Users\WHOAMI\Desktop\vaultmp-master\source)
I cannot compile any project.:
VaultMaster.cbp:
Code :
||=== Build: Windows in vaultmaster (compiler: GNU GCC Compiler) ===|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\RakNet\NatPunchthroughClient.cpp||In function 'char* TestModeToString(RakNet::NatPunchthroughClient::SendPing::TestMode)':|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\RakNet\NatPunchthroughClient.cpp|791|warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\RakNet\NatPunchthroughClient.cpp|794|warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\RakNet\NatPunchthroughClient.cpp|800|warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\RakNet\NatPunchthroughClient.cpp|803|warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\RakNet\NatPunchthroughClient.cpp|806|warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\RakNet\NatPunchthroughClient.cpp|809|warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\RakNet\NatPunchthroughClient.cpp|812|warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\RakNet\NatPunchthroughClient.cpp|815|warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\RakNet\NatPunchthroughClient.cpp|818|warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\RakNet\RakString.cpp||In member function 'WCHAR* RakNet::RakString::ToWideChar()':|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\RakNet\RakString.cpp|451|warning: deprecated conversion from string constant to 'WCHAR* {aka wchar_t*}' [-Wwrite-strings]|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\RakNet\DR_SHA1.h|172|error: multiple types in one declaration|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\RakNet\DR_SHA1.h|172|error: declaration does not declare anything [-fpermissive]|
||=== Build failed: 2 error(s), 10 warning(s) (0 minute(s), 46 second(s)) ===|
VaultmpDLL.cbp:
Code :
||=== Build: default in vaultmpdll (compiler: GNU GCC Compiler) ===|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp||In function 'void Utils::timestamp()':|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|18|error: 'snprintf' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|22|error: 'printf' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp||In function 'int Utils::progress_func(double, double)':|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|36|error: 'printf' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|47|error: 'stdout' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|47|error: 'fflush' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp||In function 'std::string Utils::toString(int)':|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|59|error: 'snprintf' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp||In function 'std::string Utils::toString(unsigned int)':|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|66|error: 'snprintf' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp||In function 'std::string Utils::toString(unsigned char)':|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|73|error: 'snprintf' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp||In function 'std::string Utils::toString(double)':|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|80|error: 'snprintf' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp||In function 'std::string Utils::toString(long long unsigned int)':|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|87|error: 'snprintf' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp||In function 'unsigned int Utils::FileLength(const char*)':|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|130|error: 'fopen' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|135|error: 'fseek' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|136|error: 'ftell' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|137|error: 'fclose' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp||In function 'bool Utils::crc32file(const char*, unsigned int*)':|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|282|error: 'fopen' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|287|error: 'getc' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|287|error: 'EOF' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|293|error: 'ferror' was not declared in this scope|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\Utils.cpp|298|error: 'fclose' was not declared in this scope|
||=== Build failed: 19 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
Vaultmpserver.cbp:
Code :
||=== Build: debug in vaultserver (compiler: GNU GCC Compiler) ===|
..\RakNet\RakString.cpp|442|warning: extra tokens at end of #ifdef directive [enabled by default]|
..\RakNet\RakString.cpp||In member function 'WCHAR* RakNet::RakString::ToWideChar()':|
..\RakNet\RakString.cpp|451|warning: deprecated conversion from string constant to 'WCHAR* {aka wchar_t*}' [-Wwrite-strings]|
||=== Build failed: 0 error(s), 2 warning(s) (0 minute(s), 0 second(s)) ===|
Any ideas what's wrong? thanks
Last edited by GhoPD; 01-02-2014 at 08:10 PM.
-
Can you try this MinGW distribution:
https://fuch.si/sf
-
Thank you for fast reply!
Now Vaultmp.dll and vaultscript.dll compiles just fine. But still, i have problems with another projects:
Vaultmaster.cpb:
[CODE]||=== Build: Windows in vaultmaster (compiler: GNU GCC Compiler) ===|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\RakNet\RakString.cpp|442|warning: extra tokens at end of #ifdef directive [enabled by default]|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\RakNet\RakString.cpp||In member function 'WCHAR* RakNet::RakString::ToWideChar()':|
C:\Users\WHOAMI\Desktop\vaultmp-master\source\RakNet\RakString.cpp|451|warning: deprecated conversion from string constant to 'WCHAR* {aka wchar_t*}' [-Wwrite-strings]|
c:\mingw\i686-w64-mingw32\include\winnt.h|348|error: expected unqualified-id before ',' token|
c:\mingw\i686-w64-mingw32\include\winnt.h|348|error: two or more data types in declaration of 'PTCHAR'|
||=== Build failed: 2 error(s), 2 warning(s) (0 minute(s), 2 second(s)) ===|
Vaultserver.cbp:
Code :
||=== Build: debug in vaultserver (compiler: GNU GCC Compiler) ===|
||warning: command line option '-std=gnu++1y' is valid for C++/ObjC++ but not for C [enabled by default]|
||warning: command line option '-std=gnu++1y' is valid for C++/ObjC++ but not for C [enabled by default]|
..\stack_trace\src\stack.cpp|21|fatal error: bfd.h: No such file or directory|
makefile.windows|403|recipe for target '.objs\\Debug\\stack_trace\\src\\stack.o' failed|
||=== Build failed: 2 error(s), 2 warning(s) (0 minute(s), 6 second(s)) ===|
(i know it cannot find bfd.h, but i have no idea where this header file is)
Root folder structure:
Toolchain:
Last edited by GhoPD; 01-02-2014 at 09:49 PM.
-
Can you search for bfd.h inside MinGW folder? It is in MinGW/include folder for me. Then just add that as include path inside Code::Blocks, or copy contents of MinGW/include to MinGW/i686-w64-mingw32/include
For the other issue: can you comment line 348 of winnt.h out? (Code::Blocks should direct you into that file when the error comes up). It's some issue with RakNet, but that resolves it for me. This line
Code :
typedef char TCHAR, *PTCHAR;
to
Code :
//typedef char TCHAR, *PTCHAR;
(make sure it's just a temporary change to compile master server)
-
I've redownloaded and reinstalled everything (MinGW too), now VaultmpDLL, Vaultscript and Vaultmaster compiles just fine, but vaultmaster crashes immediately after launching.
Vaultserver.cbp throws tons of warnings (cut):
Code :
||=== Build: debug in vaultserver (compiler: GNU GCC Compiler) ===|
..\RakNet\RakString.cpp||In member function 'WCHAR* RakNet::RakString::ToWideChar()':|
..\RakNet\RakString.cpp|451|warning: deprecated conversion from string constant to 'WCHAR* {aka wchar_t*}' [-Wwrite-strings]|
||warning: command line option '-std=gnu++1y' is valid for C++/ObjC++ but not for C [enabled by default]|
||warning: command line option '-std=gnu++1y' is valid for C++/ObjC++ but not for C [enabled by default]|
||warning: command line option '-std=gnu++1y' is valid for C++/ObjC++ but not for C [enabled by default]|
||warning: command line option '-std=gnu++1y' is valid for C++/ObjC++ but not for C [enabled by default]|
||warning: command line option '-std=gnu++1y' is valid for C++/ObjC++ but not for C [enabled by default]|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amx.h|446|note: in expansion of macro 'amx_Address'|
amx\amx.h|454|note: in expansion of macro 'amx_StrParam_Type'|
amx\amxfile.c|894|note: in expansion of macro 'amx_StrParam'|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amx.h|449|note: in expansion of macro 'amx_Address'|
amx\amx.h|454|note: in expansion of macro 'amx_StrParam_Type'|
amx\amxfile.c|894|note: in expansion of macro 'amx_StrParam'|
amx\amxfile.c||In function 'n_fcreatedir':|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amx.h|446|note: in expansion of macro 'amx_Address'|
amx\amx.h|454|note: in expansion of macro 'amx_StrParam_Type'|
amx\amxfile.c|916|note: in expansion of macro 'amx_StrParam'|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amx.h|449|note: in expansion of macro 'amx_Address'|
amx\amx.h|454|note: in expansion of macro 'amx_StrParam_Type'|
amx\amxfile.c|916|note: in expansion of macro 'amx_StrParam'|
amx\amxfile.c||In function 'n_filecrc':|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amx.h|446|note: in expansion of macro 'amx_Address'|
amx\amx.h|454|note: in expansion of macro 'amx_StrParam_Type'|
amx\amxfile.c|1020|note: in expansion of macro 'amx_StrParam'|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amxstring.c|916|note: in expansion of macro 'amx_Address'|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amxstring.c|917|note: in expansion of macro 'amx_Address'|
amx\amxstring.c||In function 'n_strformat':|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amxstring.c|966|note: in expansion of macro 'amx_Address'|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amxstring.c|970|note: in expansion of macro 'amx_Address'|
||warning: command line option '-std=gnu++1y' is valid for C++/ObjC++ but not for C [enabled by default]|
amx\amxtime.c||In function 'settime':|
amx\amxtime.c|138|warning: left shift count >= width of type [enabled by default]|
amx\amxtime.c|140|warning: left shift count >= width of type [enabled by default]|
amx\amxtime.c|142|warning: left shift count >= width of type [enabled by default]|
amx\amxtime.c||In function 'setdate':|
amx\amxtime.c|173|warning: left shift count >= width of type [enabled by default]|
amx\amxtime.c|175|warning: left shift count >= width of type [enabled by default]|
amx\amxtime.c|180|warning: left shift count >= width of type [enabled by default]|
amx\amxtime.c||In function 'n_gettime':|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amxtime.c|232|note: in expansion of macro 'amx_Address'|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amxtime.c|234|note: in expansion of macro 'amx_Address'|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amxtime.c|236|note: in expansion of macro 'amx_Address'|
amx\amxtime.c||In function 'n_getdate':|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amxtime.c|270|note: in expansion of macro 'amx_Address'|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amxtime.c|272|note: in expansion of macro 'amx_Address'|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amxtime.c|274|note: in expansion of macro 'amx_Address'|
amx\amxtime.c||In function 'n_tickcount':|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amxtime.c|291|note: in expansion of macro 'amx_Address'|
amx\amxtime.c||In function 'n_gettimer':|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amxtime.c|340|note: in expansion of macro 'amx_Address'|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\amxtime.c|342|note: in expansion of macro 'amx_Address'|
||warning: command line option '-std=gnu++1y' is valid for C++/ObjC++ but not for C [enabled by default]|
amx\float.c||In function 'n_strfloat':|
amx\amx.h|427|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
amx\float.c|76|note: in expansion of macro 'amx_Address'|
||warning: command line option '-std=gnu++1y' is valid for C++/ObjC++ but not for C [enabled by default]|
||warning: command line option '-std=gnu++1y' is valid for C++/ObjC++ but not for C [enabled by default]|
amx\amx.c||In function 'amx_Callback':|
amx\amx.c|582|warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]|
amx\amx.c||In function 'VerifyPcode':|
amx\amx.c|662|warning: left shift count >= width of type [enabled by default]|
amx\amx.c||In function 'amx_Register':|
amx\amx.c|1910|warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]|
..\packet\PacketFactory.hpp|565|error: 'ID_BASE_NEW' is not a member of 'pTypes'|
..\Base.hpp|44|note: in expansion of macro 'PF_MAKE_E'|
makefile.windows|412|recipe for target '.objs\\Debug\\vaultserver\\Script.o' failed|
||=== Build failed: 2 error(s), 374 warning(s) (0 minute(s), 21 second(s)) ===|
I'm lost.
It's the newest source code from github. (master branch)
Last edited by GhoPD; 01-03-2014 at 02:15 PM.
-
You didn't checkout the correct branch of the serialization module. Use git submodule init and git submodule update (or directly download the branch from GitHub by clicking on that @ <commit> link of the submodule)
No idea why vaultmaster crashes, it works fine for me.
-
Indeed, thank you!
Code :
||=== Build: release in vaultserver (compiler: GNU GCC Compiler) ===|
.objs\Release\vaultserver\Script.oScript.cpp|| undefined reference to `gmtime64(long long const*)'|
.objs\Release\vaultserver\Script.oScript.cpp|| undefined reference to `gmtime64(long long const*)'|
.objs\Release\vaultserver\Script.oScript.cpp|| undefined reference to `gmtime64(long long const*)'|
.objs\Release\vaultserver\Script.oScript.cpp|| undefined reference to `gmtime64(long long const*)'|
.objs\Release\vaultserver\Script.oScript.cpp|| undefined reference to `gmtime64_r(long long const*, tm*)'|
.objs\Release\vaultserver\Script.oScript.cpp|| undefined reference to `gmtime64_r(long long const*, tm*)'|
.objs\Release\vaultserver\Script.oScript.cpp|| undefined reference to `gmtime64_r(long long const*, tm*)'|
.objs\Release\vaultserver\Script.oScript.cpp|| undefined reference to `gmtime64_r(long long const*, tm*)'|
.objs\Release\vaultserver\Script.oScript.cpp|| undefined reference to `gmtime64_r(long long const*, tm*)'|
.objs\Release\vaultserver\Script.oScript.cpp|| undefined reference to `mktime64(tm*)'|
.objs\Release\vaultserver\Script.oScript.cpp|| undefined reference to `gmtime64_r(long long const*, tm*)'|
.objs\Release\vaultserver\Script.oScript.cpp|| undefined reference to `mktime64(tm*)'|
.objs\Release\vaultserver\Script.oScript.cpp|| undefined reference to `gmtime64_r(long long const*, tm*)'|
.objs\Release\vaultserver\Script.oScript.cpp|| undefined reference to `mktime64(tm*)'|
.objs\Release\vaultserver\Script.oScript.cpp|| undefined reference to `gmtime64_r(long long const*, tm*)'|
.objs\Release\vaultserver\Script.oScript.cpp|| undefined reference to `mktime64(tm*)'|
makefile.windows|582|recipe for target 'out_release' failed|
||=== Build failed: 17 error(s), 0 warning(s) (1 minute(s), 12 second(s)) ===|
I have master branch from https://github.com/foxtacles/y2038
Last edited by GhoPD; 01-03-2014 at 05:58 PM.
-
Don't use the master branch. Please check out the referenced version. Just like with the serialization submodule.
-
I'm using this branch: https://github.com/foxtacles/y2038/t...65ac71677cc558
Now it throws this:
Code :
||=== Build: release in vaultserver (compiler: GNU GCC Compiler) ===|
.objs\Release\time\time64.otime64.c|| undefined reference to `localtime_r'|
.objs\Release\time\time64.otime64.c|| undefined reference to `localtime_r'|
makefile.windows|582|recipe for target 'out_release' failed|
||=== Build failed: 3 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
I'm little confused because localtime_r is a POSIX stuff
Last edited by GhoPD; 01-03-2014 at 06:23 PM.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules