Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Compiling AC14 & AC15 Add-on Xcode LLVM Compiler

Anonymous
Not applicable
Hi All,

I'm trying to get Archicad Add-ons for OSX 10.6/10.7 to compile in Xcode 4.2 or 4.3 using the Apple LLVM Compiler 3.0, so I can use the awesome LLVM Static Analyser.

I have one problem. I'm getting two instances of this compile error:
"'Mutable' cannot be applied to references."

Do any of the C++ whizzes out there know the compiler setting in LLVM that allows mutable to be applied references? Or at least relaxes the language settings.

Cheers,

Nicholas
7 REPLIES 7

Anonymous
Not applicable
Just to follow up on the previous post with a little more detail:

Compiling an AC15 add-on with Xcode 4.3 LLVM GCC works, but the Static Analyser will not run.

When the Static Analyser is called (Product->Analyse), it will compile with the following errors.

This error the same as the compile error that stops the build altogether, in the Apple LLVM Compiler 3.0.

Ralph Wessel
Mentor
nikko wrote:
I have one problem. I'm getting two instances of this compile error:
"'Mutable' cannot be applied to references."
I suspect you're trying to declare a mutable reference member variable. A reference can only be set when it is constructed and can't be modified afterward, so declaring it to be mutable will have no effect.

I'm not sure that the LLVM Compiler output would be binary compatible with the ArchiCAD API - be careful, it might result in some very subtle bugs. Perhaps someone from GS could comment on the compatibility of XCode 4 and the LLVM Compiler with the ArchiCAD API?
Ralph Wessel BArch

Akos Somorjai
Graphisoft
Graphisoft
Ralph wrote:
I'm not sure that the LLVM Compiler output would be binary compatible with the ArchiCAD API - be careful, it might result in some very subtle bugs. Perhaps someone from GS could comment on the compatibility of XCode 4 and the LLVM Compiler with the ArchiCAD API?
Xcode 4 is fine, LLVM is also in most of the cases. I found only one compiler bug (not with the API), which has been corrected since then. The LLVM output is binary compatible with the code compiled with GCC.

You wouldn't be able to set the same compiler in Xcode 4 anyway, because we use GCC 4.0, and the earliest you can use is GCC 4.2.

My recommendation would be to use LLVM for checking, but produce and test the release version with GCC 4.2 for the moment.

Best, Akos

Ben Cohen
Contributor
Hi Guys

I have to run Xcode 4.2 on a my new machine running Lion. I have managed to get the project to compile using the LLVM compiler, but the bundle is not being created.?
Any help appreciated
Ben Cohen

Mac and PC

Archicad (Latest Version) aus

www.4DLibrary.com.au

Ralph Wessel
Mentor
Ben wrote:
I have to run Xcode 4.2 on a my new machine running Lion. I have managed to get the project to compile using the LLVM compiler, but the bundle is not being created.?
You don't have to use XCode 4.2 with Lion - I have both XCode 3.2.6 and 4.2 installed and use either depending on the requirements. I'm using only 3.2.6 for ArchiCAD development.
Ralph Wessel BArch

Ben Cohen
Contributor
Xcode 3.2.6 will not install correctly on Lion. This is well documented in the apple forums (and you get another warning from apple when you download 3.2.6). It works fine if you have 3.2.6 installed before you upgrade to Lion from Snow Leopard.
But I found the following link on the Apple developer forums. After installing 3.2.6 using this method, it worked

http://anatomicwax.tumblr.com/post/8064949186/installing-xcode-3-2-6-on-lion-redux
Ben Cohen

Mac and PC

Archicad (Latest Version) aus

www.4DLibrary.com.au

Ralph Wessel
Mentor
Ben wrote:
Xcode 3.2.6 will not install correctly on Lion.
Apple are at pains to point out that they don't support 3.2.6 on Lion, and put up minor obstacles to casual installation attempts. But there are several ways to install it and it works fine. You can even get most of the compiler plugins and SDKs in 3.2.6 to work in 4.x, but I wouldn't recommend that approach. The major change is that legacy PPC support has finally ended, and thus any compiler supporting PPC output will be limited.

For most developers, the move to XCode 4 in a no-brainer (it's a great update). But plugin development is often fraught with problems of this kind, for the simple reason that you are constrained in many ways by the configuration of the host.
Ralph Wessel BArch

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!