Minimum viewer example under Linux

I am trying to create some bindings for a programming language named Nim.

I am struggling to show a bare minimum example in terms of visualization.

I tried to follow the tutorial: occt - minimal viewer setup. Maybe it is not good example, because that is for windows and I am in Linux, but I didn't find a better example.

So far, I covered until the Viewers and Views part of the tutorial. This is the C++ code generated by Nim.

I am having one issue when I run it:

SIGSEGV: Illegal storage access. (Attempt to read from nil?)
[1]    105603 segmentation fault (core dumped)  ./viewer02

The issue seems to be related with the line:

aViewer__viewer4850_36 = opencascade::handle<V3d_Viewer>((new V3d_Viewer(theDriver__viewer4850_28)));

Any clue about the issue?

It would be very helpful for me a bare minimum example working in Linux. Even simpler than the one in the tutorial.

gkv311 n's picture

Referred blog post was written for Windows, but the project repository on GitHub should work on Linux as well - have you tried building/running it?

Jose M. Garcia's picture

Yes. I found out after I published this message. It is becoming very useful. Thanks