Skip to content

Instantly share code, notes, and snippets.

@mgiaco
Last active November 27, 2015 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgiaco/628d09696986be5581cc to your computer and use it in GitHub Desktop.
Save mgiaco/628d09696986be5581cc to your computer and use it in GitHub Desktop.
How to Build libcintelhex on MSYS2 (mingw32)

How to build https://github.com/martin-helmich/libcintelhex on windows7 64bit using MSYS2/mingw32

Here you can find some steps on how to configure MSYS2 (autotools, mingw32, and so on... ) http://gtkmm-installation.blogspot.ca/2015/01/gtkmm-installation-on-windows-step-by.html

  • First step

Install Cunit so get the latest Cunit tar. I get the ideas from https://netbeans.org/kb/docs/cnd/c-unit-test.html?print=yes#mingw http://stackoverflow.com/questions/12514408/building-cunit-on-windows

so my way... (MSYS2 install folder is c:\msys64)

start the mingw32_shell.bat
the switch to the downloaded tar

bunzip2.exe CUnit-2.1-3-src.tar.bz2
tar xvf CUnit-2.1-3-src.tar
cd ./CUnit-2.1-3

then use

libtoolize
automake --add-missing 
autoreconf
./configure --prefix=/mingw32
make
make install 

after that cunit should be installed on c:\msys64\mingw32\ => check if there is a doc\cunit if so i should be fine

  • Second step

get libcintelhex and follow the instructions

autoreconf -i
./configure
make
(make install) i do not need that
  • Third step Build and Debug with eclipse luna start eclipse from a bat file with
cmd /c "SET MINGW_HOME=c:\msys64\mingw32& SET MSYS_HOME=c:\msys64\usr& SET PATH=%MINGW_HOME%\bin;%PATH% && start eclipse.exe"

Then import libcintelhex folder as a C Makefile Project with MinGW32

Build, Clean, Debug, Run everything should work...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment