English 中文(简体)
在海合会和海卫会汇编方面的差异
原标题:Difference in compiling in GCC and LLVM GCC Compiler

我正在开发一套应用程序,正在使用3个项目。 一个项目结合了C和C++的编码,一个是目标C,一个是将该项目(目标-C和C++项目)联系起来。

现在,当我正在海合会汇编我的C和C++项目时,它完全汇编了文件,但当我与LV-GCC汇编者共同汇编同一项目时,它不会一成不变。

#define MY_WSD const

struct FuncDef {
  i8 nArg;             
  u8 iPrefEnc;         
  u8 needCollSeq;      
  u8 flags;            
  void *pUserData;     
  FuncDef *pNext;      
  char *zName;
  FuncDef *pHash;
};

typedef struct FuncDef FuncDef;

#define FUNCTION(zName, nArg, iArg, bNC, xFunc) 
  {nArg, SQLITE_UTF8, bNC, 0, SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName}

这里是负责错误的法典:

void myDateTimeFunctions(void){
    static MY_WSD FuncDef aDateTimeFuncs[] = {
    FUNCTION(julianday,        -1, 0, 0, juliandayFunc ), //when I compile the code with LLVM GCC it s giving me error 
                                                          //at this line and the later line and working fine with GCC 
                                                          //alone compiler. But the problem is XCode 4.2 does not come 
                                                          //with GCC alone compiler, so I am unable to run the applciation.
    FUNCTION(date,             -1, 0, 0, dateFunc      ),
  };

请允许我知道,我是否缺少一些用于确定遗嘱的宝贵信息。

最佳回答

我感谢你们的支持和回答,我回答这个问题。 这是宏观问题。 日内瓦 qlite.c中的定义是,这个问题在很久以前就与LLV_公司发生重叠。 海湾合作委员会汇编者。 实际上,需要重新界定宏观,并将解决这一问题。

Here is the reference for the same: http://tribelet.blogspot.com/2008/09/blog-post_08.html language of the post is Japanese but it helped me to get out of the problem.

问题回答

我想,SQLITE_INT_TO_PTR(iArg)在使用LVERV汇编器时并不固定,因此你有非法编码。

如果你使用<条码>-std=c99转换,以简单易懂的方式汇编成册,你是否看到同样的错误? 如果是的话,请你用<代码>-std=gnu99<>/code”汇编成文,看问题是否消失。

在错误之前是否有警告? 一种猜测是,没有界定<代码>SQLITE_INT_TO_PTR,并且没有规定职能要求。

Otherwise try llvm-gcc -E on the file (you might have to look in your Xcode build log to get the complete line) to see what it compiles into.





相关问题
Fastest method for running a binary search on a file in C?

For example, let s say I want to find a particular word or number in a file. The contents are in sorted order (obviously). Since I want to run a binary search on the file, it seems like a real waste ...

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

Tips for debugging a made-for-linux application on windows?

I m trying to find the source of a bug I have found in an open-source application. I have managed to get a build up and running on my Windows machine, but I m having trouble finding the spot in the ...

Trying to split by two delimiters and it doesn t work - C

I wrote below code to readin line by line from stdin ex. city=Boston;city=New York;city=Chicago and then split each line by ; delimiter and print each record. Then in yet another loop I try to ...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

Encoding, decoding an integer to a char array

Please note that this is not homework and i did search before starting this new thread. I got Store an int in a char array? I was looking for an answer but didn t get any satisfactory answer in the ...

热门标签