Replies: 4 comments 2 replies
-
Hi @xbh-sdju, If I translated correctly, in your testbench you are creating in Visual C++, RLC_Circuit.hpp cannot be found, despite being added to your project, correct? When opening the rlc_tb.cpp file in Notepad++, I noticed the #include for the RLC_Circuit.hpp has a RS character in it, like seen here: This extra RS character might be causing the issue you are having. These extra characters might occur when copying and pasting from different files with different text encoding (ANSI, UTF, etc.) and/or languages. I noticed myself that copying code from our CLI User Guide PDF to plain-text also introduces other characters and unintended spaces in the code which shouldn't normally happen and may cause issues later down the road. In later versions of the user guide, I'll see about fixing this issue. In the meantime, I recommend manually copying or writing code from the user guide and to double check for unusual characters appearing in the code using your text editor. Let me know if this answer helped you fix the problem. |
Beta Was this translation helpful? Give feedback.
-
Hello @xbh-sdju , Sorry for the late reply.
The solver function for RLC_Circuit model should be called Also make sure in your specific testbench for the
Always check signature of the generated solver function in the header file to make sure to know the function name and names/types/order of I/O arguments for said function. The above should hopefully fix the errors you are receiving, including one about double type. If the compiler still complains about double, check for other errors, and make sure the compiler is set for C++ file input and build. Let me know if this answer helped you fix the problem. |
Beta Was this translation helpful? Give feedback.
-
Hi @xbh-sdju, Looking through your rlc2.zip file, it looks like in the RLC_Circuit.hpp header you have the Uncomment the template <> part of the function definition and remove the The problem you had was the solver function was being called as an instanced function template with arguments 0 and double in the testbench code but by having the template <> commented out in the solver function's header, you made the function no longer a template, causing the compiler to throw an error. Let me know how it goes with this fix. |
Beta Was this translation helpful? Give feedback.
-
Discussion closed and locked due to inactivity. |
Beta Was this translation helpful? Give feedback.
-
当我在 Microsoft Visual C++ 2010 Express 中编写脱机C++仿真测试文件时,它显示找不到我的 RLC_Circuit.hpp,但我已加载该文件。这真的很糟糕,RLC_Circuit.hpp是从CLI文件生成的,示例是操作手册中的RLC示例。希望得到你的帮助。非常感谢,附件是我的项目文件。
rlc2.zip
Beta Was this translation helpful? Give feedback.
All reactions