Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mingw compile error #181

Open
JanSchmidt3 opened this issue Jun 1, 2023 · 0 comments
Open

Mingw compile error #181

JanSchmidt3 opened this issue Jun 1, 2023 · 0 comments

Comments

@JanSchmidt3
Copy link

make bin/simple_publisher bin/simple_subscriber bin/reconnect_subscriber bin/bio_publisher bin/openssl_publisher
gcc -Wextra -Wall -std=gnu99 -Iinclude -Wno-unused-parameter -Wno-unused-variable -Wno-duplicate-decl-specifier examples/simple_publisher.c src/mqtt.c src/mqtt_pal.c -lpthread -lws2_32 -o bin/simple_publisher
In file included from include/mqtt.h:43:0,
                 from examples/simple_publisher.c:11:
include/mqtt_pal.h:128:21: error: conflicting types for 'ssize_t'
In file included from c:\home\projekte\svn\rdussmaster\tools\mingw-gcc\bin\../lib/gcc/mingw32/4.7.2/../../../../include/io.h:20:0,
                 from c:\home\projekte\svn\rdussmaster\tools\mingw-gcc\bin\../lib/gcc/mingw32/4.7.2/../../../../include/unistd.h:12,
                 from examples/simple_publisher.c:6:
c:\home\projekte\svn\rdussmaster\tools\mingw-gcc\bin\../lib/gcc/mingw32/4.7.2/../../../../include/sys/types.h:118:18: note: previous declaration of 'ssize_t' was here
In file included from examples/simple_publisher.c:12:0:
examples/templates/posix_sockets.h: In function 'open_nb_socket':
examples/templates/posix_sockets.h:32:5: warning: implicit declaration of function 'getaddrinfo' [-Wimplicit-function-declaration]
examples/templates/posix_sockets.h:54:5: warning: implicit declaration of function 'freeaddrinfo' [-Wimplicit-function-declaration]
examples/templates/posix_sockets.h:60:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
examples/templates/posix_sockets.h:62:9: warning: passing argument 3 of 'ioctlsocket' from incompatible pointer type [enabled by default]
In file included from include/mqtt_pal.h:123:0,
                 from include/mqtt.h:43,
                 from examples/simple_publisher.c:11:
c:\home\projekte\svn\rdussmaster\tools\mingw-gcc\bin\../lib/gcc/mingw32/4.7.2/../../../../include/winsock2.h:540:32: note: expected 'u_long *' but argument is of type 'int *'
examples/simple_publisher.c: In function 'main':
examples/simple_publisher.c:130:5: warning: implicit declaration of function 'sleep' [-Wimplicit-function-declaration]
examples/simple_publisher.c: At top level:
cc1.exe: warning: unrecognized command line option "-Wno-duplicate-decl-specifier" [enabled by default]
make: *** [bin/simple_publisher] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant