How to install CGAL (on Windows) and make it work with Visual Studio
Posted: October 2, 2009 Filed under: libs | Tags: howto Leave a comment »- Download the binary for windows at http://gforge.inria.fr/frs/?group_id=52
- Run the executable and let it roll
- After the installer is done with its thing, fire up CMake-gui
- Use in-place compilation or otherwise (I prefer to make a “new folder” and make CMake output the solution files in that folder). I will assume that you do the same.
- PS: Choose Visual Studio 200X compiler depending on whichever compiler you use.
- Once CMake is done with generating VS .sln file, open it
- Do:
- Clean Solution
- Rebuild Solution
- Just two more things need to be done now..
- Include : Goto “new folder/include/CGAL” (in the new folder where cmake output its stuff): copy compiler_config.h to the “CGAL_DIR/include/CGAL”
- Lib :
- Make a new folder “lib” in CGAL_DIR/
- Copy “new folder/Debug/” (& release if you built it in release mode) to CGAL_DIR/lib (copy the *.lib and *.pdb)
Voila~ You’re done!
How to install Boost
Posted: September 29, 2009 Filed under: libs | Tags: howto 2 Comments »How to get Boost working on windows::
1. Download and extract the .zip/.7z etc from boost website to any folder (lets assume: D:\)
2. Open command prompt and goto that folder (D:\boost_1_39_0)
3. Since, boost does not require building code other than the libraries that it provides, go through the following only if you want to install any of the libraries:
At command prompt:
(I am trying to install filesystem,system)
- bootstrap.bat –with-library=filesystem,system stage
- bjam –with-filesystem variant=debug link=static threading=single,multi –libdir=”D:\Libraries\boost_1_39_0\lib”
(PS: These are the options that I chose, one can choose otherwise, as well. Use bjam –help for more options)
You should now have a folder called stage/lib which would have the processed libraries/dll
(WordPress formatting screwed the text which needs to be put in command prompt. I have made a word doc from which commands can be pasted with appropriate changes made to reflect the directory structure)
How to use Qt 4.3 with Visual Studio 2008 Express
Posted: September 16, 2009 Filed under: libs | Tags: howto 2 Comments »BUILD VC++ VERSION OF QT
1. Download and install qt-sdk-win-opensource-2009.01.exe. Install into the default c:\qt\2009.01. It contains MingGW (the gcc toolset for Windows) and Qt Creator, and pre-built binaries built by GCC. You can use this installation as-is if you want to experiment with Qt Creator.
2. Copy the entire folder of c:\qt\2009.01 to c:\qt\4.5.0-vc. We will be modifying c:\qt\4.5.0-vc to build the libraries with VC++. Both directories can co-exist. Use the c:\qt\2009.01 with Qt Creator, and use c:\qt\4.5.0-vc with Visual Studio. (We will see how to use it in Visual Studio later).
3. Open a (Visual Studio Tools) command prompt and run Configure to target platform win32-msvc2005 (substitute win32-msvc2008 for VC2008):
c:\> cd c:\qt\4.5.0-vc\qt
c:\qt\4.5.0-vc\qt> configure -no-qt3support -platform win32-msvc2008
In the above command-line, change the Configure command-line parameters as desired, but be sure to specify -platform to target the desired Visual Studio toolset. Run Configure with no parameters to see a help screen. Configure generates nmake compatible makefiles to build all the libraries.
PS: You might need to run “setenv” at command prompt if the system cries for not finding the right stuff in the right place.
4. Run “nmake” to build. NOTE: You may need to execute Visual Studio’s VCVARS32.BAT (located in e.g. “C:\Program Files\VS2005\VC\bin”) to setup the environment (such as path) to find the VC++ tools like nmake, etc.
5. Let us set up a couple of environment variables that make life easier for us. To edit environment variables, you need to right click “My Computer > Properties > Advanced > Environment Variables”. Add a new (system) variable QTDIR pointing to your Qt install directory, and edit your PATH to include Qt’s “bin” directory as follows:
Variable Name : Value
QTDIR : c:\qt\4.5.0-vc\qt
Append to path Path >c:\qt\4.5.0-vc\bin
6. Now let’s try to get Qt’s “Hello World” tutorial program running from the command line. Fire up the Visual Studio Command Prompt, and create a file “Hello.cpp” containing the following code in a new directory called “hello”:
#include "QApplication"
#include "QPushButton"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello world");
hello.resize(100, 30);
hello.show();
return app.exec();
}
Now, type the following commands in this new folder:
qmake -project
qmake hello.pro
nmake
You should see hello.exe in the Debug folder.
7. If you wish to use the Visual Studio Express IDE, here’s what you should do.
Fire it up, and go to “Tools > Options > Projects and Solutions > VC++ Directories”. Add “$(QTDIR)\include” to the “Include files”, and “$(QTDIR)\lib” to the “Library files” drop-down lists respectively.
Thats it!
Links:
http://dcsoft.com/community_server/blogs/dcsoft/archive/2009/03/06/how-to-setup-qt-4-5-visual-studio-integration.aspx
http://www.pc-maniac.com/?p=59
http://rajorshi.net/blog/2009/01/using-qt-with-msvc-express-2008/
This worked for me:
</pre>
#include <QtGui/QApplication>
#include <QtGui/QPushButton>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello ME");
hello.resize(100, 30);
hello.show();
return app.exec();
}
<pre>
Following linker libraries are what I needed:
* QtCore4.lib
* QtGui4.lib
To do so, from project properties:
Configuration Properties –> Linker –> Input –> Additional Dependencies –> add “QtCore4.lib QtGui4.lib”