PLUS+1 Tools > PLUS+1 and C
ST(Structured Text) Compile error
(1/1)
choongKi:
I was compiling using Structured Text POUs and encountered a compile error (ERROR 302) in the following message
*** ERROR 302 *** [CL2000S] INTERNAL: UNEXPECTED EXCEPTION WITH MESSAGE: {Failed to compile file: "HydroFraise.C", Compiler error: 1}
What is the solution?
Nilla:
Hi ChoongKi!
What version of GUIDE are you using?
Looking at your compile error you seem to have a file called HydroFraise.C, a capital C as a file format. Before v9.0.8 it was possible to add C code files with upper case .C extension to a GUIDE project. This could cause issues as upper case .C extension is used by some compilers to indicate a C++ file.
Were you adding existing C-code files to your project or has it been created from within GUIDE?
If a C code file has been added to the project, but its extension is set as: ā.Cā rather than: ā.cā, then it will be treated as a C++ file by some compilers. This will likely lead to link errors. Use of this upper case extension is only possible when adding existing C code files to a GUIDE project, not when creating new C code files from within GUIDE.
Workaround: Remove the C code files with upper case extension from the project, then rename them to the lower case extension in your usual file browser, and finally add them to the project again.
This information can be found in the Release Notes for PLUS+1 GUIDE v9.0.8, on page 4 and 8, found in the Help menu in GUIDE.
Best regards
Nilla
PLUS+1 Helpdesk
Navigation
[0] Message Index
Go to full version