Apple is now shipping Xcode 4. We have not yet tried it.
Judging from the comments on the Xcode mailing list, it appears that Xcode 4 is a significant departure from Xcode 3.
Unless you are an expert with time to spare, I recommend sticking with Xcode 3 for XOP development until further notice.
The currently-shipping version of the XOP Toolkit, version 6.02 shipped on 2011-08-22, has been tested in Xcode 4.0 on OS X 10.6 and on 4.1 on OS X 10.7.
If you are a licensed XOP Toolkit user and you previously downloaded XOP Toolkit 6, you can download the latest XOP Toolkit using the same download link.
If you are a licensed XOP Toolkit user and you never downloaded XOP Toolkit 6, you need to get the download link from WaveMetrics sales.
What should we do about the error Xcode 4 gives when compiling an XOP? The first argument to main must be an integer?
This is an error in Xcode 4.2 only. It was not an error in Xcode 4.1 or before. The error occurs because Apple dropped support for the "GCC 4.2" compiler in Xcode 4.2.
The solution is to set the compiler to "LLVM-GCC 4.2", which is still supported in Xcode 4.2. This uses the GCC 4.2 compiler for parsing and LLVM compiler for code generation.
Make sure to set the compiler at both the project and target levels. Also you may need to clean the project before recompiling.
Thanks very much. That halped. It still gets flagged as an issue, but I guess it is letting it get by, as I still get a product.
I you have the Xcode "Live Issues" turned on, I recommend you turn it off (File->Project Settings). It is not consistent with the GCC 4.2 parser because it uses LLVM to look for issues that are often not issues with GCC.
If you don't mind the inconsistency then you can leave Live Issues on.
yes, i got around the first error, but when i try to compile XFUNC1 xop in XCODE 4.3.2, i get the second error:
"First parameter of 'main' (argument count) must be of type 'int'"
anyone any idea?
Apple dropped support for the "GCC 4.2" compiler in Xcode 4.2 (without even a mention in the Xcode 4 release notes;).
Fortunately they still support the "LLVM-GCC 4.2" compiler (GCC 4.2 parser, LLVM code generator) which does not complain about the main function. So change your project settings to use the "LLVM-GCC 4.2" compiler and it should work.
I will address this in XOP Toolkit 6.03 some time "soon".
Another solution is to change main to XOPMain. See "The Main Function" in Chapter 12 of the XOP Toolkit 6 manual for details. This technique requires that you run with Igor Pro 6.20 or later.
Back to top