![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
View Poll Results: Would you play OpenSSN on Windows? | |||
Yes, please make OpenSSN available on Windows |
![]() ![]() ![]() ![]() |
14 | 93.33% |
No, I already have subsims I like on Windows |
![]() ![]() ![]() ![]() |
1 | 6.67% |
I don't use Windows |
![]() ![]() ![]() ![]() |
0 | 0% |
Voters: 15. You may not vote on this poll |
![]() |
|
Thread Tools | Display Modes |
|
![]() |
#1 |
Captain
![]() Join Date: Aug 2011
Location: Nuclear submarine under the North Pole
Posts: 481
Downloads: 1
Uploads: 0
|
![]()
If you're using only SDL for the graphics it should be a pretty straightforward port...
|
![]() |
![]() |
![]() |
#2 |
Sailor man
![]() Join Date: May 2011
Posts: 45
Downloads: 0
Uploads: 0
|
![]()
The SDL library is the only external dependency. So, yes, porting should be fairly straight forward. However, I don't have a Windows box to compile/test with, which gets in the way.
|
![]() |
![]() |
![]() |
#3 |
Captain
![]() Join Date: Aug 2011
Location: Nuclear submarine under the North Pole
Posts: 481
Downloads: 1
Uploads: 0
|
![]()
Hmm... I took a look through main.cpp and didn't see anything that would cause trouble under windows. I'll run it through visual studio and see what breaks.
|
![]() |
![]() |
![]() |
#4 |
Sailor man
![]() Join Date: May 2011
Posts: 45
Downloads: 0
Uploads: 0
|
![]()
Most of the code should be fine, I've done my best to keep it to standards. The only place where I think there may be trouble is in files.cpp
The files.cpp module tries to find OpenSSN's data files and checks a couple of different places, including the current working directory. Since files are organized differently on Windows than Linux/BSD this function might bomb. I think it will still compile, but it might not return the correct location. Everything else is pretty vanilla. |
![]() |
![]() |
![]() |
#5 |
Captain
![]() Join Date: Aug 2011
Location: Nuclear submarine under the North Pole
Posts: 481
Downloads: 1
Uploads: 0
|
![]()
Which version of SDL are you using? The latest doesnt have the SDL subdirectory tree nor does it have SDL_image.h
|
![]() |
![]() |
![]() |
#6 |
Captain
![]() Join Date: Aug 2011
Location: Nuclear submarine under the North Pole
Posts: 481
Downloads: 1
Uploads: 0
|
![]()
Nevermind... I didn't know it was a second library.
|
![]() |
![]() |
![]() |
#7 |
Captain
![]() Join Date: Aug 2011
Location: Nuclear submarine under the North Pole
Posts: 481
Downloads: 1
Uploads: 0
|
![]()
OK thus far the biggest problems in getting openSSN to compile under MSVC are its use of non-standard C functions.
The biggest offenders are strcasestr and snprintf. They're not in the C89 standard (which MSVC uses). I'm working around them at the moment with macros. The other offender is "unistd.h" which is a unix-only header file. I've gotten around this with #ifndef WIN32..#endif preventing the compiler from attempting to include the header. MSVC supports the types defined in it natively. |
![]() |
![]() |
![]() |
#8 |
Bosun
![]() Join Date: Jan 2009
Posts: 68
Downloads: 28
Uploads: 0
|
![]()
I would definately be interested in seeing OpenSSN ported over to WindowsXP, Vista or 7. I use XP myself and the last version of OpenSSN I have works great. I have version 0.7. I just installed copies of MinGW C++ and Microsoft Visual Studio 8 for another project I'm working on. I'm trying to teach myself C++ and Visual Basic so I can port an older Visual Basic 5.5 program and finish it!
![]() ChristopherT |
![]() |
![]() |
![]() |
#9 | |
Captain
![]() Join Date: Aug 2011
Location: Nuclear submarine under the North Pole
Posts: 481
Downloads: 1
Uploads: 0
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#10 |
Bosun
![]() Join Date: Jan 2009
Posts: 68
Downloads: 28
Uploads: 0
|
![]()
Where do I install the SDL libraries if I'm going to try to use MinGW C++ to try to compile the source code for version 1.1 of OpenSSN?
![]() ![]() Thanks! ChristopherT |
![]() |
![]() |
![]() |
#11 | |
Captain
![]() Join Date: Aug 2011
Location: Nuclear submarine under the North Pole
Posts: 481
Downloads: 1
Uploads: 0
|
![]() Quote:
It'd probably be a better idea to take the source and try to compile it under visual studio. |
|
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|