[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Clang Windows

Clang Windows

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Clang Windows

Postby Baker » Tue Feb 24, 2015 1:44 am

The Clang compiler has a Windows binary. It doesn't require Cygwin.

http://llvm.org/releases/3.5.0/LLVM-3.5.0-win32.exe (This file is a setup file, but I took the primary executable that it installs a threw it in a folder and ran it from the command line against a helloworld.c and it ran).

Why do I find this interesting? To compile on Windows, typically you need either Visual Studio or MinGW.

Visual Studio belongs to Microsoft, you can't distribute pieces of it. MinGW doesn't seem to work without Cygwin and Cygwin is a little bit of nightmare.

Clang is BSD licensed as well --- which means precious few strings attached. To build a Windows .exe using Clang as the compiler I believe you need some of the libraries/headers that typically come with MinGW, which are facsimiles of the Windows ones (kinda of like what CodeBlocks uses or as I imagine it, what cross-compiling on Linux uses.)

[As time rolls on, I expect Clang/LLVM to eventually effectively kill the gcc compiler. The reason is that due to the BSD licensing, large companies can roll their own compilers and contribute changes back/lobby for standardizations + extensions for inclusion, etc. I'm not rooting for gcc to die or anything, but it hasn't evolved quickly. On the other hand, Clang/LLVM gets leaps and bounds better on a regular basis.]
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Clang Windows

Postby jitspoe » Tue Feb 24, 2015 4:04 am

If I recall correctly, you can use the Microsoft compilers without Visual Studio. You shouldn't need to distribute them, as you can just distribute your compiled executables. I believe there's also an Intel compiler that's supposed to be pretty good, but I haven't heard anything about it lately. There was another one (or maybe it was clang) that people used to use to compile the quake2 game dll before Microsoft had the free "express" versions of Visual Studio. I think it was "LCC".

I thought the purpose of MinGW was that you could run it without installing all the cygwin stuff to use gcc, but maybe I'm wrong. I haven't used it in ages, and I usually have cygwin set up anyway.

All this being said, I have no idea now which one produces the "best" compiled binaries. I find it easiest to just use Visual Studio myself, so I don't bother with other compilers unless I'm making a Linux build.

jitspoe
 
Posts: 217
Joined: Mon Jan 17, 2005 5:27 am

Re: Clang Windows

Postby Baker » Tue Feb 24, 2015 7:29 pm

The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Clang Windows

Postby Spike » Tue Feb 24, 2015 8:34 pm

.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Clang Windows

Postby Baker » Tue Feb 24, 2015 11:43 pm

The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Clang Windows

Postby frag.machine » Wed Feb 25, 2015 12:09 am

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: Clang Windows

Postby Baker » Wed Feb 25, 2015 2:36 am

The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Clang Windows

Postby Spike » Wed Feb 25, 2015 3:36 am

baker, just use cygwin. :P
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Clang Windows

Postby ericw » Wed Feb 25, 2015 9:06 am

I agree, Baker, I've wasted a lot of time setting up dev environments. It's just time burnt away before you can actually start doing anything productive.
(Btw, thanks for the reminder about Quakespasm's VS/Xcode projects not working on fresh installs, will put that on my todo list. IIRC they require SDL installed in a specific place but we should write documentation for that.)

If I was starting a C/C++ project from scratch I'd probably try Cmake, I like how it can generate project files for most IDE's, so you don't have to keep a VS project, an Xcode project, etc up to date by hand.

Clang on windows sounds cool, haven't tried it, but one of the nice things in clang is the static analyzer, worth a try if you don't already have one (like the one in VS2013 community edition)
ericw
 
Posts: 92
Joined: Sat Jan 18, 2014 2:11 am

Re: Clang Windows

Postby revelator » Tue Mar 17, 2015 5:31 am

MinGW works fine without cygwin :) in fact you only need cygwin if you want bash script support, still need an IDE though but there are several like codeblocks/codelite etc. which will get the job done.
Both of those IDE's can also import MSVC projects though codeblocks is probably the one that has the best support for converting MSVC projects, codelite has a built in clang analyzer though ;).

Dont forget Open Watcom which is yet another fine compiler and recently aquired 64 bit support (still only capable of creating 32 bit executables though) it also supports DOS Linux and OS/2 if you feel nostalgic ;).

Need bash capabilities for MinGW / MinGW64 ? Msys2 is a fork of the latest Cygwin for minimal bash support.

My own CB::Advanced package has Msys2 and the Latest CodeBlocks and it can build pretty much anything MSVC can short of MFC based projects, but we got WxWidgets or QT if we need that functionality so its no big loss ;) in fact these two are allready miles ahead of MFC when it comes to features and CodeBlocks has an interface for visually creating GUI's (bit like borlands pascal editor). QT Has its own IDE with the same functionality :) and some mighty detailed instructions for converting MFC based software to QT.

My CB::Advanced compiler suite also includes a working clang compiler using MinGW64's CRT and API, only downside to my package is size (its rather massive).
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Clang Windows

Postby Baker » Tue Mar 24, 2015 4:53 am

The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Clang Windows

Postby revelator » Wed Mar 25, 2015 9:12 am

Original Mingw lacked most of the directx sdk but there are several 3'rd party minimal sdk's that can be downloaded for use with it allthough i think dx9 support was the latest.
The MinGW compiler.
DirectX 8 minimal SDK
DirectX 7 minimal SDK
Directx9 is a bit tricky as you need the official dxsdk from microsoft and then a good deal of patience cause you need to create new import libraries compatible with mingw + setting up paths and modifying some headers, tbh its better to use the below which allready has native support for all the above.

MinGW64 supports dx 10 and a good deal of dx 11 and no its not only a 64 bit compiler they do have 32 bit compilers also :).


i686 packages are the 32 bit compilers.
x86_64 packages are the 64 bit compilers.
multichain can do both but only on a 64 bit machine (cross compiler).

Or my version
X86 package is for 32 bit, X64 is targetted more at 64 bit OS but can do both.
Readme in main dir is a bit outdated the compiler is now gcc-4.9.2 and theres been a a lot of other changes. Downside is size but you do get everything setup for easy building :)
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Clang Windows

Postby Baker » Wed Mar 25, 2015 11:52 am

Very useful! Thanks!
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Clang Windows

Postby revelator » Fri Mar 27, 2015 11:20 pm

Np ;) been using these compilers for so many years that whatever insight i can offer i will :).
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests