skyeye1.22REL在MINGW上编译没法通过
gcc -g -O2 -g -O2 -D_FILE_OFFSET_BITS=64 -DSTANDALONE -DDEFAULT_INLINE=0 -DMODET -mthreads -mms-bitfields -DMODET -I arch/arm -I arch/arm/common -I arch/arm/common/mmu -I arch/arm/mach -I arch/bfin/common -I arch/bfin/mach -I arch/coldfire/common -I device -I device/net -I device/lcd -I device/flash -I device/uart -I utils -I utils/share -I utils/main -I utils/config -I utils/debugger-DARM-I. -DWIN32_LCD -c device/uart/skyeye_uart.c -o binary/skyeye_uart.oIn file included from device/uart/skyeye_uart.c:28:
utils/portable/gettimeofday.h:39: error: redefinition of `struct timezone'
utils/portable/gettimeofday.h:43: error: conflicting types for 'gettimeofday'
d:/MinGW-develop/bin/../lib/gcc/mingw32/3.4.2/../../../../include/sys/time.h:40: error: previous declaration of 'gettimeofday' was here
utils/portable/gettimeofday.h:43: error: conflicting types for 'gettimeofday'
d:/MinGW-develop/bin/../lib/gcc/mingw32/3.4.2/../../../../include/sys/time.h:40: error: previous declaration of 'gettimeofday' was here
d:\MinGW-develop\bin\make.exe: *** Error 1
是不是需要提供一个补丁解决一下? 你是不是用最新版的 MinGW,我的 MinGW 中的 time.h 没有 gettimeofday.
修改 utils/portable/gettimeofday.h 如下:
/*
gettimeofday.h - portable gettimeofday function for skyeye
Copyright (C) 2007 Skyeye Develop Group
for help please send mail to <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111-1307USA
*/
/*
* 03/03/2007 initial version by Anthony Lee
*/
#ifndef __SKYEYE_GETTIMEOFDAY_H__
#define __SKYEYE_GETTIMEOFDAY_H__
#include <sys/time.h> /* for struct timeval */
#define HAVE_GETTIMEOFDAY
#if defined(__MINGW32__)
#include <_mingw.h>
#if (__MINGW32_MAJOR_VERSION < 3)
#undef HAVE_GETTIMEOFDAY
#elif (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION < 10)
#undef HAVE_GETTIMEOFDAY
#endif
#endif /* defined(__MINGW32__) */
#ifndef HAVE_GETTIMEOFDAY
#if defined(__MINGW32__)
/* we just use timeval, timezone is ignored. */
struct timezone {
};
#endif /* defined(__MINGW32__) */
int gettimeofday(struct timeval *tv, struct timezone *tz);
#endif /* HAVE_GETTIMEOFDAY */
#endif /* __SKYEYE_GETTIMEOFDAY_H__ */
页:
[1]