I thought Mingw-w64 compiling was fixed...

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: I thought Mingw-w64 compiling was fixed...

Re: I thought Mingw-w64 compiling was fixed...

by Blzut3 » Sat Dec 17, 2016 12:29 am

Just wanted to say that I could have sworn I did something about that since I know I've seen it. Stay tuned though. I'm travelling back to Ohio for the holidays so it may be a few days before I look at this again.

Re: I thought Mingw-w64 compiling was fixed...

by Danfun64 » Thu Dec 15, 2016 10:15 am

The good news is that I finally managed to compile 100%...the bad news is that it CTD.
After failing with a Release build, I compiled a Debug build (log here). When loading the Debug EXE in GDB, the game manages to load, but goes back to the Desktop five seconds into every time i try to open the fullscreen ZDoom tab.
Spoiler:

Re: I thought Mingw-w64 compiling was fixed...

by Danfun64 » Thu Dec 15, 2016 12:09 am

Fluidsynth is available as a MSYS2 package. If I wanted to compile Fluidsynth by hand, the dependencies...recommend using MSYS2. I don't want to mix two different toolkits.

It's too late at night for me to test your latest suggestion, but sometime tomorrow I will link mpg123 straight from the DLL instead of a .a file

Re: I thought Mingw-w64 compiling was fixed...

by Blzut3 » Wed Dec 14, 2016 11:45 pm

You don't need import libraries for MInGW. Just point to the dll file.

Fluidsynth should work with your TDM build once you have it. ZDoom dynamically links to it at run time and doesn't require the header or the library at compile time.

Re: I thought Mingw-w64 compiling was fixed...

by Danfun64 » Wed Dec 14, 2016 10:18 pm

Code: Select all

MPG123_INCLUDE_DIR:PATH=C:/gzdoom-compile/mpg123-1.23.8-x86

Code: Select all

MPG123_LIBRARIES:FILEPATH=C:/gzdoom-compile/mpg123-1.23.8-x86/libmpg123-0.a
As mentioned on the wiki, I renamed libmpg123-0.dll.def to libmpg123-0.def. Then, following instructions here, I went to cmd and typed in "dlltool -d libmpg123-0.def -l libmpg123-0.a"

Code: Select all

SNDFILE_INCLUDE_DIR:PATH=C:/Program Files (x86)/Mega-Nerd/libsndfile/include

Code: Select all

SNDFILE_LIBRARY:FILEPATH=C:/Program Files (x86)/Mega-Nerd/libsndfile/lib/libsndfile-1.a
edit: Something I'm not sure you know. TDM-GCC MinGW-W64 is based of GCC 5. MSYS2 MinGW-W64 is based off GCC 6. If anyone decides to get things to work with MSYS2 (which I recommend at least so that Fluidsynth works), whoever does so will need to keep this and this in mind.

Hopefully sometime in the next couple months the issues that hinder using MinGW-W64 to compile (G)ZDoom (both 32 and 64 bit) will be finally resolved...

Re: I thought Mingw-w64 compiling was fixed...

by Blzut3 » Wed Dec 14, 2016 9:27 pm

Your NO_FMOD build problem is the libsndfile and libmpg123 that you're linking to. What do you have set for those values in CMake?

As for FMOD, I see the problem. I was still using 4.26.36 and didn't notice that fmod_wrap needs to be updated.

Re: I thought Mingw-w64 compiling was fixed...

by Danfun64 » Wed Dec 14, 2016 8:51 pm

Compiling with Fmod EX 4.44.64 turned on results in this:
Spoiler:
Attempting to use FMod Studio 1.06.20 gives an error on the CMake side of things.

Attempting to use NO_FMOD does this: https://paste.debian.net/902258/

Re: I thought Mingw-w64 compiling was fixed...

by Blzut3 » Wed Dec 14, 2016 7:41 pm

My environment happened to have CMake detect the 32-bit only version of windres.exe so this didn't occur for me. Easy to fix though, set CMAKE_RC_FLAGS to: -F pe-i386

Re: I thought Mingw-w64 compiling was fixed...

by Danfun64 » Wed Dec 14, 2016 1:30 pm

...if it compiles for you, you must have done something differently than I did.

Unfortunately, TDM-GCC-64 doesn't provide a i686-w64-mingw32 (something msys2 *does* provide, amusingly enough, though I doubt it will work better than 64-bit msys2), and the 32-bit TDM download gives me the impression that it's the old Mingw32.
Spoiler:

Re: I thought Mingw-w64 compiling was fixed...

by Blzut3 » Tue Dec 13, 2016 11:33 pm

Just add -m32 to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS. You may or may not need to adjust the location of some of the libraries in CMake to point to the 32-bit versions, but if that's the case the linker errors will guide you as to which ones.

Re: I thought Mingw-w64 compiling was fixed...

by Danfun64 » Tue Dec 13, 2016 9:01 pm

...except that I'm not a programmer and don't know how to fix the code so that it works with msys2.

...also, how do I compile in 32-bit mode TDM-GCC?

Re: I thought Mingw-w64 compiling was fixed...

by Blzut3 » Tue Dec 13, 2016 8:22 pm

Just confirmed that everything compiles with MinGW-w64 TDM-GCC in 32-bit mode. 64-bit mode works but the linker crashes.

I only support TDM-GCC using mingw32-make in the windows command prompt since I assume that's most similar to how IDEs work. I'm personally only interested in the compiler and nothing is stops you from pointing to libraries built in msys2.

Re: I thought Mingw-w64 compiling was fixed...

by Danfun64 » Tue Dec 13, 2016 7:23 pm

Well the good news is that I got farther than with the Microsoft stuff. As for the bad news.....

(If the problem involves a difference between TDM-GCC and MSYS2, I personally think MSYS2 should be the toolkit prioritized due to it supporting fluidsynth and pkg-config and maybe a couple other things which TDM-GCC don't.)
Spoiler:

Re: I thought Mingw-w64 compiling was fixed...

by Danfun64 » Tue Dec 13, 2016 5:32 pm

Cmake gui is prompting for directx/xinput stuff though. What am I supposed to use instead of Microsoft's stuff?

edit: Oh.... How stupid of me, mingw64 had its own version of the directx/xinput stuff... I'm compiling again now...

Re: I thought Mingw-w64 compiling was fixed...

by Graf Zahl » Tue Dec 13, 2016 4:59 pm

Don't even try using Microsoft's headers with MinGW. It won't work.

Top