I have been looking how to solve this and i have changed this piece of
code on PTexHalf.h:
# ifdef PTEX_EXPORTS
# define PTEXAPI __declspec(dllimport)
# else
# define PTEXAPI __declspec(dllexport)
So that "define PTEXAPI __declspec(dllexport)" is executed. The
inconsistent ddl linkage warning is gone as for the "definition of
dllimport static data member not
allowed " error. But now i have unresolved externals which i dont know
how to solve:
PtexCache.obj : warning LNK4217: locally defined symbol ??
4String@Ptex@@QAEAAV01@PBD@Z (public: class Ptex::String & __thiscall
Ptex::String::operator=(char const *)) imported in function "public:
virtual class PtexTexture * __thiscall PtexReaderCache::get(char const
*,class Ptex::String &)" (?
get@PtexReaderCache@@UAEPAVPtexTexture@@PBDAAVString@Ptex@@@Z)
2>PtexReader.obj : warning LNK4049: locally defined symbol ??
4String@Ptex@@QAEAAV01@PBD@Z (public: class Ptex::String & __thiscall
Ptex::String::operator=(char const *)) imported
2>PtexWriter.obj : warning LNK4217: locally defined symbol ??
4String@Ptex@@QAEAAV01@PBD@Z (public: class Ptex::String & __thiscall
Ptex::String::operator=(char const *)) imported in function
"protected: __thiscall PtexWriterBase::PtexWriterBase(char const
*,enum Ptex::MeshType,enum Ptex::DataType,int,int,int,bool)" (??
0PtexWriterBase@@IAE@PBDW4MeshType@Ptex@@W4DataType@2@HHH_N@Z)
2>PtexReader.obj : warning LNK4217: locally defined symbol ?
create@PtexCache@@SAPAV1@HH_NPAVPtexInputHandler@@@Z (public: static
class PtexCache * __cdecl PtexCache::create(int,int,bool,class
PtexInputHandler *)) imported in function "public: static class
PtexTexture * __cdecl PtexTexture::open(char const *,class
Ptex::String &,bool)" (?
open@PtexTexture@@SAPAV1@PBDAAVString@Ptex@@_N@Z)
2>PtexReader.obj : warning LNK4217: locally defined symbol ?
ConvertToFloat@Ptex@@SAXPAMPBXW4DataType@1@H@Z (public: static void
__cdecl Ptex::ConvertToFloat(float *,void const *,enum
Ptex::DataType,int)) imported in function "public: virtual void
__thiscall PtexReader::getPixel(int,int,int,float *,int,int)" (?
getPixel@PtexReader@@UAEXHHHPAMHH@Z)
2>PtexSeparableFilter.obj : warning LNK4049: locally defined symbol ?
ConvertToFloat@Ptex@@SAXPAMPBXW4DataType@1@H@Z (public: static void
__cdecl Ptex::ConvertToFloat(float *,void const *,enum
Ptex::DataType,int)) imported
2>PtexTriangleFilter.obj : warning LNK4049: locally defined symbol ?
ConvertToFloat@Ptex@@SAXPAMPBXW4DataType@1@H@Z (public: static void
__cdecl Ptex::ConvertToFloat(float *,void const *,enum
Ptex::DataType,int)) imported
2>PtexSeparableKernel.obj : warning LNK4049: locally defined symbol ?
h2fTable@PtexHalf@@2PAIA (public: static unsigned int *
PtexHalf::h2fTable) imported
2>PtexTriangleKernel.obj : warning LNK4049: locally defined symbol ?
h2fTable@PtexHalf@@2PAIA (public: static unsigned int *
PtexHalf::h2fTable) imported
2>PtexWriter.obj : warning LNK4217: locally defined symbol ?
open@PtexTexture@@SAPAV1@PBDAAVString@Ptex@@_N@Z (public: static class
PtexTexture * __cdecl PtexTexture::open(char const *,class
Ptex::String &,bool)) imported in function "public: static class
PtexWriter * __cdecl PtexWriter::edit(char const *,bool,enum
Ptex::MeshType,enum Ptex::DataType,int,int,int,class Ptex::String
&,bool)" (?
edit@PtexWriter@@SAPAV1@PBD_NW4MeshType@Ptex@@W4DataType@3@HHHAAVString@3@1@Z)
2>PtexWriter.obj : warning LNK4217: locally defined symbol ??
1String@Ptex@@QAE@XZ (public: __thiscall Ptex::String::~String(void))
imported in function "public: virtual void __thiscall
PtexWriterBase::release(void)" (?release@PtexWriterBase@@UAEXXZ)
2>PtexReader.obj : error LNK2019: unresolved external symbol
_inflateInit_ referenced in function "public: __thiscall
PtexReader::PtexReader(void * *,class PtexCacheImpl *,bool,class
PtexInputHandler *)" (??
0PtexReader@@QAE@PAPAXPAVPtexCacheImpl@@_NPAVPtexInputHandler@@@Z)
2>PtexReader.obj : error LNK2019: unresolved external symbol
_inflateEnd referenced in function "protected: virtual __thiscall
PtexReader::~PtexReader(void)" (??1PtexReader@@MAE@XZ)
2>PtexReader.obj : error LNK2019: unresolved external symbol
_inflateReset referenced in function "protected: bool __thiscall
PtexReader::readZipBlock(void *,int,int)" (?
readZipBlock@PtexReader@@IAE_NPAXHH@Z)
2>PtexReader.obj : error LNK2019: unresolved external symbol _inflate
referenced in function "protected: bool __thiscall
PtexReader::readZipBlock(void *,int,int)" (?
readZipBlock@PtexReader@@IAE_NPAXHH@Z)
2>PtexWriter.obj : error LNK2019: unresolved external symbol
_deflateInit_ referenced in function "protected: __thiscall
PtexWriterBase::PtexWriterBase(char const *,enum Ptex::MeshType,enum
Ptex::DataType,int,int,int,bool)" (??
0PtexWriterBase@@IAE@PBDW4MeshType@Ptex@@W4DataType@2@HHH_N@Z)
2>PtexWriter.obj : error LNK2019: unresolved external symbol
_deflateEnd referenced in function "protected: virtual __thiscall
PtexWriterBase::~PtexWriterBase(void)" (??1PtexWriterBase@@MAE@XZ)
2>PtexWriter.obj : error LNK2019: unresolved external symbol
_deflateReset referenced in function "protected: int __thiscall
PtexWriterBase::writeZipBlock(struct _iobuf *,void const
*,int,bool)" (?writeZipBlock@PtexWriterBase@@IAEHPAU_iobuf@@PBXH_N@Z)
2>PtexWriter.obj : error LNK2019: unresolved external symbol _deflate
referenced in function "protected: int __thiscall
PtexWriterBase::writeZipBlock(struct _iobuf *,void const
*,int,bool)" (?writeZipBlock@PtexWriterBase@@IAEHPAU_iobuf@@PBXH_N@Z)
2>F:\KIT\MA\wdas-ptex-fd75b1b\src\Debug\Ptex.dll : fatal error
LNK1120: 8 unresolved externals
halftest.obj : error LNK2001: unresolved external symbol "public:
static unsigned int * PtexHalf::h2fTable" (?h2fTable@PtexHalf@@2PAIA)
halftest.obj : error LNK2001: unresolved external symbol "public:
static unsigned short * PtexHalf::f2hTable" (?
f2hTable@PtexHalf@@2PAGA)
I hope someone can help me, i am pretty excited about starting with
Ptex.
Thanks in advance,
Elberion