We've created a C-language project, which was compiling fine using the demo version of CW MCU v10.3. After adding some code (and modifying the code style settings), I'm now getting an error message that "C++ is not supported by the current set of licenses and is disabled." The added code is simple and does not contain any C++ constructs (except for the use of "bool", which is conditionally defined as an unsigned char in a header file). The error does not have a location specified and none of my code files are flagged as containing the error. After much searching for the problem, I found that the following text on the console seems to say that it is trying to compile a plug-in file called "specs.cpp". I don't know what we could have set such that CW would be trying to include this file in the build, but it appears to me to be the source of the error. The entire text on the console is:
'Invoking: ARM Compiler'
"C:/Program Files/Freescale/CW MCU v10.3/MCU/ARM_Tools/Command_Line_Tools/mwccarm" -gccinc @@".metadata/.plugins/org.eclipse.cdt.make.core/specs_1.args" -o ".metadata/.plugins/org.eclipse.cdt.make.core/specs1_cpp.obj" -c "../.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp" -MD -gccdep
C:/Program Files/Freescale/CW MCU v10.3/MCU/ARM_Tools/Command_Line_Tools/mwccarm|Compiler|Error
>C++ is not supported by the current set of licenses and is disabled. Please
>contact <license@freescale.com> for licensing needs
mingw32-make: *** [.metadata/.plugins/org.eclipse.cdt.make.core/specs1_cpp.obj] Error 1
mingw32-make: *** Waiting for unfinished jobs....
Does anyone have any suggestions about the cause and fix for this problem?? Thanks.
已解决! 转到解答。
Hi Nancy,
please check your project: I think if the compiler tries to compile that .metadata folder, then for whatever reason you have a .metadata folder inside your project folder?
You will not see that folder within the eclipse structure. Use your File Explorer and check the content of your project folder.
I would bet you haver a .metadata folder in there, where it does not belong.
I hope this helps,
Erich
Hi Nancy,
please check your project: I think if the compiler tries to compile that .metadata folder, then for whatever reason you have a .metadata folder inside your project folder?
You will not see that folder within the eclipse structure. Use your File Explorer and check the content of your project folder.
I would bet you haver a .metadata folder in there, where it does not belong.
I hope this helps,
Erich
Hi Erich and pgo,
We rebuilt the project as you suggested, pgo, and it's fine now. But I just looked at my copy of the old one with the problem and you are right, Erich, there's a .metadata folder in the project as well as in the workspace. I still wonder if there's a bug in CW--I created a project-specific coding style before I figured out how to do it at the workspace level, and I wonder if that might have created a .metadata at the project level? Anyway, that's what we assumed when we saw it and put it under configuration control. But it's fixed now, and we know the cause of the compile error, and however the .metadata folder got there, we can delete it if we see it again.
Thanks again,
Nancy
Hi Nancy,
The 'specs.cpp' file is part of the 'discovery method' that is used by Eclipse to determine compiler settings such as include paths and built-in #defines. It is usual to compile this file quietly. It seems likely that the build system thinks its doing a C++ project for some reason.
The simplest solution I can suggest is create a new project and copy the source files across.. This will ensure that the build settings are correct. A bit of a pain but probably safest and quickest solution. I would prefer this to the "hunt the wrong settings" approach :smileylaugh:.
You could also try exporting and importing the project.
bye
It is really strange that it tries to compile a file from a .metadata folder ("../.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp"). It looks like you have this file present (by mistake) in your project (maybe in a subfolder/etc). Can you check this? Maybe you have added it with drag&drop or by accidentially project manipulations?
I hope this helps.