Hi Rune,

the important function is this one.

Andreas

static void initializeStatics(void)
{
    // for static linking
#ifndef OSG_BUILD_DLL

    printf("VRML: %p\n", OSG::VRMLSceneFileType::the());
    printf("OSG: %p\n", OSG::OSGSceneFileType::the());
    printf("OSB: %p\n", OSG::NFIOSceneFileType::the());
    new OSG::NFIOGeneric;
    new OSG::NFIOGeometry;
    new OSG::NFIOImage;

    printf("Class id %d\n", OSG::DVRVolume::getClassTypeId());
    printf("Class id %d\n", OSG::DVRVolumeTexture::getClassTypeId());
    printf("Class id %d\n", OSG::DVRIsoSurface::getClassTypeId());
    printf("Class id %d\n", OSG::DVRLookupTable::getClassTypeId());
    printf("Class id %d\n", OSG::DVRSimpleLUTShader::getClassTypeId());

    printf("Class id %d\n", OSG::PhongMaterial::getClassTypeId());
    printf("Class id %d\n", OSG::SHLChunk::getClassTypeId());
    printf("Class id %d\n", OSG::GeoColors3f::getClassTypeId());
    printf("Class id %d\n", OSG::Surface::getClassTypeId());

#ifdef OSG_WITH_JPG
    printf("JPG: %p\n", OSG::JPGImageFileType::the());
#endif
#ifdef OSG_WITH_TIF
    printf("TIF: %p\n", OSG::TIFImageFileType::the());
#endif
#ifdef OSG_WITH_PNG
    printf("PNG: %p\n", OSG::PNGImageFileType::the());
#endif
#ifdef OSG_WITH_GIF
    printf("GIF: %p\n", OSG::GIFImageFileType::the());
#endif

    printf("SGI: %p\n", OSG::SGIImageFileType::the());
    printf("DAT: %p\n", OSG::DATImageFileType::the());
    printf("MNG: %p\n", OSG::MNGImageFileType::the());
    printf("MTD: %p\n", OSG::MTDImageFileType::the());
    printf("PNM: %p\n", OSG::PNMImageFileType::the());
    printf("TGA: %p\n", OSG::TGAImageFileType::the());
    printf("Image %p\n", OSG::ImageFileHandler::the());

#endif
}

Hi Andreas,

I've looked at the file and to be honest I don't understand what's going there. I suspect the following lines to be responsible for creating missing symbols:

QAXFACTORY_DEFAULT( OSGAXPlugin,
           "{7CDDF9C3-F9DD-4245-ADF3-965DA5998FE4}",
           "{D5DFDF01-A3C3-4bb0-A397-E55F5CAEC78B}",
           "{C04774DD-2DFC-4241-835B-6B2FAA0D76CF}",
           "{985F43A2-49D0-48c1-A7B8-2178587FF2FF}",
           "{7687FBB9-FFA7-4cb9-A974-E32F15444CF5}"
           )

is this correct? Where do you get those guids from?

It seems that the /INCLUDE option can force symbols references, but I'm not sure if this can be used for making the static OpenSG lib, and is it necessary to define all classes and baseclasses used in the lib?

Do you know if there is an easier way if I use a DLL instead of a static lib?

/Rune



Andreas Zieringer wrote:

Hi Rune,

the linker on windows just links the referenced symbols in your exe. There are many classes in OpenSG without any reference, they are created via static intilization. I managed to compile a static version of the OpenSG activex plugin. You can look in OpenSG/Examples/AXPlugin/main.cpp how to create some missing references.

Andreas

Hello,

I'm in the process of encapsulating an OpenSG cluster client and head tracking functionality in a application class, so hopefully it will be easy for students to get programs running in our VR arenas and head mounted displays. I'm trying to get this class compiled into static library on Win32 which is causing some problems. I have used an existing Tutorial project file to get all the correct settings for building normal OpenSG project and then just changed the Configuration Type to static library which build a .lib without errors. This lib is linked with the main application (also based on a Tutorial proj file) without any erros, but when runninng it, it just crashes before getting to main(). Anybody got some advice on how to setup this static lib project for CL.NET 2003?

/Rune





-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users





-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to