Hi,

Does the SimpleExample compile+run?

check your build-settings, it looks like that the standard-libs and
-headers are not included. Compare them with the settings of the target
SimpleExample.

cheers,
Stephan

Am 22.02.11 10:48, schrieb Tang Yu:
> Hi, everyone,
> 
> i tried to add osg libraries to my iphone project. I compiled the libraries 
> from git's iphone example. But, after i added them to my project 
> (libOpenThreads.a, libosg.a, libosgDB.a, blah blah...), i can not compile my 
> project sucessfully.
> i just made a declaration in the header, so please watch my code:
> 
> CameraAVController.h: 
> 
> Code:
> 
> #include "osgPlugins.h"
> #include <osgDB/ReadFile>
> #include <osg/MatrixTransform>
> #include <osgViewer/Viewer>
> 
> #import <UIKit/UIKit.h>
> #import <AVFoundation/AVFoundation.h>
> #import <CoreGraphics/CoreGraphics.h>
> #import <CoreVideo/CoreVideo.h>
> #import <CoreMedia/CoreMedia.h>
> 
> @interface CameraAVController : UIViewController  
> <AVCaptureVideoDataOutputSampleBufferDelegate>  {
>       ... ...
>       osg::ref_ptr<osgViewer::Viewer> _viewer;
> }
> ......
> 
> @end
> 
> 
> 
> 
> 
> CameraAVController.mm:
> 
> Code:
> 
> #import "CameraAVController.h"
> 
> #include <osgGA/TrackballManipulator>
> #include <osgGA/MultiTouchTrackballManipulator>
> #include <osg/ShapeDrawable>
> #include <osg/DisplaySettings>
> 
> 
>  
> 
> These are some of the thousands of error informations below:
> 
> Code:
> 
> In file included from include/osg/StateSet:17,
>                  from include/osg/State:18,
>                  from include/osg/GraphicsContext:17,
>                  from include/osgViewer/GraphicsWindow:17,
>                  from 
> /Volumes/Development/TANGYu/ARMobile/MyWork/MARDemo/Classes/osgPlugins.h:3,
>                  from 
> /Volumes/Development/TANGYu/ARMobile/MyWork/MARDemo/Classes/CameraAVController.h:9,
>                  from 
> /Volumes/Development/TANGYu/ARMobile/MyWork/MARDemo/Classes/MARDemoViewController.mm:10:
> include/osg/Object:166: error: field '_name' has incomplete type
> include/osg/Object: In member function 'virtual void 
> osg::Object::setName(const std::string&)':
> include/osg/Object:99: error: '_name' was not declared in this scope
> include/osg/Object: In member function 'void osg::Object::setName(const 
> char*)':
> include/osg/Object:104: error: invalid use of incomplete type 'struct 
> std::string'
> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/stringfwd.h:56:
>  error: declaration of 'struct std::string'
> include/osg/Object:105: error: invalid use of incomplete type 'struct 
> std::string'
> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/stringfwd.h:56:
>  error: declaration of 'struct std::string'
> include/osg/Object: In member function 'const std::string& 
> osg::Object::getName() const':
> include/osg/Object:109: error: '_name' was not declared in this scope
> In file included from include/osg/buffered_value:17,
>                  from include/osg/Shader:27,
>                  from include/osg/StateAttribute:20,
>                  from include/osg/StateSet:18,
>                  from include/osg/State:18,
>                  from include/osg/GraphicsContext:17,
>                  from include/osgViewer/GraphicsWindow:17,
>                  from 
> /Volumes/Development/TANGYu/ARMobile/MyWork/MARDemo/Classes/osgPlugins.h:3,
>                  from 
> /Volumes/Development/TANGYu/ARMobile/MyWork/MARDemo/Classes/CameraAVController.h:9,
>                  from 
> /Volumes/Development/TANGYu/ARMobile/MyWork/MARDemo/Classes/MARDemoViewController.mm:10:
> include/osg/DisplaySettings: At global scope:
> include/osg/DisplaySettings:320: error: field '_application' has incomplete 
> type
> include/osg/DisplaySettings:328: error: field '_glContextVersion' has 
> incomplete type
> include/osg/DisplaySettings: In member function 'void 
> osg::DisplaySettings::setApplication(const std::string&)':
> include/osg/DisplaySettings:199: error: '_application' was not declared in 
> this scope
> include/osg/DisplaySettings: In member function 'const std::string& 
> osg::DisplaySettings::getApplication()':
> include/osg/DisplaySettings:200: error: '_application' was not declared in 
> this scope
> include/osg/DisplaySettings: In member function 'void 
> osg::DisplaySettings::setGLContextVersion(const std::string&)':
> include/osg/DisplaySettings:264: error: '_glContextVersion' was not declared 
> in this scope
> include/osg/DisplaySettings: In member function 'const std::string 
> osg::DisplaySettings::getGLContextVersion() const':
> include/osg/DisplaySettings:267: error: return type 'const struct 
> std::string' is incomplete
> include/osg/DisplaySettings:267: error: '_glContextVersion' was not declared 
> in this scope
> 
> 
> 
> 
> how can i fix these errors? 
> thanks for any help,thank you.
> 
> Best Regard!
> 
> Cheers,
> Tang
> 
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=36928#36928
> 
> 
> 
> 
> 
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to