mGBA Forums
Questions about compiling from an uber newbie - Printable Version

+- mGBA Forums (https://forums.mgba.io)
+-- Forum: mGBA (https://forums.mgba.io/forumdisplay.php?fid=1)
+--- Forum: General (https://forums.mgba.io/forumdisplay.php?fid=3)
+--- Thread: Questions about compiling from an uber newbie (/showthread.php?tid=2145)



Questions about compiling from an uber newbie - kabacho - 03-04-2017

So, i'm trying to compile mGBA for Windows using cmake-3.8.0 and MinGW.

What I want to accomplish is create a .exe that can deployed like the one you download from this website.

So I launch cmake and I get all sorts of missing directories (among them qt5, pnglib, zlib...). So I uncheck so options and the thing finally compiles 100%.

The problem is a end up with a libmgba.a file. (1)What am I supposed to do with this library?

(2) If I properly link all the libraries, will I end up with a .exe instead of the libmgba.a file?

(3)Are any of those libraries optional?


Thank you. Tongue


RE: Questions about compiling from an uber newbie - endrift - 03-05-2017

You will need either Qt5 or SDL2 to create an .exe. The one from the website has all of those missing libraries, but they're all custom builds to allow it to be distributed as just one .exe without tons of DLLs. While a lot of those libraries are optional, you will be missing features if you don't install all of them. Like you can't record videos without ffmpeg, but it will be a much smaller download to get those files.


RE: Questions about compiling from an uber newbie - kabacho - 03-07-2017

Endrift, first, thank you for your time.

So I want to build mgba with sdl2. I checked the "BUILD_SDL" box and I correctly set the sdl2 directories and library links, but I still not getting an ".exe" at the end.

(1) Which box do I need to check, if any?

(2)You need a "add_executable" command in the CMakeList.txt file to generate the ".exe", right?

(3)It seems I need to "BUILD_PERF" or "BUILD_TEST" to get the executable? (I'm getting a link error on those).


Thank you.


RE: Questions about compiling from an uber newbie - endrift - 03-07-2017

The sdl binary ends up in the sdl folder, not in the root of the build folder. perf and test do not include GUIs and are just for testing purposes.


RE: Questions about compiling from an uber newbie - kabacho - 03-10-2017

(03-07-2017, 07:29 AM)endrift Wrote: The sdl binary ends up in the sdl folder, not in the root of the build folder. perf and test do not include GUIs and are just for testing purposes.
Thank you. I'm finally getting an ".exe" at the end . But it's not working Sad

My guest it's compiler version incompatibility. I must say I can only compile the source with the 64 bit version of the compiler. If I try the 32 bit version a get random source file line errors. (1) why is this?

Thank you.