フォルダ内にたくさんのCファイルとヘッダーファイルがあります。MinGWコンパイラでCファイルをコンパイルすると、そのようなファイルやディレクトリがないことがわかります。しかし、私はすべてのファイルを同じフォルダーに持っています。それらをコンパイルするにはどうすればよいですか?
参照用のコード(ファイルcomputil.c
)を添付しました:
#include <stdio.h>
#include <computil.h>
#include <dataio.h>
int getc_skip_marker_segment(const unsigned short marker, unsigned char **cbufptr, unsigned char *ebufptr)
{
int ret;
unsigned short length;
ret = getc_ushort(&length, cbufptr, ebufptr);
if(ret)return(ret);
length -= 2;
if(((*cbufptr)+length) >= ebufptr)
{
fprintf(stderr, "ERROR : getc_skip_marker_segment : ");
fprintf(stderr, "unexpected end of buffer when parsing ");
fprintf(stderr, "marker %d segment of length %d\n", marker, length);
return(-2); }(*cbufptr) += length; return(0);
}
}
でコンパイルしていgcc -c computil.c
ます。