Hi,

On 8/2/07, ijustfu <[EMAIL PROTECTED]> wrote:
>
> 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 <osgViewer/Viewer>
> #include <osgDB/ReadFile>
>
> using namespace VGEForPRDAirPollution;
>
> [STAThreadAttribute]
> int main(array<System::String ^> ^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?
>
>
I may say something wrong, but I think that using forms in C++ requires that
you are into .NET managed code. So calling native code is not so easy, try
to google on mixing managed and unmanaged code in C++.

-- 
Serge Lages
http://www.magrathea-engine.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to