Friday, March 15, 2013

Update and new DLLs

Today I managed to build the NaroHost solution without errors, so now I have both new DLLs in the Debug version: NaroOccCore.dll is 887 KB and NaroCppCore.dll is 1,85 MB.
I've started testing Naro with these files (using the 3242 changeset) and it crashes after some shapes are drawn. I've tested Sketch creation and drawing circles, lines, rectangles and arcs. Next week I'll work on finding and fixing the cause of the crashes.

The last steps for making NaroOccCore.dll build were:
- improved the Generator to handle the string return type and convert it to Standard_CString and convert IntPtr to void*
- improved the IsHandle method to process other classes correctly
- fixed the .api template for empty constructors
- added handling for some strange cases in Open Cascade when setters and getters were returning different types

After generating the new .api file and running ApiWrappers for it, the generated files were correct and there were no errors, but when trying to build NaroHost again, using those files (to generate NaroOccWrappers.dll) there were several errors. The fixes for these were:
- commenting some variables in Extrema_FuncExtPS.hxx and Extrema_PCFOfEPCOfExtPC.hxx (they aren't used by the code, but we get 'error C2248: cannot access private member declared in class 'TColStd_SequenceOfReal'' if we build with them uncommented).
- adding the IsSameTransient method - this isn't part of the OpenCascade Standard package, so it isn't generated - I've added the code from source control, changeset 3242
- adding casts in 3 files where the proper overload couldn't be resolved

No comments: