G3D LLVM

67 views
Skip to first unread message

Vitaly Shevtsov

unread,
Jul 18, 2012, 1:37:07 PM7/18/12
to Рассылка G3D
Hello!

In fact that binaries compiled with VS compiler requires vcredist
package to redistribute it to computer without VS. Is it possible to
build G3D with any other compiler on Windows to avoid this?

Thanks :)

--
Vitaly

EdwardP

unread,
Sep 12, 2012, 10:20:18 AM9/12/12
to G3D Users
Hi Vitaly,

I had a look at this a while back when I thought it might be easier to
work on both windows and mac using eclipse and gcc (and before I
started to understand icompile a bit better). I'm sure the others will
set me straight if I'm not correct here, but I believe the problem
with the code as it stands is that is uses its own G3D_WIN32 define in
response to checking for the _MSC_VER (which is obviously specific to
the MSVC compiler). If you try and use GCC under windows, this will
not be set and you will fail early with a preprocessor error in
platform.h. You *could* add a cross-compiler check for windows
(__WIN32__, say) but you will still have to go through all the
G3D_WIN32 checks throughout the code because some of these are
actually doing things that require MSVC, not just windows - for
example the stopwatches use an MS-specific union. I don't think it
looked insurmountable, but you'd need to create a more fine grained
distinction between the compiler and OS permutations than is currently
supported. In any case, it looked laborious enough for me to give my
wife's Mac book pro straight back to her (for the moment)... :)

Also, having said all that, I'm pretty sure that (assuming you would
use mingw) your gcc compiled exe would end up needing MS runtimes
because it still has a number of dll dependencies? Have you looked at
NSIS instead? It is a pretty cool free install builder and there are a
ton of extensions already written - including one to check and install
the VC10 runtimes as part of the installation process.

E

Corey Taylor

unread,
Sep 14, 2012, 8:00:23 PM9/14/12
to g3d-...@googlegroups.com
A long time ago, we had a mingw32 build for G3D working.  The approach I took was creating a separate define for that build G3D_MINGW32 but also enabling the windows defines.

I'd use the MINGW32 define to determine when to split certain functionality.

Right now, you'll have the extra hurdle of compiling ffmpeg or linking it in from the pre-builts.  I'd suggest you remove that feature initially.

corey
Reply all
Reply to author
Forward
0 new messages