Step instructions to create the C++ program from the Proview "Designer's Guide"

More
1 month 2 weeks ago #45 by Wei
Hello Cleas,
I'm currently  learning Application programming based on PWR6.1.4-2, referring to the Designer's Guide. During compilation, I encountered the error at the  step 1 "g++ -g -c ra_myappl.cpp -o $pwrp_obj/ra_myappl.o -I$pwr_inc -DOS_LINUX=1 -DOS=linux -DHW_X86=1 -DHW=x86 -DOS_POSIX" as shown in Figure 1. I took the measures to accomplish the step 1 which I commented out the lines causing errors (lines 3362-3396) as shown in Figure 2 ,Continuing to debug the step 2 "g++ -g -o $pwrp_exe/ra_myappl $pwrp_obj/ra_myappl.o $pwr_obj/pwr_msg_rt.o -L$pwr_lib -lpwr_rt -lpwr_co -lpwr_msg_dummy -lrt -pthread", I still encountered the error in Figure 3-a and Figure 3-b, and when running the system, XYCurve shows no data.
I'm also tried the solution to accomplish the step 1 that I modified "pwr_baseclasses.hpp" to "pwr_baseclasses.h" and "pwr_Class_XyCurve *curve_ptr" to "pwr_sClass_XyCurve *curve_ptr" as shown  in Figure 4, Continuing to debug, I still encountered the error in Figure 3, and when running the system, XYCurve shows no data. 

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #46 by claes
Hi Wei,

If you use pwr_baseclasses.hpp you also have to include pwr_systemclasses.hpp.
You should also nowadays add -ltirpc to the g++ command in step 2.

/Claes

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #49 by Wei
Thank you very much for your reply. Currently, the debugging has no errors. I have carefully checked and confirmed all the steps and code. But running the PWR system, there is still no data on the XYCurve Object Graph.

Please Log in or Create an account to join the conversation.

More
1 month 1 week ago #54 by Wei
Thank you very much, I have already solved this problem.

Please Log in or Create an account to join the conversation.

Time to create page: 0.456 seconds
Powered by Kunena Forum