tech-radar icon indicating copy to clipboard operation
tech-radar copied to clipboard

Provide makefile(s) for MinGW

Open xleclercq opened this issue 6 years ago • 3 comments

Apparently the GNUmakefile doesn't work for MinGW and there has been interest for a MinGW build so we need to provide build files that work ideally both for MinGW 32 and 64 bit.

xleclercq avatar Jan 13 '19 16:01 xleclercq

Possible causes for the problem are covered here: https://forums.wxwidgets.org/viewtopic.php?f=30&t=44902

xleclercq avatar Jan 13 '19 17:01 xleclercq

This isn't really answering the exact question, but I was able to compile the library and get it to work in my TDM Mingw installation.

First I CD'd into the source directory. I compiled all of the .cpp files into .o files with this command: FOR %i IN (*.cpp) DO g++ -c -MD -MP -fPIC -DPIC -pthread -I../include/wx/charts -IC:\TDM-GCC-64/wx/lib/gcc_x64_lib/mswu -IC:/TDM-GCC-64/wx/include -std=c++17 -O3 %i

You would have to modify it for your include file locations for WXWidgets.

Then, after all the .o files are created, you can create the shared library with the following command: ar -rcs libwxcharts.a *.o

JesseRacine avatar Apr 21 '20 00:04 JesseRacine

I used Code:Blocks with MinGW (the 64 Bit version) and could build a release- and a debug-version of the library.

helha54 avatar Mar 05 '21 13:03 helha54