I get the error unknown type name 'uint32_t' and included stdint.h. uint8_t doesn’t produce an error, neither does uint16_t.
I’m using MinGW and the following make-lines:
# Build for Windows under MinGW
#MINGWDBG= -DDEBUG -O0
MINGWDBG= -DNDEBUG -Os
#MINGWOPT= -W -Wall -mthreads -Wl,--subsystem,console $(MINGWDBG) -DHAVE_STDINT
MINGWOPT= -W -Wall -mthreads -Wl,--subsystem,windows $(MINGWDBG)
mingw:
windres win32\res.rc win32\res.o
gcc $(MINGWOPT) mongoose.c -lws2_32 \
-shared -Wl,--out-implib=$(PROG).lib -o $(PROG).dll
gcc $(MINGWOPT) mongoose.c main.c win32\res.o -lws2_32 -ladvapi32 \
-o $(PROG).exe
Code:
uint32_t function(void) {
return VALUE;
}
And the includes:
#include <stdio.h>
#include <string.h>
#include "mongoose.h"
#include "main.h"
#include <stdint.h>
To answer my own question, changing the order of the includes seemed to do the trick.