OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

porting issue


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
sajis997
User


Joined: 28 Nov 2010
Posts: 87

PostPosted: Sun Dec 09, 2012 2:52 pm    Post subject:
porting issue
Reply with quote

Hi forum,

I have developed some tiny applications with some old release. Now i am trying to port them to the new version 3.0 .


And i am getting the following compile error that left me without much clue to proceed. Probably you might be able be give some useful hint.

Code:

sajjad@sajjad-G74Sx:~/Documents/realtimerendering/terrainShader$ make
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I/usr/local/include/osg -I/usr/local/include/osgAnimation -I/usr/local/include/osgDB -I/usr/local/include/osgGA -I/usr/local/include/osgManipulator -I/usr/local/include/osgViewer -I/usr/local/include/osgUtil -I. -o main.o main.cpp
In file included from /usr/local/include/osgDB/Output:20:0,
                 from /usr/local/include/osgDB/DotOsgWrapper:21,
                 from /usr/local/include/osgDB/Registry:26,
                 from Scene.h:1,
                 from main.cpp:2:
/usr/local/include/osgDB/fstream:32:1: error: invalid use of incomplete type ‘std::fstream {aka struct std::basic_fstream<char>}’
/usr/include/c++/4.6/iosfwd:119:11: error: declaration of ‘std::fstream {aka struct std::basic_fstream<char>}’
/usr/local/include/osgDB/fstream:44:1: error: invalid use of incomplete type ‘std::ifstream {aka struct std::basic_ifstream<char>}’
/usr/include/c++/4.6/iosfwd:113:11: error: declaration of ‘std::ifstream {aka struct std::basic_ifstream<char>}’
/usr/local/include/osgDB/fstream:56:1: error: invalid use of incomplete type ‘std::ofstream {aka struct std::basic_ofstream<char>}’
/usr/include/c++/4.6/iosfwd:116:11: error: declaration of ‘std::ofstream {aka struct std::basic_ofstream<char>}’
make: *** [main.o] Error 1




Thank you!

Cheers,
Sajjadul
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12206

PostPosted: Mon Dec 17, 2012 12:21 pm    Post subject:
porting issue
Reply with quote

Hi Sajjadul,

Modern versions of the OSG have the headers cleaned up so less stuff gets included from 3rd party headers so there is less over inclusion of headers - i.e. we try to aim to only include what is actually required for that header.  This can sometimes mean that application code that relied upon extra headers being implicitly included now don't compile so you have to include the headers explicitly.

The other thing to be careful when mixing various 3rd party libs is that sometime some introduce namespace pollution or re-define macros that can cause problems for other libs.  We strive to avoid this with the OSG, but not all libs are helpful in this direction, making it awkward to mix them with other codes, in these cases one has to be careful about include order or isolating the problem headers.

Robert.

On 9 December 2012 14:52, Sajjadul Islam < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi forum,

I have developed some tiny applications with some old release. Now i am trying to port them to the new version 3.0 .


And i am getting the following compile error that left me without much clue to proceed. Probably you might be able be give some useful hint.


Code:

sajjad@sajjad-G74Sx:~/Documents/realtimerendering/terrainShader$ make
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I/usr/local/include/osg -I/usr/local/include/osgAnimation -I/usr/local/include/osgDB -I/usr/local/include/osgGA -I/usr/local/include/osgManipulator -I/usr/local/include/osgViewer -I/usr/local/include/osgUtil -I. -o main.o main.cpp
In file included from /usr/local/include/osgDB/Output:20:0,
                 from /usr/local/include/osgDB/DotOsgWrapper:21,
                 from /usr/local/include/osgDB/Registry:26,
                 from Scene.h:1,
                 from main.cpp:2:
/usr/local/include/osgDB/fstream:32:1: error: invalid use of incomplete type ‘std::fstream {aka struct std::basic_fstream<char>}’
/usr/include/c++/4.6/iosfwd:119:11: error: declaration of ‘std::fstream {aka struct std::basic_fstream<char>}’
/usr/local/include/osgDB/fstream:44:1: error: invalid use of incomplete type ‘std::ifstream {aka struct std::basic_ifstream<char>}’
/usr/include/c++/4.6/iosfwd:113:11: error: declaration of ‘std::ifstream {aka struct std::basic_ifstream<char>}’
/usr/local/include/osgDB/fstream:56:1: error: invalid use of incomplete type ‘std::ofstream {aka struct std::basic_ofstream<char>}’
/usr/include/c++/4.6/iosfwd:116:11: error: declaration of ‘std::ofstream {aka struct std::basic_ofstream<char>}’
make: *** [main.o] Error 1






Thank you!

Cheers,
Sajjadul

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=51484#51484





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts osg-users Digest, Vol 138, Issue 27 Zachary1234 General 0 Tue Jan 01, 2019 1:16 am View latest post
No new posts DrawCallback serialization issue jumaroch General 1 Tue Nov 27, 2018 2:26 pm View latest post
No new posts DrawCallback serialization issue jumaroch General 0 Tue Nov 27, 2018 1:44 pm View latest post
No new posts DrawCallback serialization issue jumaroch General 0 Tue Nov 27, 2018 1:43 pm View latest post
No new posts DrawCallback serialization issue jumaroch General 0 Tue Nov 27, 2018 1:12 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP