Something More for Research

Explorer of Research #HEMBAD

Posts Tagged ‘Visual Studio’

Building VTK with Visual Studio 2013

Posted by Hemprasad Y. Badgujar on April 30, 2015


Building VTK5 with Visual Studio

Download

  1. Download VTK 5.10.1 the (VTK-5.10.1.zip) to unzip the file. (C: \ VTK-5.10.1)Http://Www.Vtk.Org/VTK/resources/software.Html#previous
    Https://Github.Com/Kitware/VTK/tree/v5.10.1

CMake

  1. You want to specify the destination of the input destination and solution files of source code.
    • Where is the source code: C:\VTK-5.10.1
    • Where is build the binaries: C:\VTK-5.10.1\build
  2. Press the [Configure] to select the Visual Studio that is the target.
  3. It makes various settings.
    • BUILD_SHAREED_LIBS ☑ (check)
    • BUILD_TESTING ☐ (uncheck)
    • CMAKE_CONFIGURATION_TYPES Debug;Release
    • CMAKE_INSTALL_PREFIX C:\Program Files\VTK (or C:\Program Files (x86)\VTK)
  4. Press the [Add Entry] to add the following settings.
    Name: CMAKE_DEBUG_POSTFIX
    Type: STRING
    Value: -gd
    Description:

    * Debug string to be added to the file name of the build generated files of the (last).

  5. And output the solution file by pressing the [Generate].

Build

  1. Start Visual Studio with administrative privileges VTK solution file (C: \ VTK-5.10.1 \ build \ VTK.sln) to open.
    (If you do not start with administrator privileges Visual Studio INSTALL to fail.)
  2. It wants to modify the source code.
    • vtkOStreamWrapper.cxx
      60 line

      //VTKOSTREAM_OPERATOR(ostream&);
      vtkOStreamWrapper& vtkOStreamWrapper::operator << (ostream& a) {
        this->ostr << (void *)&a;
        return *this;
      }
      
    • vtkEnSightGoldBinaryReader.cxx
      3925 line

      if (this->IFile->read(result, 80).fail())
      

      3944 line

      if (this->IFile->read(dummy, 8).fail())
      

      4001 line

      if (this->IFile->read(dummy, 4).fail())
      

      4008 line

      if (this->IFile->read((char*)result, sizeof(int)).fail())
      

      4025 line

      if (this->IFile->read(dummy, 4).fail())
      

      4048 line

      if (this->IFile->read(dummy, 4).fail())
      

      4055 line

      if (this->IFile->read((char*)result, sizeof(int)*numInts).fail())
      

      4072 line

      if (this->IFile->read(dummy, 4).fail())
      

      4095 line

      if (this->IFile->read(dummy, 4).fail())
      

      4102 line

      if (this->IFile->read((char*)result, sizeof(float)*numFloats).fail())
      

      4119 line

      if (this->IFile->read(dummy, 4).fail())
      
    • vtkConvexHull2D.cxx
      31 lines

      #include <algorithm>
      
    • vtkAdjacencyMatrixToEdgeTable.cxx
      31 lines

      #include <algorithm>
      
    • vtkNormalizeMatrixVectors.cxx
      30 Line

      #include <algorithm>
      
    • vtkPairwiseExtractHistogram2D.cxx
      39 line

      #include <algorithm>
      
    • vtkControlPointsItem.cxx
      35 lines

      #include <algorithm>
      
    • vtkPiecewisePointHandleItem.cxx
      31 lines

      #include <algorithm>
      
    • vtkParallelCoordinatesRepresentation.cxx
      83 line

      #include <algorithm>
      
  1. It wants to build the VTK. (ALL_BUILD)
    1. The configuration of the solution (Debug, Release) set the.
    2. Choose the ALL_BUILD project from Solution Explorer.
    3. [Build]> to build VTK Press [Build Solution].
  2. It wants to install the VTK. (INSTALL)
    1. Choose the INSTALL project from Solution Explorer.
    2. [Build]> [projects only]> to install the VTK Press [INSTALL only the Build menu.CMAKE_INSTALL_PREFIX necessary files are copied to the specified output destination.

Environment Variable

  1. Environment variable VTK_ROOT create a VTK of path: Set the (C \ Program Files \ VTK).
  2. Environment variable Path I add a% VTK_ROOT% \ bin; to.

Building VTK6 with Visual Studio

Download

  1. Download VTK 6.1.0 the (VTK-6.1.0.zip) to unzip the file. (C: \ VTK-6.1.0)Http://Www.Vtk.Org/VTK/resources/software.Html#latestcand
    Https://Github.Com/Kitware/VTK/tree/v6.1.0

CMake

  1. You want to specify the destination of the input destination and solution files of source code.
    • Where is the source code: C:\VTK-6.1.0
    • Where is build the binaries: C:\VTK-6.1.0\build
  2. Press the [Configure] to select the Visual Studio that is the target.
  3. It makes various settings.
    • BUILD_SHAREED_LIBS ☑ (check)
    • BUILD_TESTING ☐ (uncheck)
    • CMAKE_CONFIGURATION_TYPES Debug;Release
    • CMAKE_INSTALL_PREFIX C:\Program Files\VTK (or C:\Program Files (x86)\VTK)
  4. Press the [Add Entry] to add the following settings.
    Name: CMAKE_DEBUG_POSTFIX
    Type: STRING
    Value: -gd
    Description:

    * Debug string to be added to the file name of the build generated files of the (last).

  5. And output the solution file by pressing the [Generate].

Build

  1. Start Visual Studio with administrative privileges VTK solution file (C: \ VTK-6.1.0 \ build \ VTK.sln) to open.
    (If you do not start with administrator privileges Visual Studio INSTALL to fail.)
  2. It wants to build the VTK. (ALL_BUILD)
    1. The configuration of the solution (Debug, Release) set the.
    2. Choose the ALL_BUILD project from Solution Explorer.
    3. [Build]> to build VTK Press [Build Solution].
  3. It wants to install the VTK. (INSTALL)
    1. Choose the INSTALL project from Solution Explorer.
    2. [Build]> [projects only]> to install the VTK Press [INSTALL only the Build menu.CMAKE_INSTALL_PREFIX necessary files are copied to the specified output destination.

Environment Variable

  1. Environment variable VTK_DIR create a VTK of path: Set the (C \ Program Files \ VTK).
  2. Environment variable Path I add a% VTK_DIR% \ bin; to.

Building VTK6 + Qt5 with Visual Studio

Download

  1. Download VTK 6.1.0 the (VTK-6.1.0.zip) to unzip the file. (C: \ VTK-6.1.0)Http://Www.Vtk.Org/VTK/resources/software.Html#latestcand
    Https://Github.Com/Kitware/VTK/tree/v6.1.0
  2. Qt 5.4.0 with OpenGLをダウンロード、インストールする。(C:\Qt)
    http://www.qt.io/download-open-source/#

    • Qt 5.4.0 for Windows 32-bit (VS 2013, OpenGL, 694 MB)
      (qt-opensource-windows-x86-msvc2013_opengl-5.4.0.exe)
    • Qt 5.4.0 for Windows 64-bit (VS 2013, OpenGL, 709 MB)
      (qt-opensource-windows-x86-msvc2013_64_opengl-5.4.0.exe)

CMake

  1. You want to specify the destination of the input destination and solution files of source code.
    • Where is the source code: C:\VTK-6.1.0
    • Where is build the binaries: C:\VTK-6.1.0\build
  2. Press the [Configure] to select the Visual Studio that is the target.
  3. It makes various settings.
    (Grouped and helpful to put a check to Advanced.) * Win32 is Msvc2013_opengl , x64 is msvc2013_64_openglspecified in. Ungrouped Entries

    • Qt5Core_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5Core
    • Qt5Designer_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5Designer
    • Qt5Gui_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5Gui
    • Qt5Network_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5Network
    • Qt5OpenGL_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5OpenGL
    • Qt5Sql_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5Sql
    • Qt5WebKit_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5WebKit
    • Qt5WebKitWidgets_DIRC:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5WebKitWidgets
    • Qt5Widgets_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5Widgets
    • Qt5Xml_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5Xml

    BUILD

    • BUILD_SHAREED_LIBS ☑ (check)
    • BUILD_TESTING ☐ (uncheck)

    CMAKE

    • CMAKE_CONFIGURATION_TYPES Debug;Release
    • CMAKE_INSTALL_PREFIX C:\Program Files\VTK (or C:\Program Files (x86)\VTK)

    Module

    • Module_vtkGUISupportQt ☑ (check)
    • Module_vtkGUISupportQtOpenGL ☑ (check)
    • Module_vtkGUISupportQtSQL ☑ (check)
    • Module_vtkGUISupportQtWebkit ☑ (check)
    • Module_vtkRenderingQt ☑ (check)
    • Module_vtkViewsQt ☑ (check)

    OPENGL

    • OPENGL_gl_LIBRARY opengl
    • OPENGL_glu_LIBRARY glu32

    QT

    • QT_MKSPECS_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/mkspecs/win32-msvc2013
    • QT_QMAKE_EXECUTABLE C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/bin/qmake.exe
    • QT_QTCORE_LIBRARY_DEBUG C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/Qt5Cored.lib
    • QT_QTCORE_LIBRARY_DEBUG C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/Qt5Core.lib

    VTK

    • VTK_Group_Qt ☑ (check)
    • VTK_INSTALL_QT_PLUGIN_DIR ${CMAKE_INSTALL_PREFIX}/${VTK_INSTALL_QT_DIR}
    • VTK_QT_VERSION 5
  4. Press the [Add Entry] to add the following settings.
    Name: CMAKE_PREFIX_PATH
    Type: PATH
    Value: C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x64
    (or C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86)
    Description:

    * Windows Kits path if Visual Studio 2013 8.1 \ Lib \ Winv6.3, if Visual Studio 2012 8.0 I specify the \ Lib \ Win8.

    Name: CMAKE_DEBUG_POSTFIX
    Type: STRING
    Value: -gd
    Description:

    * Debug string to be added to the file name of the build generated files of the (last).

  5. And output the solution file by pressing the [Generate].

Build

  1. Start Visual Studio with administrative privileges VTK solution file (C: \ VTK-6.1.0 \ build \ VTK.sln) to open.
    (If you do not start with administrator privileges Visual Studio INSTALL to fail.)
  2. It wants to build the VTK. (ALL_BUILD)
    1. The configuration of the solution (Debug, Release) set the.
    2. Choose the ALL_BUILD project from Solution Explorer.
    3. [Build]> to build VTK Press [Build Solution].
  3. It wants to install the VTK. (INSTALL)
    1. Choose the INSTALL project from Solution Explorer.
    2. [Build]> [projects only]> to install the VTK Press [INSTALL only the Build menu.CMAKE_INSTALL_PREFIX necessary files are copied to the specified output destination.

Environment Variable

  1. Environment variable VTK_DIR create a VTK of path: Set the (C \ Program Files \ VTK).
  2. Environment variable QTDIR by creating a Qt of the path (C: \ Qt \ Qt5.4.0 \ 5.4 \ msvc2013_64_opengl \ (or C: \ Qt \ Qt5.4.0 \ 5.4 \ msvc2013_opengl \)) to set.
  3. Environment variable Path in;% VTK_DIR% \ bin;% I add a QTDIR% \ bin.
Advertisements

Posted in CLOUD, Computer Languages, Computer Softwares, Computer Vision, Computing Technology, CUDA, GPU (CUDA), OpenCV | Tagged: , , , | 4 Comments »

Build and Use OpenBLAS in Microsoft Visual Studio

Posted by Hemprasad Y. Badgujar on March 27, 2015


Build and Use OpenBLAS in Microsoft Visual Studio

As of OpenBLAS v0.2.10, it is currently only possible on Windows to build OpenBLAS with MinGW. The resulting library can be used in Visual Studio, but it can only be linked dynamically. This configuration has not been thoroughly tested and should be considered experimental.

Incompatible x86 calling conventions

Due to incompatibilities between the calling conventions of MinGW and Visual Studio you will need to make the following modifications ( 32-bit only ):

  1. Use the newer GCC 4.7.0. The older GCC (<4.7.0) has an ABI incompatibility for returning aggregate structures larger than 8 bytes with MSVC.

Build OpenBLAS on Windows OS

  1. Install the MinGW (GCC) compiler suite, either 32-bit (http://www.mingw.org/) or 64-bit (http://mingw-w64.sourceforge.net/). In addition, please install MSYS with MinGW.
  2. Build OpenBLAS in the MSYS shell. Usually, you can just type “make”. OpenBLAS will detect the compiler and CPU automatically.
  3. After the build is complete, OpenBLAS will generate the static library “libopenblas.a” and the shared dll library “libopenblas.dll” in the folder. You can type “make PREFIX=/your/installation/path install” to install the library to a certain location.

**Notice. We suggest using official MingWin or MingWin-w64 compilers. A user reported that s/he met Unhandled exception by other compiler suite.https://groups.google.com/forum/#!topic/openblas-users/me2S4LkE55w

Generate import library (before 0.2.10 version)

  1. First, you will need to have the lib.exe tool in the Visual Studio command prompt.
  2. Open the command prompt and type cd OPENBLAS_TOP_DIR/exports, where OPENBLAS_TOP_DIR is the main folder of your OpenBLAS installation.
  3. For a 32-bit library, type lib /machine:i386 /def:libopenblas.def. For 64-bit, typelib /machine:X64 /def:libopenblas.def.
  4. This will generate the import library “libopenblas.lib” and the export library “libopenblas.exp” in OPENBLAS_TOP_DIR/exports. Although these two files have the same name, they are totally different.

Generate import library (0.2.10 and after version)

  1. OpenBLAS already generated the import library “libopenblas.dll.a” for “libopenblas.dll”.

Use OpenBLAS .dll library in Visual Studio

  1. Copy the import library (before 0.2.10: “OPENBLAS_TOP_DIR/exports/libopenblas.lib”, 0.2.10 and after: “OPENBLAS_TOP_DIR/libopenblas.dll.a”) and .dll library “libopenblas.dll” into the same folder.
  2. Please follow the documentation about using third-party .dll libraries in MS Visual Studio 2008 or 2010. Make sure to link against a library for the correct architecture. For example, you may receive an error such as “The application was unable to start correctly (0xc00007b)” which typically indicates a mismatch between 32/64-bit libraries.

Notice. If you need CBLAS, you should include cblas.h in /your/installation/path/include in Visual Studio. Please read this page.

Limitations

  • Both static and dynamic linking are supported with MinGW. With Visual Studio, however, only dynamic linking is supported and so you should use the import library.
  • Debugging from Visual Studio does not work because MinGW and Visual Studio have incompatible formats for debug information (PDB vs. DWARF/STABS). You should either debug with GDB on the command-line or with a visual frontend, for instanceEclipse or Qt Creator.

Posted in Computer Softwares, Installation, Research Menu | Tagged: , , , , , | Leave a Comment »

build Tesseract 3.03 with Visual Studio 2013

Posted by Hemprasad Y. Badgujar on March 17, 2015


Compiling Tesseract 3.02.02 with Visual C++ 2008 (Express) is covered by the documentation whereas compiling Tesseract 3.03 isn’t covered at all, though.

Unfortunately newer versions of Tesseract also require a new version of Leptonica, a C library for image processing and image analysis applications, which in turn requires new versions of zlib, libpng, libtiff, libjpeg and giflib. Tesseract provides pre-compiled versions of Leptonica, which prevents you from having to collect and set up projects for all of these libraries in Visual Studio, which can be a tedious task.

Yesterday I found a project on GitHub that includes a Visual Studio solution file for all dependencies required to compile Tesseract 3.03: charlesw/tesseract-vs2012. While following the build instructions there, I stumpled over several build errors, which I could easily resolve by removing a definition. The necessary change is in my fork of the repository mentioned above.

This is a write-up of all steps that are required to compile Tesseract 3.03 with Visual Studio 2013.

Prerequisites

  1. Install Git.
  2. Install SVN. There are many versions of SVN. You can, for example, install the binary package from SlickSVN for free.
  3. Install Visual Studio 2013 for Windows Desktop (the Express version will be enough). You don’t need the optional features except for “Microsoft Foundation Classes for C++”.

Building the dependencies

  1. Create a directory where you want to compile Tesseract. In this document, I’ll assume it’s C:\Tesseract-Build\.
  2. Open a CMD prompt and change to that directory.
    cd \Tesseract-Build\
  3. Clone the dependencies repository from GitHub.
    git clone https://github.com/SGGS-IT/tesseract-ocr.git
  4. Open the “VS 2013 Developer Command Prompt”. (It can be found in the Start Menu.)
  5. Change to the newly cloned repository.
    cd \Tesseract-Build\tesseract-vs2012
  6. Build the dependencies
    msbuild build.proj
  7. You can close the “VS 2013 Developer Command Prompt”.

Building Tesseract

  1. Re-open the first command prompt and ensure it’s still in C:\Tesseract-Build\.
  2. Get the latest source from SVN.
    svn checkout http://tesseract-ocr.googlecode.com/svn/trunk/
  3. Change to the newly checked-out repository.
    cd tesseract-ocr
  4. Apply the patch provided in tesseract-vs2013.
    svn patch ..\tesseract-vs2012\vs2013+64bit_support.patch
  5. Copy both directories in C:\Tesseract-Build\tesseract-vs2012\release\ toC:\Tesseract-Build\. Now you should have
    • C:\Tesseract-Build\include\
    • C:\Tesseract-Build\lib\
  6. Open C:\Tesseract-Build\tesseract-ocr\vs2013\tesseract.sln with Visual Studio 2013.
  7. Press F7 on your keyboard. Both libtesseract303 and tesseract should compile without errors.

The Visual Studio solution file contains configurations for dynamic and static compilation as well as debugging and release configurations for both 32-Bit and 64-Bit. Select whichever configuration you need and recompile with F7.

You can find the compiled binaries in C:\Tesseract-Build\tesseract-ocr\vs2013\bin\.

Posted in Computer Softwares, Installation, Mixed, OpenCV, Project Related | Tagged: , , , , | Leave a Comment »

Project Template in Visual Studio

Posted by Hemprasad Y. Badgujar on March 5, 2015


 

 Sample Image - maximum width is 600 pixels

Introduction

This article describes the step by step process of creating project template in Visual Studio 2012 and VSIX installer that deploys the project template. Each step contains an image snapshot that helps the reader to keep focused.

Background

A number of predefined project and project item templates are installed when you install Visual Studio. You can use one of the many project templates to create the basic project container and a preliminary set of items for your application, class, control, or library. You can also use one of the many project item templates to create, for example, a Windows Forms application or a Web Forms page to customize as you develop your application.

You can create custom project templates and project item templates and have these templates appear in the New Project and Add New Item dialog boxes. The article describes the complete process of creating and deploying the project template.

Using the Code

Here, I have taken a very simple example which contains nearly no code but this can be extended as per your needs.

Create Project Template

First of all, create the piece (project or item) that resembles the thing you want to get created started from the template we are going to create.

Then, export the template (we are going to use the exported template as a shortcut to build our Visual Studio template package):

Visual Studio Project Templates

We are creating a project template here.

Fill all the required details:

A zip file should get created:

Creating Visual Studio Package Project

To use VSIX projects, you need to install the Visual Studio 2012 VSSDK.

Download the Visual Studio 2012 SDK.

You should see new project template “Visual Studio Package” after installing SDK.

Select C# as our project template belongs to C#.

Provide details:

Currently, we don’t need unit test project but they are good to have.

In the solution, double-click the manifest, so designer opens.

Fill all the tabs. The most important is Assert. Here you give path of our project template(DummyConsoleApplication.zip).

As a verification step, build the solution, you should see a .vsix being generated after its dependency project:

Installing the Extension

Project template is located under “Visual C#” node.

Uninstalling the Project Template

References

Posted in .Net Platform, C, Computer Languages, Computer Software, Computer Softwares, Computer Vision, CUDA, GPU (CUDA), Installation, OpenMP, PARALLEL | Tagged: , , | Leave a Comment »

How to get started with wxWidgets on Windows

Posted by Hemprasad Y. Badgujar on February 3, 2015


How to get started with wxWidgets on Windows

wxWidgets is a cross-platform GUI library, that is also available for Windows. You can get started with using wxWidgets in a few steps:

  1. Download and install the Windows installer for the current stable release of wxWidgets from its download page. It installs the source and build files in C:. For example, inC:\wxWidgets-3.0.2\
  2. wxWidgets needs to be built before it can be used with your application. Go toC:\wxWidgets-3.0.2\build\msw and open the .sln file that matches the Visual Studio version you intend to use for your application. For example, I open wx_vc10.sln using Visual Studio 2012.
  3. Choose one of the build types: Debug, Release, DLL Debug or DLL Release and build the solution. The resulting .lib files are placed in C:\wxWidgets-3.0.2\lib\vc_lib
  4. Create a new Visual Studio solution for your C++ application. Remember that it has to be Win32 Project, not a Win32 Console Project. The difference is that the main function is defined inside wxWidgets and does not need to be defined in your application code.
  5. Add a .cpp file to your solution and copy the Hello World code into it.
  6. Add C:\wxWidgets-3.0.2\include and C:\wxWidgets-3.0.2\include\msvc as additional include directories to the solution.
  7. Add C:\wxWidgets-3.0.2\lib\vc_lib as additional library directory to the solution.
  8. Build the solution and run it to see an empty wxWidgets window.

Posted in Computer Vision, Entertainment, Free Tools, My Research Related, OpenCV | Tagged: , , , , , , , | Leave a Comment »

Run a makefile in Windows?

Posted by Hemprasad Y. Badgujar on October 12, 2014


If you have Visual Studio, run the Visual Studio Command prompt from the Start menu, change to the directory containing Makefile.win and type this:

nmake -f Makefile.win

You can also use the normal command prompt and run vsvars32.bat (c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools for VS2008). This will set up the environment to run nmake and find the compiler tools.

Posted in Mixed | Tagged: , , , , | Leave a Comment »

 
Extracts from a Personal Diary

dedicated to the life of a silent girl who eventually learnt to open up

Num3ri v 2.0

I miei numeri - seconda versione

ThuyDX

Just another WordPress.com site

Algunos Intereses de Abraham Zamudio Chauca

Matematica, Linux , Programacion Serial , Programacion Paralela (CPU - GPU) , Cluster de Computadores , Software Cientifico

josephdung

thoughts...

Tech_Raj

A great WordPress.com site

Travel tips

Travel tips

Experience the real life.....!!!

Shurwaat achi honi chahiye ...

Ronzii's Blog

Just your average geek's blog

Karan Jitendra Thakkar

Everything I think. Everything I do. Right here.

VentureBeat

News About Tech, Money and Innovation

Chetan Solanki

Helpful to u, if u need it.....

ScreenCrush

Explorer of Research #HEMBAD

managedCUDA

Explorer of Research #HEMBAD

siddheshsathe

A great WordPress.com site

Ari's

This is My Space so Dont Mess With IT !!

%d bloggers like this: