[osg-users] 答复: ??: A simple question from an learner.
Dear Mike, Thanks for you help. Follow you then it worked. Thanks again. Bingli _ 发件人: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 代表 Mike Wittman 发送时间: 2007年8月3日 22:17 收件人: osg-users@lists.openscenegraph.org 主题: Re: [osg-users] ??: A simple question from an learner. Hi Bingli, I suspect you've got "pure" CLR support (/clr:pure) selected in your project configuration, which tells the compiler you're only using managed code. You need to have standard CLR support (/clr) selected to compile against the native code of OSG. The setting is in the General section of your project's Configuration Properties. -Mike _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ijustfu Sent: Thursday, August 02, 2007 8:57 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] ??: A simple question from an learner. Dear Mike, Thanks for you help. There are so many warnings and errors. Following are some statements: 1>-- Build started: Project: VGEForPRDAirPollution, Configuration: Debug Win32 -- 1>Compiling... 1>VGEForPRDAirPollution.cpp 1>C:\OpenSceneGraph2.0\OpenSceneGraph\include\OpenThreads/Mutex(40) : warning C4272: 'OpenThreads::Mutex::Mutex' : is marked __declspec(dllimport); must specify native calling convention when importing a function. OpenThreads::Mutex::`vftable'' : per-appdomain symbol should not be marked with __declspec(dllimport) 1>C:\OpenSceneGraph2.0\OpenSceneGraph\include\osg/Referenced(64) : warning C4272: 'osg::Referenced::ref' : is marked .. 1>VGEForPRDAirPollution.obj : error LNK2028: unresolved token (0A0C) "public: void __clrcall osg::Referenced::ref(void)const " ([EMAIL PROTECTED]@osg@@$$FQBMXXZ) referenced in function "public: __clrcall osg::ref_ptr::ref_ptr(class osg::ref_ptr const &)" ([EMAIL PROTECTED]@osg@@@osg@@[EMAIL PROTECTED]@@Z) 1>VGEForPRDAirPollution.obj : error LNK2028: unresolved token (0A0D) "public: void __clrcall osg::Referenced::unref(void)const " ([EMAIL PROTECTED]@osg@@$$FQBMXXZ) referenced in function "public: __clrcall osg::ref_ptr::~ref_ptr(void)" ([EMAIL PROTECTED]@osg@@@osg@@[EMAIL PROTECTED]) 1>VGEForPRDAirPollution.obj : error LNK2028: unresolved token (0A11) "public: __clrcall osg::CopyOp::CopyOp(unsigned int)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@Z) referenced in function "public: __clrcall osg::RefMatrixd::RefMatrixd(class osg::RefMatrixd const &)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@@Z) 1>VGEForPRDAirPollution.obj : error LNK2028: unresolved token (0A12) "public: virtual __clrcall osg::CopyOp::~CopyOp(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) referenced in function "public: __clrcall osg::RefMatrixd::RefMatrixd(class osg::RefMatrixd const &)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@@Z) 1>VGEForPRDAirPollution.obj : error LNK2028: unresolved token (0A13) "public: __clrcall osg::Object::Object(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) referenced in function "public: __clrcall osg::StateAttribute::Callback::Callback(void)" ([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]) 1>VGEForPRDAirPollution.obj : error LNK2028: unresolved token (0A14) "public: __clrcall osg::Object::Object(bool)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@Z) referenced in function "public: __clrcall osg::RefMatrixd::RefMatrixd(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) .. 1>Build log was saved at "file://d:\VGEForPRDAirPollution\TestNet\VGEForPRDAirPollution\VGEForPRDAirP ollution\Debug\BuildLog.htm" 1>VGEForPRDAirPollution - 1227 error(s), 4507 warning(s) == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped == Thanks and regards Bingli The Institute of Space and Earth Information Science, The Chinese university of Hong Kong, Shatin, N.T., Hong Kong, P.R.China -邮件原件- 发件人: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 代表 Mike Wittman 发送时间: 2007年8月2日 22:23 收件人: osg-users@lists.openscenegraph.org 主题: Re: [osg-users] A simple question from an learner. OSG can definitely be used with WinForms. It sounds like you're running into some project configuration issue though. If you can post your error messages we might be able to provide better help. -Mike > -Original Message- > From: [EMAIL PROTECTED] [mailto:osg-users- > [EMAIL PROTECTED] On Behalf Of ijustfu > Sent: Thursday, August 02, 2007 4:25 AM > To: osg-users@lists.openscenegraph.org > Subject: [osg-users] A simple question from an learner. > > Dear Robert. > I build a simple OSG program with visual studio2005.net. I use c++ > language , and select "window forms application", then get the following > codes: > > #include "stdafx.h" > #include "Form1.h" > > #include > #include > > using namespace VGEForPRDAirPollution; > > [STAThreadAttribute] > int main(array ^args) > { > // Enabling Windows XP visual effects before any controls are > created > Application::EnableVisualStyles(); > Applicatio
[osg-users] 答复: A simple question from an learner.
Dear Mike, Thanks for you help. There are so many warnings and errors. Following are some statements: 1>-- Build started: Project: VGEForPRDAirPollution, Configuration: Debug Win32 -- 1>Compiling... 1>VGEForPRDAirPollution.cpp 1>C:\OpenSceneGraph2.0\OpenSceneGraph\include\OpenThreads/Mutex(40) : warning C4272: 'OpenThreads::Mutex::Mutex' : is marked __declspec(dllimport); must specify native calling convention when importing a function. OpenThreads::Mutex::`vftable'' : per-appdomain symbol should not be marked with __declspec(dllimport) 1>C:\OpenSceneGraph2.0\OpenSceneGraph\include\osg/Referenced(64) : warning C4272: 'osg::Referenced::ref' : is marked .. 1>VGEForPRDAirPollution.obj : error LNK2028: unresolved token (0A0C) "public: void __clrcall osg::Referenced::ref(void)const " ([EMAIL PROTECTED]@osg@@$$FQBMXXZ) referenced in function "public: __clrcall osg::ref_ptr::ref_ptr(class osg::ref_ptr const &)" ([EMAIL PROTECTED]@osg@@@osg@@[EMAIL PROTECTED]@@Z) 1>VGEForPRDAirPollution.obj : error LNK2028: unresolved token (0A0D) "public: void __clrcall osg::Referenced::unref(void)const " ([EMAIL PROTECTED]@osg@@$$FQBMXXZ) referenced in function "public: __clrcall osg::ref_ptr::~ref_ptr(void)" ([EMAIL PROTECTED]@osg@@@osg@@[EMAIL PROTECTED]) 1>VGEForPRDAirPollution.obj : error LNK2028: unresolved token (0A11) "public: __clrcall osg::CopyOp::CopyOp(unsigned int)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@Z) referenced in function "public: __clrcall osg::RefMatrixd::RefMatrixd(class osg::RefMatrixd const &)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@@Z) 1>VGEForPRDAirPollution.obj : error LNK2028: unresolved token (0A12) "public: virtual __clrcall osg::CopyOp::~CopyOp(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) referenced in function "public: __clrcall osg::RefMatrixd::RefMatrixd(class osg::RefMatrixd const &)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@@Z) 1>VGEForPRDAirPollution.obj : error LNK2028: unresolved token (0A13) "public: __clrcall osg::Object::Object(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) referenced in function "public: __clrcall osg::StateAttribute::Callback::Callback(void)" ([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]) 1>VGEForPRDAirPollution.obj : error LNK2028: unresolved token (0A14) "public: __clrcall osg::Object::Object(bool)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@Z) referenced in function "public: __clrcall osg::RefMatrixd::RefMatrixd(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) .. 1>Build log was saved at "file://d:\VGEForPRDAirPollution\TestNet\VGEForPRDAirPollution\VGEForPRDAirP ollution\Debug\BuildLog.htm" 1>VGEForPRDAirPollution - 1227 error(s), 4507 warning(s) == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped == Thanks and regards Bingli The Institute of Space and Earth Information Science, The Chinese university of Hong Kong, Shatin, N.T., Hong Kong, P.R.China -邮件原件- 发件人: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 代表 Mike Wittman 发送时间: 2007年8月2日 22:23 收件人: osg-users@lists.openscenegraph.org 主题: Re: [osg-users] A simple question from an learner. OSG can definitely be used with WinForms. It sounds like you're running into some project configuration issue though. If you can post your error messages we might be able to provide better help. -Mike > -Original Message- > From: [EMAIL PROTECTED] [mailto:osg-users- > [EMAIL PROTECTED] On Behalf Of ijustfu > Sent: Thursday, August 02, 2007 4:25 AM > To: osg-users@lists.openscenegraph.org > Subject: [osg-users] A simple question from an learner. > > Dear Robert. > I build a simple OSG program with visual studio2005.net. I use c++ > language , and select "window forms application", then get the following > codes: > > #include "stdafx.h" > #include "Form1.h" > > #include > #include > > using namespace VGEForPRDAirPollution; > > [STAThreadAttribute] > int main(array ^args) > { > // Enabling Windows XP visual effects before any controls are > created > Application::EnableVisualStyles(); > Application::SetCompatibleTextRenderingDefault(false); > // Create the main window and run it > Application::Run(gcnew Form1()); > > osgViewer::Viewer viewer; > viewer.setSceneData(osgDB::readNodeFile("cow.osg")); > return viewer.run(); > } > > After adding osgViewerd.lib and osgDBd.lib into project, compile it but > fund > so many warnings and errors. > > Above codes can be run under 'win32 console application'(c++). > > Does above means OSG can not be used under "window forms application"? If > yes, is there any setting of solution environment? > > Thanks. > Bingli > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-user