Thank you for your response, I tried re-indexing the way it was mentioned in 4.6 even ater that they don't show any color or auto-complete. pinMode or OUTPUT or Serial.print() doesn't show any sigh of auto completion.
in the 2nd post the example what you mentioned is the part of standard C++ code sense, isn't it.
like
int functionName(int an_example,int b_example){
return a_example+b_example;
}
void main(){
int a=10;
int b=20;
cout<<functionName(a,b);
}
in the above mentioned example we are declaring a function functionName and calling it again in the main function. so it works fine since it is standard C++ implementation. But when I try to write:
what i mean is the functions declared in Arduino.h are not being recognised by Xcode while i'm editing in the .ino file. It might have something to do with the Xcode version. I'm using Xcode 4.6.2. Is there anything I'm missing maybe :~
After commenting out the whole section except #include "Arduino.h" as you mentioned it solved my problem. everything is perfect now. The code sense has started working.
I have almost the same problem as Zulkarnine, and the previous solutions didn't work for me =S
The difference is that i have color and auto-complete code with:
pinMode(myLED, OUTPUT);
but i don't have with this:
Serial.begin(960);
=S anyway, Is there any theme to get the color equal to the arduino ide?
zulkarnine:
in the above mentioned example we are declaring a function functionName and calling it again in the main function. so it works fine since it is standard C++ implementation. But when I try to write:
what i mean is the functions declared in Arduino.h are not being recognised by Xcode while i'm editing in the .ino file. It might have something to do with the Xcode version. I'm using Xcode 4.6.2. Is there anything I'm missing maybe :~
DarkFlagster:
I have almost the same problem as Zulkarnine, and the previous solutions didn't work for me =S
The difference is that i have color and auto-complete code with:
pinMode(myLED, OUTPUT);
but i don't have with this:
Serial.begin(960);
As I wrote before,
Code-sense, auto-completion and arguments list are displayed usually without problem in my laptop.
Now, it isn't a 100% hit because code-sense implementation changes with every Xcode release and as Apple is more than secretive about the customisation of Xcode.
Xcode code-sense doesn't seem to be powerful enough to manage virtual functions within classes. Serial.print() is a virtual function.
DarkFlagster:
=S anyway, Is there any theme to get the color equal to the arduino ide?
Sorry, but I can't provide support for Xcode. Please refer to Xcode documentation for interface customisation.
I strongly recommend you to refer to the book Xcode 4 Unleashed by Fritz F. Anderson I purchased thanks to contributions.
embedXcode • May 04, 2013 release 48 • Compilation of main.cpp for embedxcode only embedXcode • May 10, 2013 release 49 • Improved code-sense for core libraries
main.cpp has a conditional statement for compilation based on EMBEDXCODE.
The name of the IDE is included in the pre-processing variable use for code-sense.
embedXcode • May 21, 2013 release 50 • Arduino and Digispark 1.0.4 compatibility
For the Teensy boards, embedXcode takes into account the Teensyduino installed either as a plug-in for Arduino 1.0.3, or as a stand-alone application /Applications/Teensyduino.app.
embedXcode • May 23, 2013 release 51 • Project configuration with user’s libraries
The automatic preparation procedure now includes the user's libraries for code-sense.
For example, if you select Arduino Uno as board when you create a new project, all the libraries under the sketchbook/libraries folder define in the Arduino preferences are going to be included to the project.
When I started the embedXcode project back in January 2012, I didn't expect to reach the 51st release!
Thank you for your support, feed-back and help you've provided me during all the development!
You're welcome! Now the next big challenge is to update my old Mac :~. Xcode is too demanding :(.
ScottG:
Does release 51 mean we don't need to do step 3.2.1 (add user's libraries) in the manual
That's correct. No more manual procedure is required.
However, I keep providing the manual procedures on the User Manual as they might be useful if you make important changes to a project, for example changing the platform.
It appeared the tool in charge of configuring the project generated zombies, resulting in a cryptic Segmentation fault: 11 error message. The cause has been fixed and zombies are over now.
More important, I'm going to resume playing with boards, sensors and displays. As my current Mac no longer provides enough power to run Xcode smoothly,
I plan to update my old Mac for a new one, as this year's target for contributions. Obviously, I continue to maintain and support embedXcode.
avenue33:
Xcode code-sense doesn't seem to be powerful enough to manage virtual functions within classes. Serial.print() is a virtual function.
Yes. One should not forget that Apples does not care too much about C++ in Xcode. Xcode is mainly made for C and ObjC. Although they try to make a decent C++ compiler, proper C++ code sense is clearly not their top priority.
avenue33:
Xcode code-sense doesn't seem to be powerful enough to manage virtual functions within classes. Serial.print() is a virtual function.
Yes. One should not forget that Apples does not care too much about C++ in Xcode. Xcode is mainly made for C and ObjC. Although they try to make a decent C++ compiler, proper C++ code sense is clearly not their top priority.
I more than agree with you! Xcode is aimed at OS X and iOS.
Now, I'm not tied to Xcode and can consider another IDE. The tests of the makefiles were successful with NetBeans.
I only need some help from someone knowing NetBeans well.