Giter Club home page Giter Club logo

wclang's Introduction

Wclang is a tool which helps you to cross compile source code easily with clang on Linux/Unix for Windows.
Wclang is basically a wrapper for clang, which allows you to directly target Windows.
Wclang detects the target and headers automatically and adds them to the clang invocation command.

After the installation you will have "<mingw-triplet>-clang", "<mingw-triplet>-clang++" available as "compiler".

PREREQUISITES:

 A C++11 compiler for compiling the wrapper (g++ 4.6+, clang)
 clang
 mingw-w64 with its headers and libs
 cmake

INSTALLATION:

 cmake -DCMAKE_INSTALL_PREFIX=_prefix_ .
 make
 make install

EXAMPLES:

 i686-w64-mingw32-clang++ hello-world.cpp -o hello-world.exe && wine hello-world
 CC=i686-w64-mingw32-clang ./configure --host=i686-w64-mingw32

 x86_64-w64-mingw32-clang++ hello-world.cpp -o hello-world.exe && wine hello-world
 CC=x86_64-w64-mingw32-clang ./configure --host=x86_64-w64-mingw32

LISTING AVAILABLE PARAMETERS:
 i686-w64-clang -wc-help

LIMITATIONS:
 C++ exceptions do not work with clang prior to 3.7, and in 3.7 (current trunk) just for 64-bit.

KNOWN TO WORK ON:

 Linux:   Ubuntu, Debian (Wheezy*), Mint, Arch, Fedora and openSUSE.
          Other distributions may work as well, but have not been tested.
 Windows: Cygwin.

* Wheezy: important: clang-3.0 coming with wheezy is too old
  to compile the wrapper, so use g++ or get a newer clang
  from e.g.: http://llvm.org/apt.

wclang's People

Contributors

andrerh avatar aroig avatar bltb avatar crayxt avatar mstewartgallus avatar procedural avatar svost avatar tpoechtrager avatar xantares avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.