Re: How can I modify the function of openexr

Gonzalo Garramuno <[email protected]>
Newsgroups gmane.comp.video.openexr.devel
Message-ID <[email protected]>
On 27/11/14 11:53, Yan wrote:
> dear all,
>
> As title, I want to modify the function of openexr.
> I try to modify the source code of ImfPizCompressor.cpp, only add one
> line: printf("start wavelet encoding\n");, and then build the openexr
> library.
> But after I build the openexr library and write an test code, the
> sentence that I expect to output is not output.
> So, whether the result means that I don't modify the function
> successfully?
> And, how can I modify the function of openexr?
You should try printing to stderr so that the output does not get cached.

#include <stdio.h>

void func()
{
fprintf( stderr, "Start wavelet encoding\n" );
}

or in C++:

#include <iostream>

void func()
{
std::cerr << "Start wavelet encoding" << std::endl;
}

Also if you are doing this on windows, you need to make sure there's a 
console to output to (and not write a windows application, but a console 
one).

Don't take it personally, but note that if you are having trouble with 
this it is a sign that you might not be ready to change the openexr code.
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.