Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Apple » Apple II Emulation » Can't build GSport with MinGW
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Can't build GSport with MinGW [message #310585] Sat, 30 January 2016 23:21 Go to next message
Brandon Taylor is currently offline  Brandon Taylor
Messages: 144
Registered: April 2012
Karma: 0
Senior Member
I'm trying to build GSport with MinGW, but I'm getting all of this mess when it gets to scc_socket_driver.c:

cc -O2 -DGSPORT_LITTLE_ENDIAN -DHAVE_TFE -DWIN_SOUND -DHAVE_SDL2 -DTOGGLE_STATUS -DWIN32 -D_WIN32 -D__USE_W32_SOCKETS -D_WINSOCK2API_ -std=gnu99 -DHAVE_ATBRIDGE -I/usr/include/freetype2 -I/usr/include/SDL2 -Wall -fomit-frame-pointer -march=i686 -c -I. -o scc_socket_driver.o scc_socket_driver.c
In file included from scc.h:25:0,
from scc_socket_driver.c:25:
scc_socket_driver.c:38:12: error: conflicting types for 'WSAGetLastError'
extern int h_errno;
^
c:\mingw\include\winsock2.h:594:32: note: previous declaration of 'WSAGetLastError' was here
WINSOCK_API_LINKAGE int PASCAL WSAGetLastError(void);
^
scc_socket_driver.c: In function 'scc_socket_open_outgoing':
scc_socket_driver.c:226:2: warning: pointer targets in passing argument 1 of 'strchr' differ in signedness [-Wpointer-sign]
char *comma_ptr = strchr(&scc_ptr->modem_cmd_str[0], ',');
^
In file included from defc.h:87:0,
from scc_socket_driver.c:24:
c:\mingw\include\string.h:42:39: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP char* __cdecl __MINGW_NOTHROW strchr (const char*, int) __MINGW_ATTRIB_PURE;
^
scc_socket_driver.c: In function 'scc_accept_socket':
scc_socket_driver.c:398:8: error: 'socklen_t' undeclared (first use in this function)
(socklen_t*)&(scc_ptr->host_aux1));
^
scc_socket_driver.c:398:8: note: each undeclared identifier is reported only once for each function it appears in
scc_socket_driver.c:398:18: error: expected expression before ')' token
(socklen_t*)&(scc_ptr->host_aux1));
^
scc_socket_driver.c:385:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
int ret;
^
scc_socket_driver.c:382:6: warning: variable 'flags' set but not used [-Wunused-but-set-variable]
int flags;
^
make: *** [scc_socket_driver.o] Error 1

To me, this indicates that I may be missing something in MinGW whereas it will compile just fine in Visual Studio. What do I need to do here?
Can't build GSport with MinGW [message #310595 is a reply to message #310585] Sun, 31 January 2016 03:13 Go to previous messageGo to next message
wsxyz is currently offline  wsxyz
Messages: 157
Registered: February 2013
Karma: 0
Senior Member
May I first ask why you are trying to build it in Mingw when you can already build it in visual studio?
Re: Can't build GSport with MinGW [message #310659 is a reply to message #310595] Sun, 31 January 2016 16:49 Go to previous messageGo to next message
mmphosis is currently offline  mmphosis
Messages: 163
Registered: November 2012
Karma: 0
Senior Member
wssimms wrote:
> May I first ask why you are trying to build it in Mingw when you can
> already build it in visual studio?

I don't already have visual studio installed. Let's attempt to do that...

https://www.visualstudio.com/downloads/download-visual-studi o-vs

Then click "Download Community Free"

Run this...

C:\Users\myusername\Downloads\vs_community_ENU.exe

Wait...

maybe Agree to the License Terms and Privacy Statement

https://www.visualstudio.com/en-us/support/legal/mt171547
https://www.visualstudio.com/en-us/dn948229

hmmm, this is going to install a bunch of stuff, and I am not exactly sure
what is being installed, or what I would install as a "minimum."

Nope. https://twitter.com/a2fan/status/687762750936756225

----

MinGW is a minimalist development environment for native Microsoft Windows
applications.
Re: Can't build GSport with MinGW [message #310706 is a reply to message #310659] Sun, 31 January 2016 20:56 Go to previous messageGo to next message
wsxyz is currently offline  wsxyz
Messages: 157
Registered: February 2013
Karma: 0
Senior Member
Am Montag, 1. Februar 2016 06:51:56 UTC+9 schrieb mmphosis:
> wssimms wrote:
>> May I first ask why you are trying to build it in Mingw when you can
>> already build it in visual studio?
>
> I don't already have visual studio installed. Let's attempt to do that...
>
> https://www.visualstudio.com/downloads/download-visual-studi o-vs
>
> Then click "Download Community Free"
>
> Run this...
>
> C:\Users\myusername\Downloads\vs_community_ENU.exe
>
> Wait...
>
> maybe Agree to the License Terms and Privacy Statement
>
> https://www.visualstudio.com/en-us/support/legal/mt171547
> https://www.visualstudio.com/en-us/dn948229
>
> hmmm, this is going to install a bunch of stuff, and I am not exactly sure
> what is being installed, or what I would install as a "minimum."
>
> Nope. https://twitter.com/a2fan/status/687762750936756225
>
> ----
>
> MinGW is a minimalist development environment for native Microsoft Windows
> applications.

Yeah, I get that, but Brandon has already compiled the software with
Visual Studio, so he can now use it.

If it's not just about personal use, then typing make, and pasting the
resulting warning/error messages here and saying "what now?" isn't
really a good strategy.

I'm an experienced programmer and, although I could probably
figure out how to compile it, given enough time, most of it looks like
name conflicts that I have pretty much no idea how to solve at the
moment, since I don't know much about Win32 programming, headers,
etc.

I'll hazard the guess that Brandon also doesn't know much about that
stuff. On the assumption that's true, my suggestion is that he attempt
to learn about it, instead of copy-pasting here.

Many people here helped him when it was all about getting a working
executable. Now that he's got that, he needs to be willing put more
of his own effort into it.
Re: Can't build GSport with MinGW [message #310719 is a reply to message #310706] Sun, 31 January 2016 23:02 Go to previous messageGo to next message
Brandon Taylor is currently offline  Brandon Taylor
Messages: 144
Registered: April 2012
Karma: 0
Senior Member
On Sunday, January 31, 2016 at 7:56:05 PM UTC-6, wss...@gmail.com wrote:
> Am Montag, 1. Februar 2016 06:51:56 UTC+9 schrieb mmphosis:
>> wssimms wrote:
>>> May I first ask why you are trying to build it in Mingw when you can
>>> already build it in visual studio?
>>
>> I don't already have visual studio installed. Let's attempt to do that....
>>
>> https://www.visualstudio.com/downloads/download-visual-studi o-vs
>>
>> Then click "Download Community Free"
>>
>> Run this...
>>
>> C:\Users\myusername\Downloads\vs_community_ENU.exe
>>
>> Wait...
>>
>> maybe Agree to the License Terms and Privacy Statement
>>
>> https://www.visualstudio.com/en-us/support/legal/mt171547
>> https://www.visualstudio.com/en-us/dn948229
>>
>> hmmm, this is going to install a bunch of stuff, and I am not exactly sure
>> what is being installed, or what I would install as a "minimum."
>>
>> Nope. https://twitter.com/a2fan/status/687762750936756225
>>
>> ----
>>
>> MinGW is a minimalist development environment for native Microsoft Windows
>> applications.
>
> Yeah, I get that, but Brandon has already compiled the software with
> Visual Studio, so he can now use it.
>
> If it's not just about personal use, then typing make, and pasting the
> resulting warning/error messages here and saying "what now?" isn't
> really a good strategy.
>
> I'm an experienced programmer and, although I could probably
> figure out how to compile it, given enough time, most of it looks like
> name conflicts that I have pretty much no idea how to solve at the
> moment, since I don't know much about Win32 programming, headers,
> etc.
>
> I'll hazard the guess that Brandon also doesn't know much about that
> stuff. On the assumption that's true, my suggestion is that he attempt
> to learn about it, instead of copy-pasting here.
>
> Many people here helped him when it was all about getting a working
> executable. Now that he's got that, he needs to be willing put more
> of his own effort into it.

I'm afraid we're getting a little off track here. Yes, it's true I've made the executable in the past using Visual Studio, but Visual Studio, as is typical of many Microsoft products, is terribly bloated. Let's get back to the true focus of my topic. I know I need make, perl and gcc to generate an executable using MinGW, plus libsdl2-devel and libfreetype-devel to add printer support. But I'm clearly missing something when I try to compile it with MinGW versus when I try to compile it with Cygwin.
Re: Can't build GSport with MinGW [message #353774 is a reply to message #310585] Tue, 03 October 2017 07:47 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: sdiohf38f3

Same problem, anybody solved it yet? Trying to build kegs32 though.
Re: Can't build GSport with MinGW [message #353818 is a reply to message #310585] Wed, 04 October 2017 10:02 Go to previous message
Anonymous
Karma:
Originally posted by: sdiohf38f3

Figured it out. Replace this:

extern int h_errno;

with this:

#ifndef _WIN32
extern int h_errno;
#endif

It was a linux thing. If you're on windows, you don't need it.

Other compilers fixed it, but used different methods

GSport and GSplus used this:

#if !(defined _MSC_VER || defined __CYGWIN__)

ActiveGS used this:

#ifndef _MSC_VER //OG

kegs-sdl-0.64 just used sdl for everything, it doesn't screw with os interfaces directly.

Neither of those emulators actually work for me yet.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Go back in time with the Octalyzer Apple IIe emulator!
Next Topic: Emulator instruction heuristics
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Mar 19 04:57:33 EDT 2024

Total time taken to generate the page: 0.01582 seconds