CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2008
    Posts
    91

    Boost GIL not compiling?

    Hello.

    I am trying to compile this code in MS VC++ 2008 Express, but I get the error:
    PHP Code:
    fatal error C1083Cannot open include file'jpeglib.h'No such file or directory 
    Any idea why?

    Thanks in advance!
    Code:
    #define BOOST_NO_DEPRECATED
    
    #include <boost/lexical_cast.hpp>
    #include <boost/gil/extension/io/jpeg_dynamic_io.hpp>
    #include <cmath>
    #include <ctime>
    #include <set>
    #include <string>
    #include <fstream>
    #include <iomanip>
    #include <iostream>
    #include <strstream>
    #include <vector>
    using namespace std;
    namespace bGIL = boost::gil;
    
    int main()
    {
        
        return 0;
    }

  2. #2
    Join Date
    Nov 2008
    Location
    England
    Posts
    748

    Re: Boost GIL not compiling?

    jpeg_dynamic_io.hpp ....... Support for reading and writing JPEG files Requires libjpeg
    Get Microsoft Visual C++ Express here or CodeBlocks here.
    Get STLFilt here to radically improve error messages when using the STL.
    Get these two can't live without C++ libraries, BOOST here and Loki here.
    Check your code with the Comeau Compiler and FlexeLint for standards compliance and some subtle errors.
    Always use [code] code tags [/code] to make code legible and preserve indentation.
    Do not ask for help writing destructive software such as viruses, gamehacks, keyloggers and the suchlike.

  3. #3
    Join Date
    Dec 2008
    Posts
    91

    Re: Boost GIL not compiling?

    Thanks, but how do I install libjpeg to work with Boost?

  4. #4
    Join Date
    Nov 2008
    Location
    England
    Posts
    748

    Re: Boost GIL not compiling?

    Not sure, I havent used GIL yet, but I know you need additional libraries such as libjpeg libpng libtiff and it's misleading because the first comment in the GIL literature is that you dont need to link against additional libraries, but the evidence is that you do need additional libraries even if those are self-contained in header files. Check the files page. This tells you which additional libs are needed by which header files.

    I suspect you would need install whichever libraries you need, then add the folders to your compilers include path, then the boost headers should be able to find the headers for libjpeg and everything work.
    Get Microsoft Visual C++ Express here or CodeBlocks here.
    Get STLFilt here to radically improve error messages when using the STL.
    Get these two can't live without C++ libraries, BOOST here and Loki here.
    Check your code with the Comeau Compiler and FlexeLint for standards compliance and some subtle errors.
    Always use [code] code tags [/code] to make code legible and preserve indentation.
    Do not ask for help writing destructive software such as viruses, gamehacks, keyloggers and the suchlike.

  5. #5
    Join Date
    Dec 2008
    Posts
    91

    Re: Boost GIL not compiling?

    Thanks Russco. I got it working.

    I downloaded tiff-3.9.2.tar.gz and ran the command "nmake /f makefile.vc" through the Visual Studio command prompt.

    It compiles now at least.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured