Hello Carsten, > > But did anybody ever try this? My FC-derived classes are in a Lib > which is > > then statically linked to the app, but the OpenSG DLLs are > dynamically > > linked. > > not sure, I've not tried to build static libs before. Is it necessary > that you go this route?+
It is the easiest way, as multiple apps use the same data structures you usually put the common stuff in a library ;-) > > I don't quite understand why the error message says something about > > missing dllimport, that just doesn't make sense. > > oh, wait, sorry for not picking up on this earlier: the class > annotations are set up so that they are either __declspec(dllexport) or > __declspec(dllimport) depending on whether OSG_COMPILE<LIBNAME>LIB is > defined or not. > You probably have a OSGMyLibDef.h file that defines a > OSG_MYLIB_DLLMAPPING macro? I guess it should be defined to nothing if > you are going to build a static MyLib.lib then? Yes I do have that macro defined as empty, I think I got that from the cubes example or so. On a side note (and I don't think this is related), the compiler keeps generating an import library for my application, which doesn't make much sense but it shows that some stuff is created with dllexport when it shouldn't have any dll-related decorations. > > However, I tried explicit template instantiation like this: > > > > #define OSG_INSTANTIATE_PTR(CLASST) \ > > template class TransitPtr < CLASST > ; \ > > template class MTRefCountPtr< CLASST, \ > > NoRefCountPolicy > ; \ > > template class RefCountPtr < CLASST, \ > > RecordedRefCountPolicy > ; \ > > template class RefCountPtr < CLASST, \ > > UnrecordedRefCountPolicy> ; \ > > template class RefCountPtr < CLASST, \ > > WeakRefCountPolicy > ; \ > > template class MTRefCountPtr< CLASST, \ > > RecordedRefCountPolicy > ; \ > > template class MTRefCountPtr< CLASST, \ > > WeakRefCountPolicy > ; > > > > OSG_BEGIN_NAMESPACE > > OSG_INSTANTIATE_PTR(Type1) > > OSG_END_NAMESPACE > > ok, but wasn't the original error about > OSG::PointerMFieldBase::operator[] ? That was more like a blind shot as I really have no idea how all the base & management classes are connected, and I saw a connection between PointerMFieldBase, MTRefCountPtr and the *multi* specifier in my fcd. Sometimes it just helps telling the compiler what I want to have included in the final lib. So I guess I'll keep digging ... Aloha, Andi ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
