A lot of windows users have requested some help for compiling Tulip on windows. I will explain in that post how you can compile Tulip using the latest MinGW tolchain.
You will need to download the following packages in order to compile Tulip.
For 64 bits build :
For 32 bits build :
For both build :
the MSYS shell from the mingw-builds project : http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/msys%2B7za%2Bwget%2Bsvn%2Bgit%2Bmercurial%2Bcvs-rev13.7z/download
CMake : http://www.cmake.org/files/v2.8/cmake-2.8.12-win32-x86.exe
GLEW : https://sourceforge.net/projects/glew/files/glew/1.10.0/glew-1.10.0.zip/download
2) Setting up the build environment
First install Python and CMake (use default options).
Extract the MinGW toolchain to C:/mingw64 for 64 bits or to C:/mingw32 for 32 bits.
Open the Qt4 archive. Extract the content of the ported64 directory to C:/mingw64 (resp. ported32 to C:/mingw32). It provides some precompiled dependencies Tulip needs (zlib, freetype).
Extract the directory Qt64-4.8.5 (resp. Qt32-4.8.5) to your directory of choice (personally I use C:/Qt).
IMPORTANT : create a file named qt.conf to C:/Qt/Qt64-4.8.5 (resp. C:/Qt/Qt32-4.8.5) with the following content
Prefix = ../
It is needed by CMake to correctly setup the Tulip build.
c:/mingw64 /mingw (resp. c:/mingw32 /mingw)
It is needed by CMake to find the compilers.
Set up shortcuts to launch the MSYS shell easily. Open the folder C:\ProgramData\Microsoft\Windows\Start Menu\Programs and add a MINGW64 folder (resp. MINGW32). In that new folder, create a new shortcut that will launch the following command : C:\mingw64\msys\msys.bat --mintty (resp. C:\mingw32\msys\msys.bat --mintty). The option enables the use of MinTTY (better shell than rxvt).
Extract the glew archive to your directory of choice (for instance C:/). Open a MSYS shell through the previously created shortcut and navigate to the glew folder trough the command "cd /c/glew-1.10.0". Then compile GLEW by simply entering the command "make". Once GLEW compiled, copy the include and lib directory to C:/mingw64 (resp. C:/mingw32).
Everything is now set up to build Tulip.
3) Preparing the build
Open an MSYS shell and navigate to the folder you will copy the Tulip sourcecode
Get the Tulip sourcecode from a release tarball or checkout it from the subversion repository (the svn tool is bundled with msys).
Enter the Tulip source code folder and create a directory named build. Enter that newly created folder and launch the following command : "cmake-gui ../".
Once the CMake GUI appears, click on "Configure" and then select "MinGW Makefiles" generator.
CMake will then complain because you have sh in your PATH. Nevermind, just click again on "Configure".
CMake will then complain because it did not find Qt4. Just fill the CMake variable QT_QMAKE_EXECUTABLE with the path to qmake.exe : C:/Qt/Qt64-4.8.5/bin/qmake.exe (resp. C:/Qt/Qt32-4.8.5/bin/qmake.exe).
Relaunch CMake configuration. You will then have to specify the following CMake variable (checked "Grouped" and "Advanced" if you don't see them):
FREETYPE_INCLUDE_DIR_freetype2 : C:/mingw64/include/freetype2 (resp. C:/mingw32/include/freetype2)
FREETYPE_INCLUDE_DIR_ft2build : C:/mingw64/include/ (resp. C:/mingw32/include/)
FREETYPE_LIBRARY : C:/mingw64/bin/libfreetype-6.dll (resp. C:/mingw32/bin/libfreetype-6.dll)
ZLIB_INCLUDE_DIR : C:/mingw64/include/ (resp. C:/mingw32/include/)
ZLIB_LIBRARY : c:/mingw64/bin/zlib1.dll (resp. c:/mingw32/bin/zlib1.dll)
GLEW_INCLUDE_DIR : C:/mingw64/include/ (resp. C:/mingw32/include/)
GLEW_LIBRARY : c:/mingw64/bin/glew32.dll (resp. c:/mingw32/bin/glew32.dll)
IMPORTANT : Python should be automatically found but for 64 bits, you will have to replace the content of the variable PYTHON_LIBRARY by "C:/Windows/System32/python27.dll" or "C:/Windows/System32/python33.dll" depending on the version of Python you are using (there is a link issue otherwise).
Finish the CMake configuration by setting the variable CMAKE_BUILD_TYPE to "Release", by setting the variable CMAKE_INSTALL_PREFIX to your installation directory of choice (for instance "C:/tulip_install", default value is not good as you can't write in "C:/Program Files (x86)/tulip" without admin privilege) and by adding a new CMake variable (click on "Add Entry" for that) of type PATH with value "C:/mingw64/bin".
Relaunch one last time the CMake configuration, everything should be OK now (except the Python documentation generation but it is not critical, you will need to install the Sphinx Python module in order to genrerate it).
Terminate by clicking on "Generate" to produce the Makefiles and exit the CMake GUI.
4) Building Tulip
To build tulip, just enter the command "mingw32-make.exe" in the MSYS shell from the build directory inside the Tulip sourcecode one. You can use parallel build to speed things up by adding the -jX option where X represents the number of parallel jobs (set X to your number of processors).
5) Installing Tulip
Once Tulip is fully compiled, enter the following command to install it : "mingw32-make.exe install".
Run the tulip.exe executable located in the bin folder of the Tulip root installation directory to launch Tulip.
Hope that it will help.
Thank you so much for you help! Sorry it's taken me so long to get back to you, I'll be attempting to follow these instructions for the first time today. I appreciate this so much! Is there anything you ask in return?
I get build errors in numerous files. Here's some of the output:
Alright, I got past that error by going to tulip-src/thirdpart/OGDF/src/basic/System.cpp and changing the line with
But now I'm getting this error:
So, I went to the main CMakeLists.txt and disabled the compilation of SIP. But then I got an error related to casting. So I threw in the -fpermissive flag.
So, after the -fpermissive let it make with a lot of errors, it continued forward until it ran into an include failure, requiring glext.h. I found glext.h online and added it in mingw64/include/GL/.
Then this ungainly list of errors cropped up:
I think it has to do with the fact that I chose to use qt5, which I would really prefer to stick with, not bend in the favor of what is easier...
I think that in order to get past this particular build error, I have to build qt5 on my own, since I read somewhere that the qt builds offered by the mingw external-binary-packages are built with Windows ANGLE. I was told that I could either compile qt with mingw using a different ./configure switch or I could move to visual studio. Now I'm trying to compile qt with mingw64 using ./configure -opengl desktop
I forgot that the latest Tulip release tarball (4.3) can not be compiled with mingw64, sorry for that. All the errors you came across with are fixed in the trunk of Tulip subversion repository on sourceforge. You should use that code base from now on.
svn checkout svn://svn.code.sf.net/p/auber/code/tulip
Regarding the Python link issue, check in the CMake GUI that the PYTHON_LIBRARY variable points to the Python dll located in C:/Windows/System32.
For Qt, I strongly advise you to stick with Qt4. Qt5 is still young and as you said you will have to compile it yourself as the binaries Digia provides are not compatible with the latest MinGW compiler you are using and Desktop OpenGL.
Actually, I found that Qt offers a precompiled mingw for OpenGL directly, so I think I will give it a shot (or the precompiled binaries that mingw offers). That one is 32 bit only, however; what I'm dealing with are issues specifically with mingw 64bit OpenGL; that confinguration is what isn't available. I'll at least give compiling it a shot. At the same time, I will try and build tulip into a mingw 32 bit folder, and I'll move all my builds over to the svn trunk. :)
Other than having to compile Qt5 from source, what other difficulties will I have to surmount in order to continue in this direction?
So, I got tulip to compile using qt5 on windows 32 bit using the default mingw 32 bit Qt5 download available from the qt web page and these instructions. Thank you so much! If I ever get my 64 bit compile process complete, I will let you know.
If you have any kind of return favors you want, please don't hesitate to ask. I can pay you back in the form of labor or donations. I'd prefer to continue this cooperation the most.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.