我遇到了错误
我正在使用MinGW以及以下make-lines:
unknown type name 'uint32_t'
,我已经包含了stdint.h
头文件。但是uint8_t
和uint16_t
却没有报错。我正在使用MinGW以及以下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
代码:
uint32_t function(void) {
return VALUE;
}
同时还包括:
#include <stdio.h>
#include <string.h>
#include "mongoose.h"
#include "main.h"
#include <stdint.h>