Can I use PVRTexTool lib and PVRTools together?

This topic contains 4 replies, has 3 voices, and was last updated by  temein 3 years, 3 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #31762


    PVRTexTool lib includes dir:
    PVRTools dir:

    It turns out that symbols in PVRTTexture.obj(GraphicsSDKPVRTexToolLibraryIncludePVRTTexture.cpp) are redefined in PVRTexLib.lib which contains symbols in GraphicsSDKPVRTexToolLibraryIncludePVRTTexture.h.

    For example,
    error LNK2005: “public: bool __thiscall MetaDataBlock::ReadFromPtr(unsigned char const * *)” (?ReadFromPtr@MetaDataBlock@@QAE_NPAPBE@Z) already defined in PVRTexLib.lib(PVRTTexture.obj)



    Is anyone here?

    AFAIS, it is an design error to put symbols in global namespace when designing a static library.


    Joe Davis


    I’ve seen the post and have asked the PVRTexTool lead engineer to follow up with you. He’s out of the office today, so may not be able to look into this until next week.



    Hi Temein,

    You should be able to use the two together, but you probably have to remove PVRTTexture from the Tools project and rebuild it assuming that it’s there in PVRTexLib. I’d have had to basically write a separate version of the file to get it out of the global namespace, or wrap the whole thing with some preprocessor code, amongst other code changes. In all honesty though – it’s just something I’ve never considered (this was all originally a bunch of C libraries so it didn’t necessarily make sense to namespace things in the past). Alternatively, you can work around it by linking with the dynamic version of PVRTexLib.

    This is something that should be fixed in the new framework when it comes out. Until then I’m not sure what to do -we’ll probably end up wrapping it in preprocessor code for the PVRTexLib build or moving some code around to avoid the clash, but this will require a number of code changes. I’ve filed a bug against it here. Check this item for updates – if you up-rank it, it should notify you whenever there’s an update.





Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.