OCAF + FLTK = problem.

Hi All,

I am having problems getting an application using OCAF and FLTK to work on my WindowsNT box. I am quite sure its a problem with the OCAF implementation but just can't seem to find it. If somebody could drop me some hints that would be excellent. This is what I am doing.....

1) I have a class OCAF_Application (and Handle_OCAF_Applicatio) which is derived from TDocStd_Application. In this class I overload the member functions needed. Infact this class in its present state is an exact copy of the TSampleOcaf_Application class from the sample in the downloads. This class is compiled as a static library (I will have much more stuff in here eventually). Note: I don't have the .ixx or .jxx files, I simply put the implementation of the functions found in these file in to either the .h or .cxx files.

2)I have all my FLTK Gui stuff, which without the OCAF stuff displays OpenCascade stuff no probs.

3)My FLTK window has a handle to the OCAF_Application class, when the window constructor is called, I instantiate the OCAF_Application class. Here I get the infamous exception thrown. So I suspect its an enviroment thing !!!!

4)Well before I create my FLTK window I set the four enviroment variables, CSF_ResourcesDefaults, CSF_ResourcesUserDefaults, CSF_PluginDefaults, CSF_PluginUserDefaults. These all point to a directory which contains the Resources and Plugin files. I have checked the return values of putenv(...) and they all return 0 indicating that the operation was correct.

This is really confussing, the extended OCAF application class, the resource and plugin files and the way in which I set the environments are the same as the OCAF example. The OCAF example runs, my doesn't. The only difference I can see is that I have to compile the code using debug multithreaded insted of debug multithreaded DLL because of FLTK, could this be the problem. I link to static FLTK lib. Is there a problem when you link static and dynamic libraries for one app.

I really need to solve this problem. So please,please help me.

Sorry for the long mail.

Simon

s-bulman's picture

Further to this.....

If I set my environment variable path to point to the Windows_NT\dlld directory the OCAF sample example throws the exception, if however I set the path to Windows_NT\dll everything is ok for the OCAF sample provided (sadly not for my example!).

Simon