Jump to content

[SOLVED] Unigine 2.2 linker errors with UnigineObjects.h


photo

Recommended Posts

Posted

I just got started on working with Unigine 2.2 and when I try to Include UnigineEditor.h I get some linker errors.

Error	5	error LNK2001: unresolved external symbol "public: virtual int __cdecl Unigine::ObjectExternBase::getSequence(struct Unigine::Math::vec3 const &,int)" (?getSequence@ObjectExternBase@Unigine@@UEAAHAEBUvec3@Math@2@H@Z)
Error	4	error LNK2001: unresolved external symbol "public: virtual int __cdecl Unigine::ObjectExternBase::getOrder(struct Unigine::Math::vec3 const &,int)" (?getOrder@ObjectExternBase@Unigine@@UEAAHAEBUvec3@Math@2@H@Z)
Error	7	error LNK2001: unresolved external symbol "public: virtual float __cdecl Unigine::ObjectExternBase::getTransparentDistance(struct Unigine::Math::vec3 const &,int)" (?getTransparentDistance@ObjectExternBase@Unigine@@UEAAMAEBUvec3@Math@2@H@Z)
Error	6	error LNK2001: unresolved external symbol "public: virtual float __cdecl Unigine::ObjectExternBase::getOpacityDistance(struct Unigine::Math::vec3 const &,int)" (?getOpacityDistance@ObjectExternBase@Unigine@@UEAAMAEBUvec3@Math@2@H@Z)
Error	11	error LNK2001: unresolved external symbol "public: virtual class Unigine::BoundSphere const & __cdecl Unigine::WorldExternBase::getWorldBoundSphere(void)" (?getWorldBoundSphere@WorldExternBase@Unigine@@UEAAAEBVBoundSphere@2@XZ)
Error	9	error LNK2001: unresolved external symbol "public: virtual class Unigine::BoundSphere const & __cdecl Unigine::ObjectExternBase::getWorldBoundSphere(void)" (?getWorldBoundSphere@ObjectExternBase@Unigine@@UEAAAEBVBoundSphere@2@XZ)
Error	10	error LNK2001: unresolved external symbol "public: virtual class Unigine::BoundBox const & __cdecl Unigine::WorldExternBase::getWorldBoundBox(void)" (?getWorldBoundBox@WorldExternBase@Unigine@@UEAAAEBVBoundBox@2@XZ)
Error	8	error LNK2001: unresolved external symbol "public: virtual class Unigine::BoundBox const & __cdecl Unigine::ObjectExternBase::getWorldBoundBox(void)" (?getWorldBoundBox@ObjectExternBase@Unigine@@UEAAAEBVBoundBox@2@XZ)


I tried including it in my main application cpp file and it caused the same errors. I think my project should be set up and linking correctly, I have tried other headers that give me no issues, a few others give me the same set of errors. including UnigineObjects.h, where most of the errors are coming from, also give me the same errors. I'm guessing any of the files which include UnigineObjects would give me the same linker errors.

 

In visual studio i tried to go to definition of getTransparentDistance and visual studio came up with 6 matches non of which were in UnigineObjects.cpp. I am building the source and using the dll i build, and linking against the lib file which is getting created. 

 

I also went to the ObjectExtern C++ API sample  and just trying to run that gives me linker errors as well I get the same linker errors excluding the two WorldExternBase ones.  

 

Any help would be appreciated.

Posted

Hi,

 

It seems your project is set up to link with the double-precision version of Unigine libraries, but UNIGINE_DOUBLE define is missing.

 

We reproduced the problem with the ObjectExtern sample: yes, there is link errors when trying to build single-precision configuration.

That will be fixed.

Posted

Thank you!

 

I had a feeling there was some small step I was missing!

 

This fixed it.

×
×
  • Create New...