This site has been archived and made available for preservation purposes. No edits can be made.

Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Compiling from source

  1. #1

    Compiling from source

    Dear Recycler and VAULT-TEC Multiplayer team.
    When I compile vaultmp, I get a series of errors:
    Code :
    ||=== vaultmp, Release ===|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\RakNet\GetTime.cpp||In function 'RakNet::TimeUS GetTimeUS_Windows()':|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\RakNet\GetTime.cpp|143|error: cannot convert 'DWORD* {aka long unsigned int*}' to 'PDWORD_PTR {aka long long unsigned int*}' for argument '2' to 'WINBOOL GetProcessAffinityMask(HANDLE, PDWORD_PTR, PDWORD_PTR)'|
    ||=== Build finished: 1 errors, 0 warnings ===|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\API.cpp||In constructor 'API::op_Arg5::op_Arg5()':|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\API.cpp|162|error: cast from 'char**' to 'unsigned int' loses precision [-fpermissive]|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\API.cpp|162|error: cast from 'unsigned int*' to 'unsigned int' loses precision [-fpermissive]|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\API.cpp|162|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\API.cpp|163|error: cast from 'unsigned int**' to 'unsigned int' loses precision [-fpermissive]|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\API.cpp|163|error: cast from 'unsigned int*' to 'unsigned int' loses precision [-fpermissive]|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\API.cpp|163|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\API.cpp|164|error: cast from 'char**' to 'unsigned int' loses precision [-fpermissive]|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\API.cpp|164|error: cast from 'unsigned int*' to 'unsigned int' loses precision [-fpermissive]|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\API.cpp|164|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\API.cpp|899|error: cast from 'char*' to 'unsigned int' loses precision [-fpermissive]|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\API.cpp|899|error: cast from 'char*' to 'unsigned int' loses precision [-fpermissive]|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\API.cpp|902|error: cast from 'char*' to 'unsigned int' loses precision [-fpermissive]|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\API.cpp|902|error: cast from 'char*' to 'unsigned int' loses precision [-fpermissive]|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\Game.cpp|139|error: cast from 'double*' to 'unsigned int' loses precision [-fpermissive]|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\Game.cpp|140|error: cast from 'double*' to 'unsigned int' loses precision [-fpermissive]|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\Game.cpp|141|error: cast from 'double*' to 'unsigned int' loses precision [-fpermissive]|
    ||=== Build finished: 14 errors, 3 warnings ===|
    C:\Users\Koncord\Desktop\Foxtacles-vaultmp-852fb2f\source\Game.cpp|142|error: cast from 'double*' to 'unsigned int' loses precision [-fpermissive]|
    ||=== Build finished: 15 errors, 3 warnings ===|
    Why will not you use the new style code?
    If this overcome compilation step, I can try to implement versions and plugin synchronization.

    Excuse me for my english ^_^
    Last edited by Koncord; 10-29-2012 at 05:16 PM.

  2. #2
    Administrator
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    1,057
    Blog Entries
    5
    Are you targeting a 64bit system? If so, that doesn't work (it may work if you suppress the errors but I can't guarantee that). vaultmp must be compiled as a 32bit application, as Fallout 3 / Fallout: New Vegas is 32bit too (I may introduce 64bit vaultserver some time, though)

  3. #3
    Okay, I used flag "-m32" and it is compiled.
    But the code is clearly in need of a strong recycling!
    From Russia with love.

  4. #4
    Code :
    .objs\Release\API.o:API.cpp|| undefined reference to `_ceil'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__Znwj'|
    .objs\Release\API.o:API.cpp|| undefined reference to `_memset'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZSt17__throw_bad_allocv'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__Znwj'|
    .objs\Release\API.o:API.cpp|| undefined reference to `_memset'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZSt17__throw_bad_allocv'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZNSsC1Ev'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZNSsC1ERKSs'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZNSsC1Ev'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZNSsC1ERKSs'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZNSsC1Ev'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZNSsC1ERKSs'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZdlPv'|
    .objs\Release\API.o:API.cpp|| undefined reference to `___gxx_personality_sj0'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__Unwind_SjLj_Register'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__Unwind_SjLj_Unregister'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__Unwind_SjLj_Resume'|
    .objs\Release\API.o:API.cpp|| undefined reference to `___gxx_personality_sj0'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__Unwind_SjLj_Register'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__Unwind_SjLj_Unregister'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__Unwind_SjLj_Resume'|
    .objs\Release\API.o:API.cpp|| undefined reference to `___gxx_personality_sj0'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__Unwind_SjLj_Register'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__Unwind_SjLj_Unregister'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__Unwind_SjLj_Resume'|
    .objs\Release\API.o:API.cpp|| undefined reference to `___gxx_personality_sj0'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__Unwind_SjLj_Register'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__Unwind_SjLj_Unregister'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__Unwind_SjLj_Resume'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZNSsC1EPKcRKSaIcE'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZNSs4_Rep10_M_destroyERKSaIcE'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZNSsC1EPKcRKSaIcE'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZNSs4_Rep10_M_destroyERKSaIcE'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZNSsC1EPKcRKSaIcE'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZNSs4_Rep10_M_destroyERKSaIcE'|
    .objs\Release\API.o:API.cpp|| undefined reference to `___gxx_personality_sj0'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__Unwind_SjLj_Register'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZNSsC1EPKcRKSaIcE'|
    .objs\Release\API.o:API.cpp|| undefined reference to `_strtok'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__imp__isupper'|
    .objs\Release\API.o:API.cpp|| undefined reference to `___cxa_allocate_exception'|
    .objs\Release\API.o:API.cpp|| undefined reference to `___cxa_throw'|
    .objs\Release\API.o:API.cpp|| undefined reference to `_strtok'|
    .objs\Release\API.o:API.cpp|| undefined reference to `___cxa_allocate_exception'|
    .objs\Release\API.o:API.cpp|| undefined reference to `___cxa_throw'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZNSsC1EPKcRKSaIcE'|
    .objs\Release\API.o:API.cpp|| undefined reference to `__ZNSs4_Rep10_M_disposeERKSaIcE'|
    .objs\Release\API.o:API.cpp|| undefined reference to `_memcpy'|
    ||More errors follow but not being shown.|
    ||Edit the max errors limit in compiler options...|
    ||=== Build finished: 50 errors, 13 warnings ===|
    New errors...
    I hate code::blocks =)
    From Russia with love.

  5. #5
    Administrator
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    1,057
    Blog Entries
    5
    Quote Originally Posted by Koncord View Post
    But the code is clearly in need of a strong recycling!
    Care to elaborate? vaultmp compiles with strongest diagnostics level (-pedantic-errors -pedantic -Wfatal-errors -Wextra -Wall). I admit there are still some classes which need to be refactored (mainly API and Script), but I'm working on that (also check GitHub issues) on the "pedantic" branch.

    I'm not sure about the linker errors. You are using GCC 4.7.1? Don't forget to also add -m32 to the linker flags.
    Last edited by foxtacles; 10-29-2012 at 07:41 PM.

  6. #6
    .objs\Release\vaultmp.o:vaultmp.cpp|| undefined reference to `__Z18iniparser_freedictP12_dictionary_'|
    .objs\Release\vaultmp.o:vaultmp.cpp|| undefined reference to `__Z14iniparser_loadPKc'|
    .objs\Release\vaultmp.o:vaultmp.cpp|| undefined reference to `__Z19iniparser_getstringP12_dictionary_PKcS2_'|
    .objs\Release\vaultmp.o:vaultmp.cpp|| undefined reference to `__Z19iniparser_getstringP12_dictionary_PKcS2_'|
    .objs\Release\vaultmp.o:vaultmp.cpp|| undefined reference to `__Z16iniparser_getintP12_dictionary_PKci'|
    .objs\Release\vaultmp.o:vaultmp.cpp|| undefined reference to `__Z20iniparser_getbooleanP12_dictionary_PKci'|
    .objs\Release\vaultmp.o:vaultmp.cpp|| undefined reference to `__Z19iniparser_getstringP12_dictionary_PKcS2_'|
    ||=== Build finished: 7 errors, 0 warnings ===|
    I use MinGW32 4.7.0.
    Next series error. I use only "-m32" flag in compiler and linker. Thank you for helping me =).
    Last edited by Koncord; 10-30-2012 at 07:40 AM.
    From Russia with love.

  7. #7
    Administrator
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    1,057
    Blog Entries
    5
    Did you get the iniparser submodule? If yes, please make sure you have the correct commit checked out (as shown in the main vaultmp repository):

    https://github.com/Foxtacles/inipars...bfa6ce8d28c95c

  8. #8
    Thank you very much! I just forgot to compile Iniparser. More precisely is not generated object file Iniparser. Compiling with using Cygwin.
    Last edited by Koncord; 10-30-2012 at 03:00 PM.
    From Russia with love.

  9. #9
    -------------- Build: Release in vaultmp ---------------

    Linking executable: vaultmp.exe
    c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: i386:x86-64 architecture of input file `.objs\Release\vaultmp.res' is incompatible with i386 output
    collect2.exe: error: ld returned 1 exit status
    Process terminated with status 1 (0 minutes, 0 seconds)
    0 errors, 0 warnings
    Hmm, now the problem with ld. I would myself correctet, but I bad know standards GNU and Code::Blocks, help me.
    Last edited by Koncord; 10-30-2012 at 03:26 PM.
    From Russia with love.

  10. #10
    Administrator
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    1,057
    Blog Entries
    5
    You need to compile the resource targeting pe-i386 (windres.exe). Try to add "-F pe-i386" to windres in the toolchain executables tab.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •