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 

Building with MinGW on Windows 10


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Build system [build]
View previous topic :: View next topic  
Author Message
Skaldi
Newbie


Joined: 21 Dec 2017
Posts: 5

PostPosted: Sat May 18, 2019 3:47 pm    Post subject:
Building with MinGW on Windows 10
Reply with quote

Hi, it is me again Smile

I did not work with OSG for a while, but today I decided to continue on my project and downloaded the lates OSG 3.6.3. The configuration of the make files worked very well, but then when I write mingw32-make following error occurs at 15%.

Sadly my experience with such things is very limited. I hope somebody can help me here.

[ 14%] Building CXX object src/osgDB/CMakeFiles/osgDB.dir/FileUtils.cpp.obj
D:\Projects\C++\Libraries\OpenScenegraph\OpenSceneGraph-OpenSceneGraph-3.6.3\src\osgDB\FileUtils.cpp: In function 'bool osgDB::makeDirectory(const string&)':
D:\Projects\C++\Libraries\OpenScenegraph\OpenSceneGraph-OpenSceneGraph-3.6.3\src\osgDB\FileUtils.cpp:161:19: error: aggregate 'osgDB::makeDirectory(const string&)::stat64 stbuf' has incomplete type and cannot be defined
struct stat64 stbuf;
^~~~~
D:\Projects\C++\Libraries\OpenScenegraph\OpenSceneGraph-OpenSceneGraph-3.6.3\src\osgDB\FileUtils.cpp:165:38: error: invalid use of incomplete type 'struct osgDB::makeDirectory(const string&)::stat64'
if( stat64( path.c_str(), &stbuf ) == 0 )
^
D:\Projects\C++\Libraries\OpenScenegraph\OpenSceneGraph-OpenSceneGraph-3.6.3\src\osgDB\FileUtils.cpp:161:12: note: forward declaration of 'struct osgDB::makeDirectory(const string&)::stat64'
struct stat64 stbuf;
^~~~~~
D:\Projects\C++\Libraries\OpenScenegraph\OpenSceneGraph-OpenSceneGraph-3.6.3\src\osgDB\FileUtils.cpp:186:41: error: invalid use of incomplete type 'struct osgDB::makeDirectory(const string&)::stat64'
if( stat64( dir.c_str(), &stbuf ) < 0 )
^
D:\Projects\C++\Libraries\OpenScenegraph\OpenSceneGraph-OpenSceneGraph-3.6.3\src\osgDB\FileUtils.cpp:161:12: note: forward declaration of 'struct osgDB::makeDirectory(const string&)::stat64'
struct stat64 stbuf;
^~~~~~
D:\Projects\C++\Libraries\OpenScenegraph\OpenSceneGraph-OpenSceneGraph-3.6.3\src\osgDB\FileUtils.cpp: In function 'osgDB::FileType osgDB::fileType(const string&)':
D:\Projects\C++\Libraries\OpenScenegraph\OpenSceneGraph-OpenSceneGraph-3.6.3\src\osgDB\FileUtils.cpp:311:19: error: aggregate 'osgDB::fileType(const string&)::stat64 fileStat' has incomplete type and cannot be defined
struct stat64 fileStat;
^~~~~~~~
D:\Projects\C++\Libraries\OpenScenegraph\OpenSceneGraph-OpenSceneGraph-3.6.3\src\osgDB\FileUtils.cpp:315:44: error: invalid use of incomplete type 'struct osgDB::fileType(const string&)::stat64'
if ( stat64(filename.c_str(), &fileStat) != 0 )
^
D:\Projects\C++\Libraries\OpenScenegraph\OpenSceneGraph-OpenSceneGraph-3.6.3\src\osgDB\FileUtils.cpp:311:12: note: forward declaration of 'struct osgDB::fileType(const string&)::stat64'
struct stat64 fileStat;
^~~~~~
mingw32-make[3]: *** [src\osgDB\CMakeFiles\osgDB.dir\build.make:343: src/osgDB/CMakeFiles/osgDB.dir/FileUtils.cpp.obj] Error 1
mingw32-make[2]: *** [CMakeFiles\Makefile2:330: src/osgDB/CMakeFiles/osgDB.dir/all] Error 2
mingw32-make[1]: *** [Makefile:129: all] Error 2

...


Thank you!

Cheers,
Stefan
Back to top
View user's profile Send private message
Alberto Luaces
Guest





PostPosted: Mon May 20, 2019 7:56 am    Post subject:
Building with MinGW on Windows 10
Reply with quote

"Stefan Waldegger" writes:

Quote:
I did not work with OSG for a while, but today I decided to continue
on my project and downloaded the lates OSG 3.6.3. The configuration of
the make files worked very well, but then when I write mingw32-make
following error occurs at 15%.

git's HEAD is working for me when cross-compiling with mingw (gcc 7.3.0)
Maybe it is worth a try to get OSG's latest version to check if that
problem has been solved since then; from a cursory look, it seems that
the file that you are having problems might be a little different now.

--
Alberto



------------------
Post generated by Mail2Forum
Back to top
Skaldi
Newbie


Joined: 21 Dec 2017
Posts: 5

PostPosted: Wed May 22, 2019 10:36 am    Post subject:
Reply with quote

Hi Alberto,

Thank you for your reply, I tried it to get the latest verion from github, "OpenSceneGraph-master" it is called when I download it.

But sadly, there is the same error, in the same file.

osgDB::makeDirectory(const string&)::stat64. Can it be that the MinGW in Windows is outdated and doesnt know some conversions like this?

MinGW I downloaded this installer from gitbhub and this took a while but installed the MinGW in C:\MinGW

...


Thank you!

Cheers,
Stefan
Back to top
View user's profile Send private message
Voerman, L.
Guest





PostPosted: Wed May 22, 2019 11:19 am    Post subject:
Building with MinGW on Windows 10
Reply with quote

You probably need to remove the exlusion of mingw32 on line 39 ofD:ProjectsC++LibrariesOpenScenegraphOpenSceneGraph-OpenSceneGraph-3.6.3srcosgDBFileUtils.cpp 
to get stat64 defined as _stati64 on windows.
Try to remove the #if and the #endif line (38 & 40) and see if that compiles.
Laurens. 

#if !defined(__MINGW32__)
    #define stat64 _stati64
#endif




On Wed, May 22, 2019 at 12:36 PM Stefan Waldegger < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
Hi Alberto,

Thank you for your reply, I tried it to get the latest verion from github, OpenSceneGraph-master it is called when I download it.

But sadly, there is the same error, in the same file.

osgDB::makeDirectory(const string&)::stat64. Can it be that the MinGW in Windows is outdated and doesnt know some conversions like this?

MinGW I downloaded this installer from gitbhub and this took a while but installed the MinGW in C:MinGW

...


Thank you!

Cheers,
Stefan

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





_______________________________________________
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
Skaldi
Newbie


Joined: 21 Dec 2017
Posts: 5

PostPosted: Thu May 23, 2019 5:14 pm    Post subject:
Reply with quote

Hi Voerman,

this was the solution. It is just compiling just fine!

Thank you so much!

...


Thank you!

Cheers,
Stefan
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Build system [build] 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 Building OSG 3.6.4 in Win64 TDM GNU. Zachary1234 Build system [build] 24 Sat Jul 27, 2019 3:02 am View latest post
No new posts Building with Visual Studio 2019 icf80 Build system [build] 0 Fri May 10, 2019 11:20 am View latest post
No new posts Building with Visual Studio 2019 icf80 Build system [build] 2 Fri May 10, 2019 11:19 am View latest post
No new posts Question about method of building osgQt trexmsuee Build system [build] 1 Thu Apr 11, 2019 2:22 pm View latest post
No new posts Building on macOS 10.14 Ulrich Hertlein General 9 Sun Nov 11, 2018 12:45 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