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.

TM4C129ENCPDT: #1965 cannot open source file "__config"

Part Number: TM4C129ENCPDT

Hi!

While trying to compile a static library for my project that at some point includes #include <libcxx/regex>

I get the following compile error:

#1965 cannot open source file "__config"

"C:/ti/ccs1030/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/include/libcxx/regex", line 757: fatal error #1965: cannot open source file "__config"

The __config file is in the same folder as the regex, so I don't understand the problem...

Any thoughts?

Ty

  • I need to see the invocation of the compiler which causes this result.

    If this is a CCS project, please perform the problem build again.  In the Console (not Problems) view, use the icon Copy Build Log to save the contents of the Console view to a text file  Be sure to use the file extension .txt.  Attach that file to your next post.

    If this is not a CCS project, please show the invocation of the compiler, including all the options exactly as the compiler sees them.  Please copy-and-paste the text, and do not use a screen shot.

    Thanks and regards,

    -George

  • This is from a simpler project with the same symptoms.

    Here it goes.

    Ty

    **** Build of configuration Debug for project e2eti ****
    
    "C:\\ti\\ccs1030\\ccs\\utils\\bin\\gmake" -k -j 8 all -O 
     
    Building file: "../main.c"
    Invoking: Arm Compiler
    "C:/ti/ccs1030/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="C:/Users/jglopes/workspace_v10/e2eti" --include_path="C:/ti/ccs1030/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/include" --define=ccs="ccs" --define=PART_TM4C129ENCPDT -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --gen_preprocessor_listing --preproc_with_compile --preproc_dependency="main.d_raw"  "../main.c"
     
    >> Compilation failure
    subdir_rules.mk:9: recipe for target 'main.obj' failed
    "C:/ti/ccs1030/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/include/libcxx/regex", line 757: fatal error #1965: cannot open source file "__config"
    1 catastrophic error detected in the compilation of "../main.c".
    Compilation terminated.
    gmake: *** [main.obj] Error 1
    gmake: Target 'all' not remade because of errors.
    
    **** Build Finished ****
    

  • Is it practical to cut main.c down to where it includes nothing except standard header files?  If so, please make that change.  Then attach it to your next post.  So the forum will accept it as an attachment, and the file extension .txt.  That forms the file name main.c.txt.

    Thanks and regards,

    -George

  • Sure George. As I said, I reduced the project to the bare minimun.


    main.h as follows:
    
    #ifndef MAIN_H_
    #define MAIN_H_
    
    
    #include "libcxx/regex"
    
    
    #endif /* MAIN_H_ */
    
    
    main.c as follows:
    
    #include "main.h"
    
    /**
     * main.c
     */
    int main(void)
    {
    	return 0;
    }
    

  • That is not the right way to #include the standard header file regex.  Write ...

    #include <regex>

    Next, make sure the source file is treated as C++ code, and not C code.  The typical way to do that is to make the extension of the source file .cpp.  There are other ways.  For the details, please search the TI ARM compiler manual for the sub-chapter titled Specifying Filenames.

    Thanks and regards,

    -George

  • In fact that did solved the problem,Ty.
    Unfortunately after that I found that the ti-cgt-arm regex version doesn't have the POSIX functions that the project needed. regcomp and regexec just to name a few of them..
    I ended up including a minimal regex implementation.

    Ty for the support George.