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 

Android with Openscenegraph3.2


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General [forum]
View previous topic :: View next topic  
Author Message
Crisium (Peter Wraae Marino)
User


Joined: 30 Dec 2008
Posts: 49

PostPosted: Tue Jul 23, 2013 1:52 pm    Post subject:
Android with Openscenegraph3.2
Reply with quote

Hi,

when compiling for android with oopenscenegraph 3.2 i get this error:

C:/Android/OpenSceneGraph-3.2/src/osgPlugins/osc/ip/win32/NetworkingUtils.cpp:32:77: fatal error: winsock2.h: No such file or directory


where do I remove or fix this?

Thank you!

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


Joined: 18 Mar 2009
Posts: 10908

PostPosted: Tue Jul 23, 2013 2:05 pm    Post subject:
Android with Openscenegraph3.2
Reply with quote

Hi Peter.

On 23 July 2013 14:52, Peter Wraae Marino < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
when compiling for android with oopenscenegraph 3.2 i get this error:

C:/Android/OpenSceneGraph-3.2/src/osgPlugins/osc/ip/win32/NetworkingUtils.cpp:32:77: fatal error: winsock2.h: No such file or directory


where do I remove or fix this?


Are posix API's available under Android?  If so we should be able to change the osc/CMakeLists.txt to select the non Win32 part.  The part of the osc/CMakeLists.txt of interest is:

if(WIN32)
    SET(TARGET_SRC
        ${TARGET_SRC}
        ip/win32/NetworkingUtils.cpp
        ip/win32/UdpSocket.cpp
    )
    SET(TARGET_EXTERNAL_LIBRARIES "${TARGET_EXTERNAL_LIBRARIES};Ws2_32.lib;winmm")
ELSE()
    SET(TARGET_SRC
        ${TARGET_SRC}
        ip/posix/NetworkingUtils.cpp
        ip/posix/UdpSocket.cpp
    )
ENDIF()

replacing the IF(WIN32) with:

IF(WIN32 AND NOT ANDROID)

Might be sufficient, could you try this?  If this works I'll check this change into OSG-3.2 branch and svn/trunk.  A quick turnaround on this will allow me to roll this in the next release candidate that I'll be making this afternoon.

Cheers,
Robert.

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Crisium (Peter Wraae Marino)
User


Joined: 30 Dec 2008
Posts: 49

PostPosted: Tue Jul 23, 2013 2:48 pm    Post subject:
Re: Android with Openscenegraph3.2
Reply with quote

Hi Robert,

I'm at home now and will first be at work tomorrow to test it.. sorry.

regards,
Peter

robertosfield wrote:
Hi Peter.

On 23 July 2013 14:52, Peter Wraae Marino < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
when compiling for android with oopenscenegraph 3.2 i get this error:

C:/Android/OpenSceneGraph-3.2/src/osgPlugins/osc/ip/win32/NetworkingUtils.cpp:32:77: fatal error: winsock2.h: No such file or directory


where do I remove or fix this?


Are posix API's available under Android?  If so we should be able to change the osc/CMakeLists.txt to select the non Win32 part.  The part of the osc/CMakeLists.txt of interest is:

if(WIN32)
    SET(TARGET_SRC
        ${TARGET_SRC}
        ip/win32/NetworkingUtils.cpp
        ip/win32/UdpSocket.cpp
    )
    SET(TARGET_EXTERNAL_LIBRARIES "${TARGET_EXTERNAL_LIBRARIES};Ws2_32.lib;winmm")
ELSE()
    SET(TARGET_SRC
        ${TARGET_SRC}
        ip/posix/NetworkingUtils.cpp
        ip/posix/UdpSocket.cpp
    )
ENDIF()

replacing the IF(WIN32) with:

IF(WIN32 AND NOT ANDROID)

Might be sufficient, could you try this?  If this works I'll check this change into OSG-3.2 branch and svn/trunk.  A quick turnaround on this will allow me to roll this in the next release candidate that I'll be making this afternoon.

Cheers,
Robert.

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10908

PostPosted: Tue Jul 23, 2013 3:14 pm    Post subject:
Android with Openscenegraph3.2
Reply with quote

Hi Peter,

On 23 July 2013 15:48, Peter Wraae Marino < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
I'm at home now and will first be at work tomorrow to test it.. sorry.


Do you know if Android supports the Posix API that the non Win32 path uses?  If so I can checkin the NOT ANDROID and cross my fingers that it'll work.

Robert.

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10908

PostPosted: Tue Jul 23, 2013 3:23 pm    Post subject:
Android with Openscenegraph3.2
Reply with quote

On 23 July 2013 16:21, Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Do you know if Android supports the Posix API that the non Win32 path uses?  If so I can checkin the NOT ANDROID and cross my fingers that it'll work.


Rather than wait I've looked up the various #include<> that the osc non Win32 path uses and these headers all seem to appear in various Android sources so I'm hopefully it'll work.  I've check in the AND NOT ANDROID to svn/trunk and the OSG-3.2 branch.

Could you test out the OSG-3.2 branch and let me know how you get on.

Cheers,
Robert.

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Crisium (Peter Wraae Marino)
User


Joined: 30 Dec 2008
Posts: 49

PostPosted: Wed Jul 24, 2013 6:24 am    Post subject:
Re: Android with Openscenegraph3.2
Reply with quote

Hi Robert,

I just updated openscenegraph3.2 and everything compiles fine for th android:

========== Build: 1 succeeded, 0 failed, 2 up-to-date, 2 skipped ==========

now on to the ndk and adt part.

thanks for the fix,
Peter



robertosfield wrote:
On 23 July 2013 16:21, Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Do you know if Android supports the Posix API that the non Win32 path uses?  If so I can checkin the NOT ANDROID and cross my fingers that it'll work.


Rather than wait I've looked up the various #include<> that the osc non Win32 path uses and these headers all seem to appear in various Android sources so I'm hopefully it'll work.  I've check in the AND NOT ANDROID to svn/trunk and the OSG-3.2 branch.

Could you test out the OSG-3.2 branch and let me know how you get on.

Cheers,
Robert.

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Crisium (Peter Wraae Marino)
User


Joined: 30 Dec 2008
Posts: 49

PostPosted: Wed Jul 24, 2013 6:46 am    Post subject:
Reply with quote

Hi,

a little unsure if I should now create a new topic?

ADT: When creating a new android project with existing files and using the
osgAndroidExampleGLES2 the first thing that appears in the ADT is:

[2013-07-24 08:40:27 - Unable to launch cygpath. Is Cygwin on the path?] java.io.IOException: Cannot run program "cygpath": CreateProcess error=2, The system cannot find the file specified
[2013-07-24 08:41:36 - osgViewer] Unable to resolve target 'android-8'

the strange part is that I do not have cygwin on my computer and as I understand it... it isn't necessary to get an Android project working.... or am I wrong?

Thank you!

Cheers,
Peter
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 [forum] 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 plugin couldn't load an osgb or i... first_gle General 2 Sat May 27, 2017 3:52 am View latest post
No new posts A problem with regard to std:istream ... first_gle General 2 Fri May 26, 2017 6:11 am View latest post
No new posts Building OSG for Android -- Windowing... bwhaines Build system [build] 4 Sun Apr 23, 2017 2:01 am View latest post
No new posts OSG + Qt on Android Treazy General [3rdparty] 3 Fri Mar 31, 2017 10:44 pm View latest post
No new posts Free Android game based on OSG & ... kornerr Announcement [ANN] 1 Fri Feb 03, 2017 1:56 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