Menu

Compile IT++ under windows with free tools

k3rl0u4rn
2008-01-09
2012-09-15
  • k3rl0u4rn

    k3rl0u4rn - 2008-01-09

    Hi people,

    I am currently working on a project that needs signal processing functions. Our scientist are used to IT++ so they decided to include IT++ as a dependency of the project. The project should compile under both linux and windows and should be totally free. So the way IT++ is compiled (and supported) under windows did not fit our needs (we don't want intel compiler nor proprietary libraries). Thus we got to compile IT++ a different/undocumented way. I saw lots of questions about that on the forum and it seems this is a common problem, not yet solved...

    Ok, I finally managed to compile IT++ and its dependencies under windows to be used under MS Visual C++ 2005 thanks to MinGW. It should not be a problem to modify this method for any MS Visual C++ version I guess... Here are the steps I did to get IT++ working :

    • downloaded mingw 5.1.3 (later refered as mingw)
    • downloaded msys 1.0.10 (later refered as msys)
    • installed mingw (including : MinGW base tools, g++ compiler, g77 compiler, MinGW Make)
    • installed msys
    • downloaded itpp-external 3.0.0 (later refered as itpp-external)
    • uncompresed (under mingw)
    • configured (under mingw "./configure --prefix=[put_what_you_want] --enable-cblas --disable-fftw")
    • made and installed (under mingw "make && make install")
    • collected installed include folder
    • collected installed lib folder
    • collected mingw runtime libraries ([mingw]/lib/gcc/mingw32/gcc3.4.5/libgcc.a)

    • downloaded fftw 3.1.2 precompiled package for windows (later refered as fftw)

    • created lib files as mentionned in FFTW documentation
    • collected lib files (.lib .def)
    • collected include file (fftw3.h)
    • collected bin files (*.dll)

    • downloaded itpp 4.0.1 (later refered as itpp)

    • uncompressed itpp (under windows)
    • opened ittp_mkl workspace (under ms visual c++)
    • modified project settings in order to add fftw and itpp dependencies include path (both debug and release at once)
    • modified project settings in order to add fftw and itpp dependencies lib path (both debug and release at once)
    • modified preprocessor definitions to remove HAVE_MKL and to add HAVE_FFTW3 and HAVE_FFT (first debug, then release separately)
    • modified output lib file to itppd.lib (debug only)
    • collected src folder (*.h)
    • collected lib folder (*.lib)

    • (optional for cmake users : renamed .a to .a.lib so FindLibrary can work)

    I did not go in deep-tests to validate everything is working but at least, what we are currently using seems to work correctly...

    Please feel free to contact me if you have any question,
    Best regards and happy new year,

    k3rl0u4rn

     
    • Jan Jagla

      Jan Jagla - 2008-03-26

      Sorry, I just didn't add itppd.lib dependencies...

      Now it compiles without errors.

       
    • Jan Jagla

      Jan Jagla - 2008-03-19

      unfortunately I have one error while build in Visual C++ 2005 Express:
      timing.cpp
      e:\studia\sem 10\szpw\itpp-4.0.3\itpp\base\timing.cpp(53) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

      I found such a file in MinGW/include, but even if I add this file to project, the error still occurs.
      Any ideas? Should I install SDK?

       
      • Adam Piątyszek

        Adam Piątyszek - 2008-03-19

        Yes. "windows.h" header from SDK is necessary for IT++ timers. So you need to install SDK additionally.
        Alternatively, you can try to get rid of the itpp/base/timing.{cpp,h} files from IT++, but I am not sure if this will work fine.

        BR,
        /Adam

         
    • k3rl0u4rn

      k3rl0u4rn - 2008-03-19

      Hi JanJagla,

      you probably did not install/configure Microsoft Platform SDK, did you ?

      Best,
      K3rl0u4rn

       
    • Jan Jagla

      Jan Jagla - 2008-03-26

      OK, thanks a lot, I compiled itpp :)

      But now I have next problem...

      I'm trying to build following program in Visual Studio 2005 Express:

      include <iostream>

      include <itpp/itcomm.h>

      using namespace std;
      using namespace itpp;

      ivec generator(ivec, ivec);

      int main()
      {
      std::cout << "witaj swiecie\n\n";

      ivec gen = &quot;1 0 1 0 0 1&quot;;
      ivec start = &quot;1 0 0 0 0&quot;;
      
      ivec wynik = generator(gen, start);
      
      std::cout &lt;&lt; wynik;
      
      return 0;
      

      }

      ivec generator(ivec vgen, ivec st)
      {
      int size = vgen.length();
      int iter = 1;
      for(int i=0; i<size-1; i++) iter *= 2;
      ivec wynik;

      for(int i=0; i &lt; iter; i++)
      {
          wynik.ins(0, st[size-2]);
          int nowy = 1;
          for(int j=0; j&lt;size; j++)
          {
              nowy = ( nowy + st[j]*vgen[j+1] )%2;
          }
          st.ins(0, nowy);
      }
      return wynik;
      

      }

      I have errors:
      Linking...
      generator.obj : error LNK2019: unresolved external symbol "void cdecl itpp::it_assert_f(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int)" (?it_assert_f@itpp@@YAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00H@Z) referenced in function "public: int & thiscall itpp::Vec<int>::operator" (??A?$Vec@H@itpp@@QAEAAHH@Z)
      generator.obj : error LNK2019: unresolved external symbol "void cdecl itpp::destroy_elements<int>(int * &,int)" (??$destroy_elements@H@itpp@@YAXAAPAHH@Z) referenced in function "public: void thiscall itpp::Vec<int>::set_size(int,bool)" (?set_size@?$Vec@H@itpp@@QAEXH_N@Z)
      generator.obj : error LNK2019: unresolved external symbol "public: void thiscall itpp::Vec<int>::set(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?set@?$Vec@H@itpp@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: void thiscall itpp::Vec<int>::set(char const *)" (?set@?$Vec@H@itpp@@QAEXPBD@Z)
      generator.obj : error LNK2019: unresolved external symbol "void cdecl itpp::create_elements<int>(int * &,int,class itpp::Factory const &)" (??$create_elements@H@itpp@@YAXAAPAHHABVFactory@0@@Z) referenced in function "protected: void thiscall itpp::Vec<int>::alloc(int)" (?alloc@?$Vec@H@itpp@@IAEXH@Z)

      I was looking for how to repair it, but I don't know...

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.