|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Ok so this year i decided to program for my robotics team. Last year the code was in C++. The only problem is that i do not know C++, but luckily i know Java. So i found a C++ to Java converter. This would be wonderful if i actually had all the libraries that it needed to convert it. I asked my leader about it and he said that they had changed the names of some of the libraries. The libraries (if library is not the correct term please correct me as i am unfamiliar with C++) that i can not find are:
|
|
#2
|
||||
|
||||
|
Re: From C++ to Java
The converter tool is chasing through WPLib and the vxworks headers, and is looking for files that doen't exist even for C++ code.
I don't know the tool you are using, but try to limit it to your robot code itself. WPILib is already converted - you don't need to convert it again :-) There will be errors, but they should be easy to fix. |
|
#3
|
|||
|
|||
|
Re: From C++ to Java
i dont need to convert the library im converting the code that my team used last year
|
|
#4
|
||||
|
||||
|
Re: From C++ to Java
Good, we agree that you don't need to convert the library, but I believe that the translator tool was doing it anyway.
You didn't say what converter tool you were using, or how much robot code you have to convert, so I can't give specific advice. I can say that when WPI students ported WPILib from C++ to Java, they essentially used "cut and paste", then fixed the syntax errors. [They had to do a lot more work on FPGA interfacing, etc, that you don't need to worry about it.] If you are interested in converting from C++ to Java on your own you need to be familiar with differences between C++ objects and Java objects (C++ objects can be on stack, static memory, or in heap, '.' vs. '->'). Also, the Java version of WPILib all method names begin with lowercase letters. |
|
#5
|
|||
|
|||
|
Re: From C++ to Java
The converter I was using is called Tangible Converter.
|
|
#6
|
||||
|
||||
|
Re: From C++ to Java
C++ and Java are strikingly similar languages in terms of syntax. I would encourage you to not use a translator as they can be frequently inaccurate especially with the high sensitivity of WPILib and just translate the code by hand. It shouldn't be too difficult and if you need help just post chunks and I'm sure someone will help out
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| C++ vs. Java Performance | manderson5192 | Java | 9 | 05-12-2009 20:01 |
| Java | team1512 | Java | 2 | 21-10-2009 06:36 |
| Java vs. C++ | nickmagus | Programming | 3 | 05-09-2009 19:23 |
| **FIRST EMAIL**/Java and Orbit Balls *****JAVA DISCUSSION*** | Pjohn1959 | Programming | 37 | 31-08-2009 15:55 |
| java to pbasic | nzj1 | Programming | 11 | 09-01-2003 19:24 |