PVRTexLib 2.10 linker error

This topic contains 13 replies, has 4 voices, and was last updated by  Sniffy2 5 years, 7 months ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #30780

    Hi!

    I have downloaded the latest version PVRTexLib_REL_2.10@839873.tar.gz
    and when compiling using visual studio 2010, 32 bit, dll version I get this error:

    error LNK2019: unresolved external symbol “public: __thiscall pvrtexture::PixelType::PixelType(unsigned char,unsigned char,unsigned char,unsigned char,unsigned char,unsigned char,unsigned char,unsigned char)” (??0PixelType@pvrtexture@@QAE@EEEEEEEE@Z) referenced in function “void __cdecl pvrtexture::`dynamic initializer for ‘PVRStandard8PixelType”(void)”(??__EPVRStandard8PixelType@pvrtexture@@YAXXZ)

    I have this code:

            // source texture
            PVRTextureHeaderV3 header;
            header.u64PixelFormat = pvrtexture::PVRStandard8PixelType.PixelTypeID;
            header.u32ChannelType = ePVRTVarTypeUnsignedByteNorm;
            header.u32Width = size.x;
            header.u32Height = size.y;

            pvrtexture::CPVRTexture texture(header, myPixelData);

    Any Ideas?
    -Jochen

    #35548

    by the way the symbol ??0PixelType@pvrtexture@@QAE@EEEEEEEE@Z occurs in the lib version, but not in the dll version

    #35549

    Hi Jochen,

    I’ll have a look, it sounds like I’ve missed off a dllexport define somewhere though, if this is the case I’ll sort out an update asap.

    Thanks,

    Tobias

    #35550

    Hi Jochen,

    Yes this is the case, I’ve updated the header file and will get the update on the website as soon as possible.

    In the meantime, there is a workaround. There are macros in Tools/PVRTTexture.h called PVRTGENPIXELIDn (n=1,2,3 or 4) which you can use instead. These work in the same way and will output a 64-bit integer PixelID which you can use in the same way. These macros are also useful as they can pre-compute the pixelID at compile time if constant values are used.

    Thanks,

    Tobias

    #35551

    RagTagDev
    Member

    Hi,

     
    I’m also getting the same issue. Unfortunately I don’t think I can use the workaround as just including “PVRTexture.h” from PVRTexLib causes this link issue with the DLL version of the library. If I try using the static version I’m presented with:

    fatal error LNK1241: resource file PVRTexLib.lib(PVRTexLib.res) already specified

    any ideas on this one? (I’m using the 32-bit Windows libraries)

    Cheers,

    – Richard

    #35552

    Hi Richard,

    I assume you’re trying to link PVRTexLib into another static library? Apparently Visual Studio doesn’t like having .res files compiled for both your static lib and ours at the same time. It might be alleviated by going to Configuration Properties->Resources->Culture and setting it to “<inherit from parent or project defaults>. The resources in PVRTexLib are only included by accident though – the dll and static libs build from the same project. I’ll exclude the res file from future builds and post it to the website alongside the dll fix when it’s ready.

    Thanks,

    Tobias

    P.S I assume these are the only linker errors you’re getting? I can’t see any further problems when linking with the dll or lib on my end, but thought I should just check to see if you have any others?

    Tobias2012-03-15 17:36:13

    #35553

    RagTagDev
    Member

    Hi Tobias,

     
    Yep, that’s exactly the problem. Removing the res from your lib would be great. Any ETA on the new build or is it possible to get an intermediate build?
     
    Yep, as far as I’m aware those are the only linker issues.
     
    Cheers,
    – Richard
    #35554

    Hi Richard,

    As we’ve only just released and this is a brand new library in terms of interface and build, I’m going to deliberately hold off for a few more days to make sure I integrate as much developer feedback as soon as possible – and catch any other problems in the process. Hopefully I’ll get it up some time next week though.

    Thanks,

    Tobias

    #35555

    RagTagDev
    Member

    Ok, thanks Tobias.

     
    One more question: there doesn’t appear to be a 64-bit MacOS version of the libraries – they would be handy if you could provide them too?
     
    Cheers,
    – Richard
    #35556

    Hi Richard,

    The MacOS binaries we provide, unless explicitly saying “x86_32” are universal binaries, and contain both 32 and 64 bit versions of the libraries. You can link with these libraries in your 64-bit apps with exactly the same file you use for 32-bit, which will be handled by the linker transparently.

    Thanks,

    Tobias

    #35557

    Sniffy2
    Member
    Tobias wrote:
    Hi Richard,

    As we’ve only just released and this is a brand new library in terms of interface and build, I’m going to deliberately hold off for a few more days to make sure I integrate as much developer feedback as soon as possible – and catch any other problems in the process. Hopefully I’ll get it up some time next week though.

    Thanks,

    Tobias

     
    It would help me if you release the fixes sooner, I need to upgrade our old SDK right now and I have to decide if I’m going to use this completely-revised pvrtexlib or the older one in 2.9.  Both seem to have known bugs.
    #35558

    Hi Kris,

    I’ll be pushing an updated version to the website which fixes these bugs either today or tomorrow. I’ll post here once it’s up.

    Thanks,

    Tobias

    #35559

    Hi all,

    Just to let you know, versions of PVRTexLib/PVRTexTool have been uploaded that should fix these issues. If there are any problems please let me know! 🙂

    Thanks,

    Tobias

    #35560

    Sniffy2
    Member
    Tobias wrote:
    Hi all,

    Just to let you know, versions of PVRTexLib/PVRTexTool have been uploaded that should fix these issues. If there are any problems please let me know! 🙂

    Thanks,

    Tobias

     
    Thanks for your responsiveness, it’s a tremendous help to not have to wait 6+ months for the next major release to get bug fixes (unlike some other vendors who shall go unnamed 🙂
Viewing 14 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic.