cygwin编译错误在sys / _types.h [英] cygwin compile error in sys/_types.h
问题描述
我想在cyt文件中使用cywin在win32机器上创建一些linux代码。 p>
c:\cygwin\usr\include\sys_types.h(15):错误C2144:语法错误:'__int64'应该以';'
和
c:\cygwin\usr\include\sys_types .h(15):error C2501:' extension ':missing storage-class or type specifiers
代码行<
__ extension__ typedef long long _off64_t;
显然,我缺少这里的东西,但我从来没有使用过cygwin,这是杀了我。
我想要能够至少在我的win32机器上编译我的CPP文件有几个原因。
(这只是数百个前两个错误)
谢谢,
tim
编辑:
我选择的答案是简单的解决方法 - 虽然我明白,作为完整或需要使用gcc编译...
这是一个快速和脏的编译,所以我可以使用我熟悉的工具,然后尝试与linux机器集成。 (哦,跨平台开发的快乐)
我已经投票了这些答案到目前为止,并欣赏的帮助)
我认为扩展宏可能未定义。你可能想在你的cygwin头文件dir进行文本搜索,看看是否是这种情况。如果是,请确保标头搜索路径已正确定义等。
I am trying to use cywin to get some linux code building on a win32 machine.
I get the following VS.net 2003 error in ym compiler:
"c:\cygwin\usr\include\sys_types.h(15): error C2144: syntax error : '__int64' should be preceded by ';' "
and
c:\cygwin\usr\include\sys_types.h(15): error C2501: 'extension' : missing storage-class or type specifiers
The code line is
__extension__ typedef long long _off64_t;
Obviously I am missing something here but I have never used cygwin before and this is killing me.
I want to be able to at least compile my CPP files on my win32 machine for a few reasons.
(this is just the first two errors of hundreds it looks like)
thanks, tim
EDIT:
the simple workaround I have chosen as the answer - though I do understand that is not as complete or as desirable as using gcc to compile... This is a quick and dirty compilation so that I can use my familiar tools before trying to integrate with linux machines. (oh the joys of cross-platform development)
I've voted up each of those answers so far and appreciate the help)
I think that the extension macro may not be defined. You may want to do a text search on your cygwin header dir to see if this is the case. If so, make sure that you header search path is defined correctly, etc.
这篇关于cygwin编译错误在sys / _types.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!