05-21-2015 04:50 AM
I'm new to microblaze, so I hope you can help me.
Currently I use
Xilinx SDK: Release 14.7 Build SDK_P.20131013
There is already an existing project written in C, which I have to extend. I want to program the new parts in C++ but it does not work until now.
1.) I tried to simply add a *.cpp file to my project which was not compiled because no toolchain was selected. It was only possible to select the g++ compiler (an error occured on clicking "Apply" but the compiler was selected correct on clicking OK)
2.) g++ complied with a fatal error about the -c option which was set to be given to gcc.
3.) when I removed the -c option the rest of the code written in C did not compile correctly anymore. (I saw mainly that the compiler complied then about lines which declared an extern variable.
so please can you help me how I can use C++ in my project?
06-01-2015 07:07 AM
hey thanks for your help, unfortunately I can't change all the files from c to cpp as there are other people also working on the project.
normally it should go well if I only use the c++ compiler for the .cpp files, isn't it?
files needed to link against the c files get an extern"C" declaration in front.
Is there another way possible to use cpp sources in that constellation?