go_away

Author Topic: Does "Webbotlib Studio" only generate C++ code?  (Read 1439 times)

0 Members and 1 Guest are viewing this topic.

Offline Hero ITopic starter

  • Jr. Member
  • **
  • Posts: 31
  • Helpful? 0
Does "Webbotlib Studio" only generate C++ code?
« on: September 27, 2014, 10:49:05 PM »
In "Project Designer", the user is allowed to choose between generating C or C++ code in the "Generate Project code" window.

Does the user have the same option in "Webbotlib Studio"?

If so, where? I can't find it.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
Re: Does "Webbotlib Studio" only generate C++ code?
« Reply #1 on: September 28, 2014, 11:36:29 AM »
WebbotLib Studio only generates C++ code.
There are lots of reasons for this:- as other 3rd parties can now contribute code then it is very difficult to make sure that every contributor uses unique names for all their functions. C++ namespaces help with this.
Does that mean you have to write your project code in C++? Well not really. Since C++ is a superset of C then you can still use C for your main code - but when accessing sensors/devices then use C++ syntax such as LeftMotor.setSpeed(20). After all this is exactly how other things like Arduino work.
Webbot
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

 


Get Your Ad Here