title: VIPS Library Qt
body: <p>Trying to build project with VIPS library. I added next .lib files to project:</p>
  
  <pre><code>win32: LIBS += -L$$PWD/../../../../vips-dev-8.4/lib/ -llibvips
  
  INCLUDEPATH += $$PWD/../../../../vips-dev-8.4/include
  DEPENDPATH += $$PWD/../../../../vips-dev-8.4/include
  
  win32: LIBS += -L$$PWD/../../../../vips-dev-8.4/lib/ -llibglib-2.0
  
  INCLUDEPATH += $$PWD/../../../../vips-dev-8.4/include/glib-2.0
  DEPENDPATH += $$PWD/../../../../vips-dev-8.4/include/glib-2.0
  
  win32: LIBS += -L$$PWD/../../../../vips-dev-8.4/lib/ -llibvips-cpp
  
  INCLUDEPATH += $$PWD/../../../../vips-dev-8.4/include
  DEPENDPATH += $$PWD/../../../../vips-dev-8.4/include
  
  win32: LIBS += -L$$PWD/../../../../vips-dev-8.4/lib/ -llibvipsCC
  
  INCLUDEPATH += $$PWD/../../../../vips-dev-8.4/include
  DEPENDPATH += $$PWD/../../../../vips-dev-8.4/include
  </code></pre>
  
  <p>and this my main.cpp ( i copied it from vips official example)</p>
  
  <pre><code>#include &lt;QCoreApplication&gt;
  #include &lt;vips/vips.h&gt;
  #include &lt;vips/vips8&gt;
  using namespace vips;
  int main(int argc, char *argv[])
  {
      QCoreApplication a(argc, argv);
  
        GOptionContext *context;
        GOptionGroup *main_group;
        GError *error = NULL;
  
        if( VIPS_INIT( argv[0] ) )
          vips_error_exit( NULL );
  
        context = g_option_context_new( "" );
  
        main_group = g_option_group_new( NULL, NULL, NULL, NULL, NULL );
        g_option_context_set_main_group( context, main_group );
        g_option_context_add_group( context, vips_get_option_group() );
  
        if( !g_option_context_parse( context, &amp;argc, &amp;argv, &amp;error ) ) {
          if( error ) {
            fprintf( stderr, "%s\n", error-&gt;message );
            g_error_free( error );
          }
  
          vips_error_exit( NULL );
        }
  
        VImage in = VImage::new_from_file( argv[1],
          VImage::option()-&gt;
            set( "access", VIPS_ACCESS_SEQUENTIAL_UNBUFFERED ) );
  
        double avg = in.avg();
  
        printf( "avg = %g\n", avg );
        printf( "width = %d\n", in.width() );
  
  
        VImage out = in.embed( 10, 10, 1000, 1000,
          VImage::option()-&gt;
            set( "extend", "background" )-&gt;
            set( "background", 128 ) );
  
        out.write_to_file( argv[2] );
  
        vips_shutdown();
      return a.exec();
  }
  </code></pre>
  
  <p>it gives next errors:
  <a href="https://i.stack.imgur.com/XInhL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XInhL.png" alt="enter image description here"></a></p>
  
  <p>i also tried to compile C example, but it gives same errors. Maybe i forgot to add any libs? os: win7 32, compiler: mingw32</p>
  
  <p><strong>UPD:</strong>
  i removed "lib" prefix everywhere, so now it looks so:</p>
  
  <pre><code>win32: LIBS += -L$$PWD/../../../../vips-dev-8.4/lib \
          -lvipsCC -lvips-cpp -lvips -lgsf-1 -lz -ljpeg -lxml2 -lfftw3 -lm \
          -lMagickWand-6.Q16 -llcms2 \
          -lopenslide  -lpangowin32-1.0 -ltiff -lpng16 -lexif \
          -lMagickCore-6.Q16 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 \
          -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl \
  
  
  INCLUDEPATH += $$PWD/../../../../vips-dev-8.4/include
  INCLUDEPATH += $$PWD/../../../../vips-dev-8.4/include/glib-2.0
  INCLUDEPATH += $$PWD/../../../../vips-dev-8.4/include/glib-2.0/include
  </code></pre>
  
  <p>but i still have the same errors</p>