Silly me finally found out what I did not grasp in the C++ "class" paradigm (which does not exist in ANSI C and is different in Object Pascal and hence new to me).
I found that when defining a variable with a class type, a constructor of that class is automatically called (no idea when exactly it will be called when creating a static variable / instance instead of heap or stack based).
If no parameters (in parentheses) are given with the variable definition, a constructor with no parameters is to be called (even if no such thing is in the class definition) - otherwise a constructor with the appropriate parameters is called. When the class definition does not feature a constructor with no parameters, a "default" constructor is assumed. But as there is no implementation for a parameter-less constructor function in SWS_ListView, I get a linker error.
After learning this I found that I in act don't want such a variable, but a variable with a pointer to the class instance. And such a pointer variable does not trigger the call of a constructor, but this can be done manually by "new".
OK this makes sense and works. But...
After this, the linking process continues instead of breaking up. Hence I see what the file sws_wnd.cpp, that I included in the project, requires. It turns out that by adding more source files to the project to take care of the open references seems to result in the need to include all source files as well from sws as from WDL in the project. This does not seem to mke any sense at all.
Any further tips ?
Thanks,
-Michael
Last edited by mschnell; 09-25-2019 at 02:21 PM.
|