Previous Thread
Next Thread
Print Thread
Page 37 of 37 1 2 35 36 37
#110032 - 06/28/17 06:39 PM Re: Can't compile latest MAME? READ THIS THREAD [Re: Just Desserts]  
Joined: Mar 2001
Posts: 15,654
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,654
USA
Yes, that's the one to open. It *is* created super-deep; this is not uncommon for tool-generated Visual Studio SLNs.

#110038 - 06/29/17 09:29 AM Re: Can't compile latest MAME? READ THIS THREAD [Re: Just Desserts]  
Joined: May 2007
Posts: 520
mizapf Offline
Senior Member
mizapf  Offline
Senior Member

Joined: May 2007
Posts: 520
Germany
Mmm ... still getting lots of error output ... I'll have to dig deeper.

For the time being, why not simply compile with mingw gcc? Assuming that I don't want to do debugging, just create a tailored image for the typical user?

I remember that some days ago the howto for mingw was still there, now there is only the VS topic.

#110039 - 06/29/17 11:16 AM Re: Can't compile latest MAME? READ THIS THREAD [Re: mizapf]  
Joined: May 2008
Posts: 4,825
qmc2 Offline
qmc2  Offline

Very Senior Member

Joined: May 2008
Posts: 4,825
Germany
Originally Posted by mizapf
  • Once you've done that, simply run: make ...

make is not found in the plain cmd. I suppose I have to run win32env.bat in msys64 first, then go to the mame folder.

I think it's "nmake" what the author meant. Should be changed in the wiki I suppose.


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
#110055 - 06/29/17 11:11 PM Re: Can't compile latest MAME? READ THIS THREAD [Re: qmc2]  
Joined: Feb 2004
Posts: 1,787
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,787
Sydney, Australia
Originally Posted by qmc2
Originally Posted by mizapf
  • Once you've done that, simply run: make ...

make is not found in the plain cmd. I suppose I have to run win32env.bat in msys64 first, then go to the mame folder.

I think it's "nmake" what the author meant. Should be changed in the wiki I suppose.

No, it's not nmake - you need to have gnu make in your path. The make command generates the solution and project files for Visual Studio. Once you've done that, you can open the solution in Visual Studio or build it with msbuild. We don't use nmake.

#110056 - 06/30/17 12:00 AM Re: Can't compile latest MAME? READ THIS THREAD [Re: Just Desserts]  
Joined: Mar 2001
Posts: 15,654
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,654
USA
I compiled correctly on a Windows machine recently using "make vs2015" and VS2017 with the 2015 toolchain installed as an option (it asks during install). If you're using real VS2015, make sure you have SP3 installed - they fixed a lot of C++ compliance in the compiler between GM and SP3.

#110063 - 06/30/17 07:39 AM Re: Can't compile latest MAME? READ THIS THREAD [Re: Just Desserts]  
Joined: May 2007
Posts: 520
mizapf Offline
Senior Member
mizapf  Offline
Senior Member

Joined: May 2007
Posts: 520
Germany
OK then, I'll try. Still, I'd suggest someone have a look at the Developers Wiki entry and make it fool-proof (for fools like me :-) ). If you are not experienced with Visual Studio, this may be a bit too terse right now.

There's still my question from above: I understand that VS produced somewhat better output, but just for the purpose of building a small MAME version with only a few drivers and to offer it for downloading, would the traditional MinGW / gcc toolchain still work, or it that generally discouraged?

#110065 - 06/30/17 07:51 AM Re: Can't compile latest MAME? READ THIS THREAD [Re: Just Desserts]  
Joined: Feb 2004
Posts: 1,787
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,787
Sydney, Australia
Visual Studio has better i386 code generation and the debugging tools tend to be better than GDB on Windows. GCC compiles a lot faster and has better x86-64 code generation. We recommend using MinGW GCC to build binaries for distribution to ensure they behave more like standard MAME releases.

If you're planning to release binaries, we recommend you build using the same flags we use for binary releases. You can see the options used in build-release.bat in the build repository. Currently the they are (the only difference: difference between the lines is the PTR64 setting):

Code
make TARGET=mame TOOLS=1 SEPARATE_BIN=1 PTR64=0 OPTIMIZE=3 SYMBOLS=1 SYMLEVEL=1 REGENIE=1 -j9
make TARGET=mame TOOLS=1 SEPARATE_BIN=1 PTR64=1 OPTIMIZE=3 SYMBOLS=1 SYMLEVEL=1 REGENIE=1 -j9


If you're building with a subset of drivers, do something like:

Code
make TARGET=mame SUBTARGET=subset SOURCES=src/mame/drivers/mydriver.cpp TOOLS=1 SEPARATE_BIN=1 PTR64=0 OPTIMIZE=3 SYMBOLS=1 SYMLEVEL=1 REGENIE=1 -j9
make TARGET=mame SUBTARGET=subset SOURCES=src/mame/drivers/mydriver.cpp TOOLS=1 SEPARATE_BIN=1 PTR64=1 OPTIMIZE=3 SYMBOLS=1 SYMLEVEL=1 REGENIE=1 -j9


(Note that you can't actually run the two commands in direct succession on Windows - you need to switch environments between doing 32-bit and 64-bit builds.)

#110068 - 06/30/17 09:21 AM Re: Can't compile latest MAME? READ THIS THREAD [Re: Just Desserts]  
Joined: May 2007
Posts: 520
mizapf Offline
Senior Member
mizapf  Offline
Senior Member

Joined: May 2007
Posts: 520
Germany
Yes, thanks, I'm doing small builds with gcc under Linux for some time already, so this looks familiar. I'm not using TARGET and SUBTARGET, though - are those important when I have SOURCES?

#110069 - 06/30/17 09:53 AM Re: Can't compile latest MAME? READ THIS THREAD [Re: Just Desserts]  
Joined: Feb 2004
Posts: 1,787
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,787
Sydney, Australia
TARGET defaults to MAME. If you're doing multiple builds with different combinations of drivers it helps to use different SUBTARGET so they don't overwrite each other. It's also useful to give it a different SUBTARGET name to make it obvious that it isn't a full MAME build (even if the small size implies that). If you're setting SOURCES, you can make up any SUBTARGET and it will generate rules to build the executable with that name.

Page 37 of 37 1 2 35 36 37

Who's Online Now
6 registered members (AJR, IgorRus, Luca Elia, Stiletto, 2 invisible), 22 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,381
Posts108,462
Members4,750
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.058s Queries: 14 (0.028s) Memory: 5.0147 MB (Peak: 5.2554 MB) Zlib enabled. Server Time: 2017-07-20 22:37:42 UTC