Skip to content

jouven/cxxtools

 
 

Repository files navigation

A fork of https://github.com/maekitalo/cxxtools with "changes" to allow to compile with mingw.

Requires:
dlfcn-win32
A compatible "regex.h" (library)
Compiler with C++11 support.

Optional:
Openssl library

To compile the library follow the same steps as the regular cxxtools, but on the configure step use this line as a base (check your "distro"/"mingw" gcc and g++ installation calls first):
./configure "CXXFLAGS=-D_WIN32_WINNT=0x0601 -O2" --host=x86_64-w64-mingw32 CXX=x86_64-w64-mingw32-g++ CC=x86_64-w64-mingw32-gcc

Then make (assuming there is openssl):
make "LDFLAGS=-no-undefined -lcrypto -lws2_32 -lregex"

Caveats:
1. Don't expect anything that uses POSIX stuff (pipes, sockets...) to work.
2. I've barely tested it, as far as I know it compiles, links and the programs run. I've only tried the JSON serialization/deserialization on wine/wine64/windows 7, which does work alright.

Warnings:
1. When installing, if you install "make install", remember to change the installation location so the files install on the mingw folders or you might overwrite your regular cxxtools.
2. Remember that in *n*x you can rpath the locations of your libraries, but that doesn't work with mingw32/windows, still, other options like adding the library path to your PATH environment variable, copying the library files to the same folder or using soft links work too.

About

Modified cxxtools to allow cross compiling with mingw

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 97.9%
  • Other 2.1%