How to Release OCC app.?


I have developed an app, and want to release it.
I'm using static library mfc, and compile release mode.
Resultingly, I got .exe file. but it don't be execute.

.exe file and dll files(using occ dll files in my app.) located in same folder(TKOpenGL too.).
execute .exe file, i've got this message. "Fetal error during graphic initialization"

somebody help me~~!

Venugopal Gudimetla's picture

nice, can you tell us, what kind of application it is?

abcdeee's picture

it's simply CNC program.

I think it's associate CSF_GraphicShr. but i don't think any solution....T_T

Venugopal Gudimetla's picture

Very nice, congrats, looking forward to trying it.

abcdeee's picture

I trying this method.

1. add "OSD_Environment OSD("CSF_GraphicShr", "TKOpenGl.dll");" in ~app.cpp

2. check CSF_GraphicShr path (in Run.bat)

3. add TKOpenGl.lib on Project

but I don't solve this problem...
What something I missed?

Roman Lygin's picture

You might want to check this

Hope this helps.

abcdeee's picture

Hi Roman.
I saw this posting yesterday.
but I don't know exactly yet.

this posting say, "- CSF_GraphicShr (set to TKOpenGl.dll or a full path where it is located)".

so, I using OSD_Environment, and check my bat file.
but don't solved this problem...

could you give me some advice?

Roman Lygin's picture

Try to debug your app and find out why the development version works and your to-be-distributed version does not.
Create a bat file setting all environment variables (avoid OSD_Environment at first) and launch your app.
The root-cause seems to be in environment so focus on that.
Good luck!

sergey zaritchny's picture

You may also use as template the "env.bat" file located in OCCT ...\ros\ directory.
I hope it will help you tune your local environment.


abcdeee's picture

I solved this problem!! wow!!!
Thank you very much, everyone!!

It's all thanks to you!!!^0^