Jump to content
  • Advertisement
Sign in to follow this  
feicen

OpenMesh library conflicts with MFC?

This topic is 1873 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm making a small program using MFC and OpenMesh library. But when I compile it, there are always some compile or link error. ------------------------------------------------------ #include "stdafx.h" #include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh> .... typedef OpenMesh::TriMesh_ArrayKernelT<MyTraits> MyTriMesh; MyTriMesh gMesh; ----------------------------------------------------- 1>f:\.....\openmesh\core\geometry\vectort_inc.hh(413) : warning C4003: not enough actual parameters for macro 'max' 1>f:\.....\openmesh\core\geometry\vectort_inc.hh(421) : warning C4003: not enough actual parameters for macro 'min' 1>f:\.....\openmesh\core\geometry\vectort_inc.hh(452) : warning C4003: not enough actual parameters for macro 'min' 1>f:\.....\openmesh\core\geometry\vectort_inc.hh(457) : warning C4003: not enough actual parameters for macro 'max' 1>f:\.....\openmesh\core\geometry\vectort_inc.hh(413) : error C2059: syntax error : '<L_TYPE_raw>' 1> f:\.....\openmesh\core\geometry\vectort_inc.hh(499) : see reference to class template instantiation 'OpenMesh::VectorT<Scalar,N>' being compiled 1>f:\.....\openmesh\core\geometry\vectort_inc.hh(413) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body 1>f:\.....\openmesh\core\geometry\vectort_inc.hh(418) : error C2143: syntax error : missing ')' before '}' 1>f:\.....\openmesh\core\geometry\vectort_inc.hh(418) : error C2143: syntax error : missing '}' before ')' 1>f:\.....\openmesh\core\geometry\vectort_inc.hh(418) : error C2059: syntax error : ')' 1>f:\.....\openmesh\core\geometry\vectort_inc.hh(418) : error C2143: syntax error : missing ';' before '}' If #include "stdafx.h" is deleted or moved to the end of the file, it will be ok. Maybe it is due to conflict between MFC and OpenMesh(std). How can I avoid such problem. [Edited by - feicen on January 14, 2008 9:48:43 AM]

Share this post


Link to post
Share on other sites
Advertisement
After insert the NOMINMAX string in the "Preprocessor definitions", some warnings and link errors emerge.

umanscanapp\openmesh\core\io\sr_binary_spec.hh(153) : warning C4267: 'argument' : conversion from 'size_t' to 'std::streamsize', possible loss of data
2>........\openmesh\core\io\sr_binary_spec.hh(153) : warning C4267: 'argument' : conversion from 'size_t' to 'std::streamsize', possible loss of data
2>........\openmesh\core\io\sr_binary_spec.hh(153) : warning C4267: 'argument' : conversion from 'size_t' to 'std::streamsize', possible loss of data
2>........\openmesh\core\mesh\arraykernel.hh(256) : warning C4267: 'return' : conversion from 'size_t' to 'uint', possible loss of data
2>........\openmesh\core\mesh\polyconnectivity.hh(166) : warning C4267: 'argument' : conversion from 'size_t' to 'uint', possible loss of data
2>........\openmesh\core\mesh\triconnectivity.hh(62) : warning C4267: 'argument' : conversion from 'size_t' to 'uint', possible loss of data
3>Creating library...
2>e:\program files\microsoft visual studio 8\vc\include\numeric(43) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
.......

2>ShellBase.obj : error LNK2019: unresolved external symbol "char * __cdecl parse_string(char * const,enum VariableType,void *)" (?parse_string@@YAPADQADW4VariableType@@PAX@Z) referenced in function "public: virtual bool __thiscall ShellBase::LoadFeaturePointsFromFile(class ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > const &)" (?LoadFeaturePointsFromFile@ShellBase@@UAE_NABV?$CStringT@_WV?$StrTraitMFC_DLL@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z)
2>ShellBase.obj : error LNK2019: unresolved external symbol "int __cdecl read_nonempty_line(struct _iobuf * *,char * const)" (?read_nonempty_line@@YAHPAPAU_iobuf@@QAD@Z) referenced in function "public: virtual bool __thiscall ShellBase::LoadFeaturePointsFromFile(class ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > const &)" (?LoadFeaturePointsFromFile@ShellBase@@UAE_NABV?$CStringT@_WV?$StrTraitMFC_DLL@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z)
2>ShellBase.obj : error LNK2019: unresolved external symbol "class OpenMesh::IO::_OFFReader_ & __cdecl OpenMesh::IO::OFFReader(void)" (?OFFReader@IO@OpenMesh@@YAAAV_OFFReader_@12@XZ) referenced in function "void __cdecl OpenMesh::IO::`dynamic initializer for 'OFFReaderInstance''(void)" (??__EOFFReaderInstance@IO@OpenMesh@@YAXXZ)
2>ShellBase.obj : error LNK2019: unresolved external symbol "class OpenMesh::IO::_OBJReader_ & __cdecl OpenMesh::IO::OBJReader(void)" (?OBJReader@IO@OpenMesh@@YAAAV_OBJReader_@12@XZ) referenced in function "void __cdecl OpenMesh::IO::`dynamic initializer for 'OBJReaderInstance''(void)" (??__EOBJReaderInstance@IO@OpenMesh@@YAXXZ)
2>ShellBase.obj : error LNK2019: unresolved external symbol "class OpenMesh::IO::_STLReader_ & __cdecl OpenMesh::IO::STLReader(void)" (?STLReader@IO@OpenMesh@@YAAAV_STLReader_@12@XZ) referenced in function "void __cdecl OpenMesh::IO::`dynamic initializer for 'STLReaderInstance''(void)" (??__ESTLReaderInstance@IO@OpenMesh@@YAXXZ)
1>BaseReader.cc
2>ShellBase.obj : error LNK2019: unresolved external symbol "class OpenMesh::IO::_OMReader_ & __cdecl OpenMesh::IO::OMReader(void)" (?OMReader@IO@OpenMesh@@YAAAV_OMReader_@12@XZ) referenced in function "void __cdecl OpenMesh::IO::`dynamic initializer for 'OMReaderInstance''(void)" (??__EOMReaderInstance@IO@OpenMesh@@YAXXZ)
2>ShellBase.obj : error LNK2019: unresolved external symbol "class OpenMesh::IO::_OBJWriter_ & __cdecl OpenMesh::IO::OBJWriter(void)" (?OBJWriter@IO@OpenMesh@@YAAAV_OBJWriter_@12@XZ) referenced in function "void __cdecl OpenMesh::IO::`dynamic initializer for 'OBJWriterInstance''(void)" (??__EOBJWriterInstance@IO@OpenMesh@@YAXXZ)
2>ShellBase.obj : error LNK2019: unresolved external symbol "class OpenMesh::IO::_OFFWriter_ & __cdecl OpenMesh::IO::OFFWriter(void)" (?OFFWriter@IO@OpenMesh@@YAAAV_OFFWriter_@12@XZ) referenced in function "void __cdecl OpenMesh::IO::`dynamic initializer for 'OFFWriterInstance''(void)" (??__EOFFWriterInstance@IO@OpenMesh@@YAXXZ)
2>ShellBase.obj : error LNK2019: unresolved external symbol "class OpenMesh::IO::_STLWriter_ & __cdecl OpenMesh::IO::STLWriter(void)" (?STLWriter@IO@OpenMesh@@YAAAV_STLWriter_@12@XZ) referenced in function "void __cdecl OpenMesh::IO::`dynamic initializer for 'STLWriterInstance''(void)" (??__ESTLWriterInstance@IO@OpenMesh@@YAXXZ)
2>ShellBase.obj : error LNK2019: unresolved external symbol "class OpenMesh::IO::_OMWriter_ & __cdecl OpenMesh::IO::OMWriter(void)" (?OMWriter@IO@OpenMesh@@YAAAV_OMWriter_@12@XZ) referenced in function "void __cdecl OpenMesh::IO::`dynamic initializer for 'OMWriterInstance''(void)" (??__EOMWriterInstance@IO@OpenMesh@@YAXXZ)
2>ShellBase.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall OpenMesh::ArrayKernel::~ArrayKernel(void)" (??1ArrayKernel@OpenMesh@@UAE@XZ) referenced in function "public: virtual __thiscall OpenMesh::PolyConnectivity::~PolyConnectivity(void)" (??1PolyConnectivity@OpenMesh@@UAE@XZ)
2>ShellBase.obj : error LNK2019: unresolved external symbol "public: __thiscall OpenMesh::ArrayKernel::ArrayKernel(void)" (??0ArrayKernel@OpenMesh@@QAE@XZ) referenced in function "public: __thiscall OpenMesh::PolyConnectivity::PolyConnectivity(void)" (??0PolyConnectivity@OpenMesh@@QAE@XZ)
2>ShellBase.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OpenMesh::BaseProperty::stats(class std::basic_ostream<char,struct std::char_traits<char> > &)const " (?stats@BaseProperty@OpenMesh@@UBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
2>ShellBase.obj : error LNK2019: unresolved external symbol "class OpenMesh::mostream & __cdecl omerr(void)" (?omerr@@YAAAVmostream@OpenMesh@@XZ) referenced in function "protected: void __thiscall OpenMesh::BaseProperty::check_and_set_persistent<class OpenMesh::Attributes::StatusInfo>(bool)" (??$check_and_set_persistent@VStatusInfo@Attributes@OpenMesh@@@BaseProperty@OpenMesh@@IAEX_N@Z)

Share this post


Link to post
Share on other sites

This topic is 1873 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!