-
Notifications
You must be signed in to change notification settings - Fork 46
vaultmp - Compiling in Code Blocks #141
Comments
This happens if the C++ standard library that comes with your MinGW does not include thread support. Check this answer: https://stackoverflow.com/a/17986785 I also mentioned it in the instructions: https://github.com/foxtacles/vaultmp#compilation |
Thanks I fixed the error, will let you know how it goes. |
which GCC version are you using? probably something changed in a newer version, leading to issues like that. maybe you can get a mingw64 including GCC 4.9 - otherwise the current code would probably need to be adjusted (not sure how much effort this would be, I have no mingw setup to try atm) |
I changed the makefile to run the 32-bit g++ and Ive resolved the previous issue. Let you know how it goes. |
Hey Chris I'm having trouble with the ini parser I compiled it in linux then copied the files .a and .so.0 files into MinGW's 32-bit lib folder but its not linking either by using -liniiparser or -l:libiniparser.a . How can I compile it under Codeblocks and MinGW? Setting up a standard static library did not work. |
https://github.com/foxtacles/vaultmp/tree/master/source/lib there are C::B project files and makefiles for iniparser and time libraries, did you try them to compile them on Windows? |
Hey, I needed to create my own makefile for the ini parser which I based off the raknet makefile. |
https://github.com/foxtacles/vaultmp/blob/master/source/lib/iniparser_makefile.windows this one didn't work? maybe you are missing -m32 in the |
It still does not get loaded when linking, both with and without -m32, any ideas? |
Think I know the issue. The command is running 64-bit ld.exe as shown here: |
hmm, strange. are you re-compiled all parts after you changed the compiler version? alternatively you can try the Release build which does not require stack trace |
it cannot find libbfd.a as its skipping incompatible. So I'm guessing its not a proper 32-bit version. |
can you try this makefile? https://github.com/foxtacles/vaultmp/blob/master/source/lib/time_makefile.windows |
I believe the makefile is in the wrong location, it uses relative pathes inside make sure that the containing folder of the makefile + time\time64.c is a valid path to the source file. or adjust the pathes inside the makefile |
hmm yep that's an issue. gmtime_r and localtime_r are functions that should be called (not declared), they should be in time.h which should be included. not sure why it can't recognize them |
Trying to include the time.h header and includes doesn't help. Have I include the arguments in the right section? https://gist.github.com/Langerz82/a61b759dc494f7f40c10404dba1c6d45 |
are you sure that you checked out the correct git submodule commit? compare this file with yours: https://github.com/foxtacles/y2038/blob/a05feb76f1a204a016a7e023a365ac71677cc558/time64_config.h#L44 |
I commented out all 3 and it compiles ok. |
I think you also didn't check out the proper submodule commit in this case. just checking out the iniparser repository won't do, the submodule points to a specific commit (which contains slight changes to make the library work with vaultmp): https://github.com/foxtacles/vaultmp/tree/master/source/lib it says |
can you compare your iniparser.h and verify it contains: |
if you were using master branch, you were not using the right commit - it is specified by the submodule. in this case it is indeed the cplusplus branch |
Many thanks its compiling now. I get version mismatch because I'm using 1.7.0.3 How do I obtain the new hash? |
How do I compile vaultmpd.exe? Many thanks for helping me thus far. I hope to contribute quite a bit once I've figured out how to do a basic compile. |
I'd ignore the hashing for now (you can comment it out in the code). That was just a simple mechanism used for released builds. vaultmpd.exe is the produced executable of vaultmp when you use the |
I'm getting an access violation error when running vaultmpd.exe. Here is my makefile: edit: |
I am getting this when trying to compile the Game Server. Any ideas? Here is my makefile: |
It's a problem with timer not being compiled with the -m64 option. However the main Game Server is compiled with -m32 any ideas? |
I cant seem to compile time into a 64-bit library. Here is my makefile: time MakefileCC = gcc.exe INCLUDE = -I"D:\Program Files\mingw-w64\x86_64-4.9.1-release-posix-sjlj\mingw64\include" RM = cmd /c del /f COMPILE.c=$(CC) SRCS = time64.c OBJS = $(SRCS:.c=.o) default: libtime64.a libtime64.a: $(OBJS) clean: |
I think it should all be compiled as 32bit (including all libraries). The Are you sure that you compiled and are linking the correct version of the library everywhere? This goes for ALL submodules that were used in the repository. If you don't properly set up the submodules, you will not get the right code version of the repositories and it leads to all sorts of issues. For instance if you just clone the respective repositories - it is not the same as initializing the submodules and it causes errors like this. |
@fox many thanks for clearing that up for me, I think I got it now. |
you should be getting some debug info if you compile the Debug version of it (and you need to have this file https://github.com/foxtacles/vaultmp/blob/master/source/deps/exchndl.dll in the same folder as the executable then). it should dump a stack trace in a text file |
Have you got the windows makefile for the vaultscript.dll ? |
there is no makefile for that, just a C::B project file: https://github.com/foxtacles/vaultmp/blob/master/source/vaultscript/vaultscript.cbp |
Managed to compile the vaultscript.dll ran vaultserver but still the same error without any stack trace. Is there a specific C++ Redistributal or .NET framework I am missing? I have 4.5,4.6,4.7 |
Tried to rebuild everything still same error. Tried opening it in OllyDBG but the callstack give me no useful info. Did you compile everything in windows? |
Hello,
I'm receiving the following error wondering if you have any idea how to fix.
See:
![image](https://cloud.githubusercontent.com/assets/9509069/26779881/834209ec-4a2a-11e7-8c74-120581437ac1.png)
The text was updated successfully, but these errors were encountered: