RootTalk


ROOT Discussion Forums

cling on windows with VS2013

Discuss installing and running Cling here. Please post bug reports here.

Moderator: cintdev

cling on windows with VS2013

Postby UplinkCoder » Mon Dec 08, 2014 16:13

Hello,

I have been able to compile cling using VS2013 with only a small number of modifications.
It seems to work quite well. But I have not tested more then simple C functions.

apparently somewhere windows defines a macro called IN. That is why one needs to to apply this little change to /lib/Interpreter/IncrementalParser.cpp :
532,533c532,533
< for (NamespaceDecl::decl_iterator _IN = ND->decls_begin(),
< EN = ND->decls_end(); _IN != EN; ++_IN) {
---
> for (NamespaceDecl::decl_iterator IN = ND->decls_begin(),
> EN = ND->decls_end(); IN != EN; ++IN) {
536,537c536,537
< if (!shouldIgnore(*_IN))
< getCodeGenerator()->HandleTopLevelDecl(DeclGroupRef(*_IN));
---
> if (!shouldIgnore(*IN))
>

in include/Interpreter/RuntimeUniverse.h you need to remove the #ifdef _WIN32 block
and most things will start to work.
UplinkCoder
 
Posts: 3
Joined: Sun Dec 07, 2014 14:59

Re: cling on windows with VS2013

Postby gbrill » Mon Dec 08, 2014 21:18

You had asked me privately about the mingw compilation we got working. I replied but I think it was private. Lets make it public now so others can see it, I will repost it all here.

I have also attached a patch file and build instructions.

mingw working binary of cling on windows:

https://s3.amazonaws.com/sysprogs2infus ... -cling.exe
It is equivalent to the following nightly build: https://ecsft.cern.ch/dist/cling/curren ... 21.tar.bz2

run cling.exe directly from the directory where it is located. It includes several proof-of-concept workarounds that are sensitive to the working directory.

You need to run this batch file first as well: QueryCppIncludes.bat

I remember that we may have had to replace this .bat's contents with the below on certain systems if it didn't work (am just reading from my old emails):

@echo off
set CLING_BIN=%~dp0
echo %CLING_BIN%../lib/gcc/mingw32/4.7.2/include/c++
echo %CLING_BIN%../lib/gcc/mingw32/4.7.2/include/c++/mingw32
echo %CLING_BIN%../lib/gcc/mingw32/4.7.2/include/c++/backward
echo %CLING_BIN%../lib/gcc/mingw32/4.7.2/include
echo %CLING_BIN%../lib/gcc/mingw32/4.7.2/../../../../include
echo %CLING_BIN%../lib/gcc/mingw32/4.7.2/include-fixed
gbrill
Attachments
Archive.zip
patch and build instructions for mingw
(384.05 KiB) Downloaded 10 times
gbrill
 
Posts: 5
Joined: Wed Aug 13, 2014 19:53

Re: cling on windows with VS2013

Postby UplinkCoder » Tue Dec 09, 2014 11:09

Thanks!

I will think about this functionPointer problem.
Your current solution is a bit ... hacky ?
But it is great that you have made such success!
UplinkCoder
 
Posts: 3
Joined: Sun Dec 07, 2014 14:59

Re: cling on windows with VS2013

Postby gbrill » Wed Dec 10, 2014 16:32

It sounds as though you have accomplished the same using VS 2013. This would be a lot easier than mingw.

Can you post you VS 2013 solution on github or somewhere? I would like to try it.
gbrill
 
Posts: 5
Joined: Wed Aug 13, 2014 19:53

Re: cling on windows with VS2013

Postby UplinkCoder » Thu Dec 11, 2014 12:19

The patch to enable the build is in.

So just use cmake and generate build files for Visual Studio 12
and edit include/Interpreter/RuntimeUniverse.h

a binary is uploaded here http://www63.zippyshare.com/v/28094296/file.html
UplinkCoder
 
Posts: 3
Joined: Sun Dec 07, 2014 14:59


Return to Cling Support

Who is online

Users browsing this forum: No registered users and 1 guest