pdftoipe does not compile with poppler 0.20

Panagiotis Cheilaris <[email protected]>
Newsgroups gmane.comp.graphics.ipe.general
Message-ID <[email protected]>
The error function in poppler has changed from version 0.18 
to 0.20 and as a result pdftoipe does not compile with poppler
0.20.

I noticed this problem in a mac with macports after a recent
upgrade. Here is the compilation error:

$ sudo port -vc install ipe-tools -python27
--->  Computing dependencies for ipe-tools.
--->  Building ipe-tools
make: Nothing to be done for `all'.
make: Nothing to be done for `all'.
/usr/bin/clang++ -O2 -arch x86_64 -Wno-write-strings -I/opt/local/include -I/opt/local/include/poppler     -c -o xmloutputdev.o xmloutputdev.cpp
xmloutputdev.cpp:33:5: error: no matching function for call to 'error'
    error(-1, "Couldn't open output file '%s'", fileName);
    ^~~~~
/opt/local/include/poppler/Error.h:54:19: note: candidate function not viable: no known conversion from 'int' to 'ErrorCategory' for 1st argument; 
extern void CDECL error(ErrorCategory category, int pos, const char *msg, ...);
                  ^
1 error generated.
make: *** [xmloutputdev.o] Error 1


The problem can be fixed by changing line 33 of xmloutputdev.cpp from: 

    error(-1, "Couldn't open output file '%s'", fileName);

to the following:

    error(errIO, -1, "Couldn't open output file '%s'", fileName);

Best,
Panos
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.