This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
hi ,
Am trying to include an external header directory into my CCS project -
Tried adding the header directory through :: Project Properties > Build > c6000 Compiler >include options>(Add dir to #include search path(--include_+path,-l)
After the above step am able to find my header directory in the "includes".
Also i added the directory path in the linker :: Properties>Build>c6000 Linker >File Search path > (Add <dir> to library search path(--search_path,-i)) .
When i build my project : am getting error that the parameters of .h file in the included header directory are undefined.
compiler version :c6000_7.4.4
Error info when compiler tries to access this directory :
Invoking: C6000 Compiler "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/bin/cl6x" -mv64+ --abi=coffabi -g --include_path="/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include" --include_path="/usr/local/include" --pch --rtti --cpp_default --define=tci6482 --display_error_number --diag_warning=225 --diag_wrap=off --preproc_with_compile --preproc_dependency="build/CMakeFiles/2.8.10.1/CompilerIdCXX/CMakeCXXCompilerId.pp" --obj_directory="build/CMakeFiles/2.8.10.1/CompilerIdCXX" --exceptions "../build/CMakeFiles/2.8.10.1/CompilerIdCXX/CMakeCXXCompilerId.cpp"
vinodh rv said:When i build my project : am getting error that the parameters of .h file in the included header directory are undefined.
Can you post the full output of the CCS build console so we can see the full error message coming out of the compiler?
Hi ,
Is the procedure followed by me to include a third party header files is correct ?
AartiG said:Can you post the full output of the CCS build console so we can see the full error message coming out of the compiler?
Please find the error message from the console :
>> Compilation failure "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 61: error #20: identifier "ivec" is undefined "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 62: error #20: identifier "imat" is undefined "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 63: error #20: identifier "Array" is undefined "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 63: error #256: type name is not allowed "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 63: error #20: identifier "stringArray" is undefined "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 63: error #18: expected a ")" "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 64: error #20: identifier "ivec" is undefined "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 65: error #20: identifier "vec" is undefined "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 66: error #20: identifier "ivec" is undefined "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 66: error #20: identifier "ivec" is undefined "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 67: error #20: identifier "ivec" is undefined "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 67: error #20: identifier "ivec" is undefined "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 67: error #20: identifier "ivec" is undefined "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 68: error #20: identifier "cmat" is undefined "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 68: error #20: identifier "cmat" is undefined "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 68: error #20: identifier "input" is undefined "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 68: error #18: expected a ")" "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 69: error #20: identifier "cvec" is undefined "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 69: error #249: variable "ifftNorm" has already been defined "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 69: error #20: identifier "cvec" is undefined Building file: ../build/CMakeFiles/2.8.10.1/CompilerIdC/CMakeCCompilerId.c "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 70: error #760: "cmat" is not a type name Invoking: C6000 Compiler "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 70: error #18: expected a ")" "/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/bin/cl6x" -mv64+ --abi=coffabi -g --include_path="/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include" --include_path="/usr/local/include" --pch --rtti --cpp_default --define=tci6482 --display_error_number --diag_warning=225 --diag_wrap=off --preproc_with_compile --preproc_dependency="build/CMakeFiles/2.8.10.1/CompilerIdC/CMakeCCompilerId.pp" --obj_directory="build/CMakeFiles/2.8.10.1/CompilerIdC" "../build/CMakeFiles/2.8.10.1/CompilerIdC/CMakeCCompilerId.c" "../lib/ControlSupport/src/../include/../../simSupport/include/simSupport.h", line 71: error #760: "cvec" is not a type name Compilation terminated. gmake: *** [lib/ControlChannelSupport/src/SupportingFunctions.obj] Error 1 "../build/CMakeFiles/2.8.10.1/CompilerIdC/CMakeCCompilerId.c", line 2: fatal error #35: #error "A C++ compiler has been selected for C." 1 fatal error detected in the compilation of "../build/CMakeFiles/2.8.10.1/CompilerIdC/CMakeCCompilerId.c". Compilation terminated. gmake: *** [build/CMakeFiles/2.8.10.1/CompilerIdC/CMakeCCompilerId.obj] Error 1 gmake: Target `all' not remade because of errors. **** Build Finished ****
vinodh rv said:Is the procedure followed by me to include a third party header files is correct ?
Yes, the path to the header file should be added to the compiler's --include_path otpion, which you seem to have done correctly.
However, the errors seem to be valid errors. Where are the identifiers reported in the errors defined? Also towards the end I see a "#error "A C++ compiler has been selected for C". Is it possible that this source file needs to be treated as a C file and not C++? The option -cpp_default that is on the command line will treat the file as C++ even though it is a .c extension. You would need to check into where/how those identifiers are defined and if the file that define them are being properly included.
AartiG said:Where are the identifiers reported in the errors defined?
Actually i imported a c++ makefile project into the CCS . I am trying to add external c++ library called armadillo (linear algebra library,www.arma.sourceforge.net)into my project . I have also included path of the header folder in compiler and linker include option .
I have a Simsuppport.h header file which use the parameter defined in the armadillo library . Error is thrown up at the definition.
Place where i suspect is : In the linker apart fro library search path , should we add any ".a" , ".lib" ,".cmd" to link correctly ? if so how to get that file format ?
AartiG said:Also towards the end I see a "#error "A C++ compiler has been selected for C". Is it possible that this source file needs to be treated as a C file and not C++?
That is a unwanted build folder file - which is not required in this project . I removed that file .
AartiG said:You would need to check into where/how those identifiers are defined and if the file that define them are being properly included.
Ya you were right !! i rechecked the definition part and the file which includes the definition within the armadillo was commented . On enabling it, undefined parameter error got resolved.
Sorry for rising such simple questions .
Thanks for helping me out .