sciapp / gr

GR framework: a graphics library for visualisation applications
Other
329 stars 54 forks source link

PNG output in C/C++ #50

Closed petar-andrejic closed 6 years ago

petar-andrejic commented 6 years ago

I am unable to get PNG output when using gr in C++. PDF output works fine, but something seems to be silently failing when using a png file extension. The same code translated to python works just fine, and outputs to PNG correctly. I have checked, and both the C++ code and python are using the same installation of gr, built from source. For reference I am using beginprint and endprint, and the C++ executable successfully outputs a PDF when the pathname is set to have a .PDF extension. I have had little luck trying to figure out the cause as the program still completes, and the GKS window does flash, but no png file is written at the end. The program then exits with error code 0

jheinen commented 6 years ago

Does the same code work in Python or Julia? Did you build GR from source or could you use a pre-compiled binary run-time?

petar-andrejic commented 6 years ago

I built GR from source. Python code works. Just tried with the pre-built binary and it exports fine, however the pre-built binaries don't have the header files which makes using the libraries in C/C++ a bit of a pain. Could the header files be included in the releases?

jheinen commented 6 years ago

Good to hear. We'll include the header files an publish a new release next week ...

petar-andrejic commented 6 years ago

Thats great, thanks!