Mariano Martinez Peck wrote:
> Vicents: Thanks a lot. I have been searching and it obviously seems an
> error with sockets.
>
> If you see in config.log, you can see thees things:
>
> c:/MySQL/include/mysql_com.h:183: error: syntax error before "SOCKET"
> c:/MySQL/include/mysql_com.h:183: warning: no semicolon at end of struct
> or union
> c:/MySQL/include/mysql_com.h:222: error: syntax error before '}' token
>
>
>
> configure:26052: checking for select
> configure:26108: gcc -std=gnu99 -o conftest.exe -g -O2
> -Ic:/MySQL/include -Lc:/MySQL/lib/opt conftest.c >&5
> C:/DOCUME~1/JuanjoE/CONFIG~1/Temp/ccgXlikM.o: In function `main':
> c:/mariano/opendbx-1.3.10/conftest.c:75: undefined reference to `select'
>
>
> configure:25820: checking sys/socket.h usability
> configure:25837: gcc -std=gnu99 -c -g -O2 -Ic:/MySQL/include conftest.c >&5
> conftest.c:68:24: sys/socket.h: No such file or directory
>
>
> | #include <sys/socket.h>
> configure:25857: result: no
> configure:25861: checking sys/socket.h presence
> configure:25876: gcc -std=gnu99 -E -Ic:/MySQL/include conftest.c
> conftest.c:35:24: sys/socket.h: No such file or directory
>
>
> | #include <sys/socket.h>
> configure:25896: result: no
> configure:25929: checking for sys/socket.h
> configure:25937: result: no
>
> configure:25988: gcc -std=gnu99 -c -g -O2 -Ic:/MySQL/include conftest.c >&5
> conftest.c: In function `main':
> conftest.c:79: error: syntax error before "fd_set"
>
>
> and lots more.
>
> Now, the question is, how openDBX code should be done so that to be able
> to be compiled with gcc under linux and MinGW under windows?
>
> I have been these links:
>
> -
http://www.mingw.org/MinGWiki/index.php/sockets
> -
http://bytes.com/forum/thread745513.html
> Here it does something like this:
>
> #ifdef MINGW32
> #include <winsock2.h>
>
>
> int main() {
> #ifdef MINGW32
> WSADATA wsadata;
>
>
> And the last question, just to understand not to criticize. Why this do
> compiles under cygwin but doesn't under MinGW?
>
> very thanks,
>
> Mariano
>