c++ compiling error
19 Oct 2024 13:54 - 19 Oct 2024 14:02 #312607
by bkt
Replied by bkt on topic c++ compiling error
Thanks a lot but these is not necessary, I have not problem on these .... but now is well done so can add system folder cancel mine so everyone can build it on QT6 ...
Any how if eliminate halwidget from project problem remain ... so my attached project .... (finally I purge it and with some fortunes i see is not problem of code ... but only a compile problem .... not find perhaps) ..... github.com/bkt-it/Lcnc-test-qt6 .....
I find that problem become from no linking on iniaxis.o .... and these research suggest me somethings not work on linkages from .hh and .h file .... but not an expert ... or not so mutch to solve the situation ....
gc81@gc81-df:~$ nm -A /usr/lib/liblinuxcnc.a | grep emcAxisSetMinPositionLimit
/usr/lib/liblinuxcnc.a:iniaxis.o: U _Z26emcAxisSetMinPositionLimitid
/usr/lib/liblinuxcnc.a:inihal.o: U _Z26emcAxisSetMinPositionLimitid
gc81@gc81-df:~$ grep -r "emcAxisSetMinPositionLimit" /usr/include/linuxcnc
/usr/include/linuxcnc/emc.hh:extern int emcAxisSetMinPositionLimit(int axis, double limit);
gc81@gc81-df:~$ nm -A /usr/lib/libemc.a | grep emcAxisSetMinPositionLimit
nm: '/usr/lib/libemc.a': No such file
gc81@gc81-df:~$ nm -A /usr/lib/libemc_nml.a | grep emcAxisSetMinPositionLimit
nm: '/usr/lib/libemc_nml.a': No such file
gc81@gc81-df:~$ nm -A /usr/lib/liblinuxcnc*.a | grep emcAxisSetMinPositionLimit
/usr/lib/liblinuxcnc.a:iniaxis.o: U _Z26emcAxisSetMinPositionLimitid
/usr/lib/liblinuxcnc.a:inihal.o: U _Z26emcAxisSetMinPositionLimitid
gc81@gc81-df:~$ nm -A /usr/lib/lib*.a | grep emcAxisSetMinPositionLimit
nm: bltVecCmd.o: no symbols
nm: bltVecCmd.o: no symbols
nm: bltVecCmd.o: no symbols
nm: bltVecCmd.o: no symbols
/usr/lib/liblinuxcnc.a:iniaxis.o: U _Z26emcAxisSetMinPositionLimitid
/usr/lib/liblinuxcnc.a:inihal.o: U _Z26emcAxisSetMinPositionLimitid
gc81@gc81-df:~$ nm -A /usr/lib/lib*.a | grep emcAxisSetMinPositionLimit
nm: bltVecCmd.o: no symbols
nm: bltVecCmd.o: no symbols
nm: bltVecCmd.o: no symbols
nm: bltVecCmd.o: no symbols
/usr/lib/liblinuxcnc.a:iniaxis.o: U _Z26emcAxisSetMinPositionLimitid
/usr/lib/liblinuxcnc.a:inihal.o: U _Z26emcAxisSetMinPositionLimitid
gc81@gc81-df:~$ cd linuxcnc-source-dir
gc81@gc81-df:~/linuxcnc-source-dir$ grep -r "emcAxisSetMinPositionLimit"
grep: src/objects/emc/task/taskintf.o: binary file matches
grep: src/objects/emc/ini/inihal.o: binary file matches
grep: src/objects/emc/ini/iniaxis.o: binary file matches
src/emc/task/taskintf.cc:int emcAxisSetMinPositionLimit(int axis, double limit)
src/emc/nml_intf/emc.hh:extern int emcAxisSetMinPositionLimit(int axis, double limit);
src/emc/ini/iniaxis.cc: emcAxisSetMinPositionLimit(int axis, double limit);
src/emc/ini/iniaxis.cc: if (0 != emcAxisSetMinPositionLimit(axis, limit)) {
src/emc/ini/iniaxis.cc: rcs_print_error("bad return from emcAxisSetMinPositionLimit\n");
src/emc/ini/inihal.cc: if (0 != emcAxisSetMinPositionLimit(idx,NEW(axis_min_limit[idx]))) {
src/emc/ini/inihal.cc: rcs_print_error("check_ini_hal_items:bad return from emcAxisSetMinPositionLimit\n");
grep: bin/milltask: binary file matches
include/emc.hh:extern int emcAxisSetMinPositionLimit(int axis, double limit);
grep: lib/liblinuxcnc.a: binary file matches
gc81@gc81-df:~/linuxcnc-source-dir$
Thanks a lot
Any how if eliminate halwidget from project problem remain ... so my attached project .... (finally I purge it and with some fortunes i see is not problem of code ... but only a compile problem .... not find perhaps) ..... github.com/bkt-it/Lcnc-test-qt6 .....
I find that problem become from no linking on iniaxis.o .... and these research suggest me somethings not work on linkages from .hh and .h file .... but not an expert ... or not so mutch to solve the situation ....
Warning: Spoiler!
gc81@gc81-df:~$ nm -A /usr/lib/liblinuxcnc.a | grep emcAxisSetMinPositionLimit
/usr/lib/liblinuxcnc.a:iniaxis.o: U _Z26emcAxisSetMinPositionLimitid
/usr/lib/liblinuxcnc.a:inihal.o: U _Z26emcAxisSetMinPositionLimitid
gc81@gc81-df:~$ grep -r "emcAxisSetMinPositionLimit" /usr/include/linuxcnc
/usr/include/linuxcnc/emc.hh:extern int emcAxisSetMinPositionLimit(int axis, double limit);
gc81@gc81-df:~$ nm -A /usr/lib/libemc.a | grep emcAxisSetMinPositionLimit
nm: '/usr/lib/libemc.a': No such file
gc81@gc81-df:~$ nm -A /usr/lib/libemc_nml.a | grep emcAxisSetMinPositionLimit
nm: '/usr/lib/libemc_nml.a': No such file
gc81@gc81-df:~$ nm -A /usr/lib/liblinuxcnc*.a | grep emcAxisSetMinPositionLimit
/usr/lib/liblinuxcnc.a:iniaxis.o: U _Z26emcAxisSetMinPositionLimitid
/usr/lib/liblinuxcnc.a:inihal.o: U _Z26emcAxisSetMinPositionLimitid
gc81@gc81-df:~$ nm -A /usr/lib/lib*.a | grep emcAxisSetMinPositionLimit
nm: bltVecCmd.o: no symbols
nm: bltVecCmd.o: no symbols
nm: bltVecCmd.o: no symbols
nm: bltVecCmd.o: no symbols
/usr/lib/liblinuxcnc.a:iniaxis.o: U _Z26emcAxisSetMinPositionLimitid
/usr/lib/liblinuxcnc.a:inihal.o: U _Z26emcAxisSetMinPositionLimitid
gc81@gc81-df:~$ nm -A /usr/lib/lib*.a | grep emcAxisSetMinPositionLimit
nm: bltVecCmd.o: no symbols
nm: bltVecCmd.o: no symbols
nm: bltVecCmd.o: no symbols
nm: bltVecCmd.o: no symbols
/usr/lib/liblinuxcnc.a:iniaxis.o: U _Z26emcAxisSetMinPositionLimitid
/usr/lib/liblinuxcnc.a:inihal.o: U _Z26emcAxisSetMinPositionLimitid
gc81@gc81-df:~$ cd linuxcnc-source-dir
gc81@gc81-df:~/linuxcnc-source-dir$ grep -r "emcAxisSetMinPositionLimit"
grep: src/objects/emc/task/taskintf.o: binary file matches
grep: src/objects/emc/ini/inihal.o: binary file matches
grep: src/objects/emc/ini/iniaxis.o: binary file matches
src/emc/task/taskintf.cc:int emcAxisSetMinPositionLimit(int axis, double limit)
src/emc/nml_intf/emc.hh:extern int emcAxisSetMinPositionLimit(int axis, double limit);
src/emc/ini/iniaxis.cc: emcAxisSetMinPositionLimit(int axis, double limit);
src/emc/ini/iniaxis.cc: if (0 != emcAxisSetMinPositionLimit(axis, limit)) {
src/emc/ini/iniaxis.cc: rcs_print_error("bad return from emcAxisSetMinPositionLimit\n");
src/emc/ini/inihal.cc: if (0 != emcAxisSetMinPositionLimit(idx,NEW(axis_min_limit[idx]))) {
src/emc/ini/inihal.cc: rcs_print_error("check_ini_hal_items:bad return from emcAxisSetMinPositionLimit\n");
grep: bin/milltask: binary file matches
include/emc.hh:extern int emcAxisSetMinPositionLimit(int axis, double limit);
grep: lib/liblinuxcnc.a: binary file matches
gc81@gc81-df:~/linuxcnc-source-dir$
Thanks a lot
Last edit: 19 Oct 2024 14:02 by bkt.
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
19 Oct 2024 16:41 #312618
by Grotius
Replied by Grotius on topic c++ compiling error
The following user(s) said Thank You: bkt
Please Log in or Create an account to join the conversation.
19 Oct 2024 17:49 #312629
by bkt
Replied by bkt on topic c++ compiling error
but is not possible mixing installed version and rip-install as in the past? Your cmake point to:
my .pro file point to :
INCLUDEPATH += /usr/include/linuxcnc
INCLUDEPATH += /usr/include/linuxcnc/
INCLUDEPATH += /usr/include
INCLUDEPATH += /usr/lib
INCLUDEPATH += /usr/share/linuxcnc
INCLUDEPATH += /usr/lib/linuxcnc/modules
INCLUDEPATH += $$HOME_DIR/linuxcnc-source-dir/src/hal/utils
INCLUDEPATH += $$HOME_DIR/linuxcnc-source-dir/src/hal
INCLUDEPATH += $$HOME_DIR/linuxcnc-source-dir/src
INCLUDEPATH+= $$HOME_DIR/Qt/Tools/QtCreator/lib/Qt/plugins/designer
INCLUDEPATH+= $$PWD/wled-designer-plugin
INCLUDEPATH+= $$PWD/Lcnc-test-qt6/resources#INCLUDEPATH += $$PWD/Lcnc-test-qt6/src/plugins/opcua/open62541
LIBS+=-L $$HOME_DIR/Qt/Tools/QtCreator/lib/Qt/plugins/designer -lhalwidgetsplugin
LIBS+= -Iinclude -I/usr/lib/linuxcnc/canterp.so
#LIBS += -L/usr/lib -lnml -llinuxcnchal -llinuxcnc -llinuxcncini -DULAPI -lposemath -Isrc/emc/rs274ngc -ltirpc #-llinuxcnc
LIBS += -Iinclude -Isrc/emc/rs274ngc -Llib -lnml -llinuxcnc -llinuxcnchal -llinuxcncini -llinuxcnchal -DULAPI -lposemath -ltirp
But I use installed version and hal command of rip-install ..... for sure something is missing .... now I've not a version to check what is needed ..... any we can exchange the mail?
regards
Warning: Spoiler!
# Set includepaths for header files etc.
include_directories(${SRC_DIR}/../)
include_directories(${SRC_DIR}/../../)
include_directories(/home/user/linuxcnc_trajectory_planner/src)
include_directories(/home/user/linuxcnc_trajectory_planner/src/emc)
include_directories(/home/user/linuxcnc_trajectory_planner/src/emc)
include_directories(/home/user/linuxcnc_trajectory_planner/src/emc/nml_intf)
include_directories(/home/user/linuxcnc_trajectory_planner/src/emc/motion)
include_directories(/home/user/linuxcnc_trajectory_planner/src/rtapi)
include_directories(/home/user/linuxcnc_trajectory_planner/src/libnml/nml)
include_directories(/home/user/linuxcnc_trajectory_planner/src/libnml/rcs)
include_directories(/home/user/linuxcnc_trajectory_planner/src/libnml/cms)
include_directories(/home/user/linuxcnc_trajectory_planner/src/libnml/posemath)
include_directories(/home/user/linuxcnc_trajectory_planner/src/emc/rs274ngc)
include_directories(/home/user/linuxcnc_trajectory_planner/src/emc/usr_intf/axis/extensions)
include_directories(/home/user/linuxcnc_trajectory_planner/src/hal)
include_directories(${SRC_DIR}/../)
include_directories(${SRC_DIR}/../../)
include_directories(/home/user/linuxcnc_trajectory_planner/src)
include_directories(/home/user/linuxcnc_trajectory_planner/src/emc)
include_directories(/home/user/linuxcnc_trajectory_planner/src/emc)
include_directories(/home/user/linuxcnc_trajectory_planner/src/emc/nml_intf)
include_directories(/home/user/linuxcnc_trajectory_planner/src/emc/motion)
include_directories(/home/user/linuxcnc_trajectory_planner/src/rtapi)
include_directories(/home/user/linuxcnc_trajectory_planner/src/libnml/nml)
include_directories(/home/user/linuxcnc_trajectory_planner/src/libnml/rcs)
include_directories(/home/user/linuxcnc_trajectory_planner/src/libnml/cms)
include_directories(/home/user/linuxcnc_trajectory_planner/src/libnml/posemath)
include_directories(/home/user/linuxcnc_trajectory_planner/src/emc/rs274ngc)
include_directories(/home/user/linuxcnc_trajectory_planner/src/emc/usr_intf/axis/extensions)
include_directories(/home/user/linuxcnc_trajectory_planner/src/hal)
my .pro file point to :
Warning: Spoiler!
INCLUDEPATH += /usr/include/linuxcnc
INCLUDEPATH += /usr/include/linuxcnc/
INCLUDEPATH += /usr/include
INCLUDEPATH += /usr/lib
INCLUDEPATH += /usr/share/linuxcnc
INCLUDEPATH += /usr/lib/linuxcnc/modules
INCLUDEPATH += $$HOME_DIR/linuxcnc-source-dir/src/hal/utils
INCLUDEPATH += $$HOME_DIR/linuxcnc-source-dir/src/hal
INCLUDEPATH += $$HOME_DIR/linuxcnc-source-dir/src
INCLUDEPATH+= $$HOME_DIR/Qt/Tools/QtCreator/lib/Qt/plugins/designer
INCLUDEPATH+= $$PWD/wled-designer-plugin
INCLUDEPATH+= $$PWD/Lcnc-test-qt6/resources#INCLUDEPATH += $$PWD/Lcnc-test-qt6/src/plugins/opcua/open62541
LIBS+=-L $$HOME_DIR/Qt/Tools/QtCreator/lib/Qt/plugins/designer -lhalwidgetsplugin
LIBS+= -Iinclude -I/usr/lib/linuxcnc/canterp.so
#LIBS += -L/usr/lib -lnml -llinuxcnchal -llinuxcnc -llinuxcncini -DULAPI -lposemath -Isrc/emc/rs274ngc -ltirpc #-llinuxcnc
LIBS += -Iinclude -Isrc/emc/rs274ngc -Llib -lnml -llinuxcnc -llinuxcnchal -llinuxcncini -llinuxcnchal -DULAPI -lposemath -ltirp
But I use installed version and hal command of rip-install ..... for sure something is missing .... now I've not a version to check what is needed ..... any we can exchange the mail?
regards
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
19 Oct 2024 17:53 #312630
by bkt
tomorrow evening I try to check and compile .... no time to study cmake system ... but think I'm obligate in near future ....
Replied by bkt on topic c++ compiling error
Good Night ...Good luck.
tomorrow evening I try to check and compile .... no time to study cmake system ... but think I'm obligate in near future ....
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
19 Oct 2024 21:25 #312634
by bkt
Replied by bkt on topic c++ compiling error
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
20 Oct 2024 10:18 #312656
by Grotius
Replied by Grotius on topic c++ compiling error
Hi Bkt,
tomorrow evening I try to check and compile ....
Ok. Good luck.
no time to study cmake system ...
Along the way, you get used to the cmake system, you don't have to study it now.
ChatGpt can does a good job in assisting you with any modifications related to your cmakelists.txt file
but think I'm obligate in near future ....
In the past i also used the .pro system. But i am glad to have made the switch to the cmake system.
any we can exchange the mail
Keep it just here, so others can benefit.
tomorrow evening I try to check and compile ....
Ok. Good luck.
no time to study cmake system ...
Along the way, you get used to the cmake system, you don't have to study it now.
ChatGpt can does a good job in assisting you with any modifications related to your cmakelists.txt file
but think I'm obligate in near future ....
In the past i also used the .pro system. But i am glad to have made the switch to the cmake system.
any we can exchange the mail
Keep it just here, so others can benefit.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
21 Oct 2024 04:19 - 21 Oct 2024 04:20 #312718
by bkt
these for sure ... no worry ... ask not for these scope.
Replied by bkt on topic c++ compiling error
any we can exchange the mail
Keep it just here, so others can benefit.
these for sure ... no worry ... ask not for these scope.
Last edit: 21 Oct 2024 04:20 by bkt.
Please Log in or Create an account to join the conversation.
21 Oct 2024 14:45 #312755
by bkt
not attach my ini and hal because ethercat i/o connect .... but for now I use demo.sim.classicladder config and I add some custom pin like:
hope these problem can solve in short timer ......
regards
Replied by bkt on topic c++ compiling error
github.com/bkt-it/Lcnc-test-qt6/tree/main .... the new file with some command .... but receive alwais segmentation fault when try to press button or read in out ...... maybe some problem with too old version of get_commnd.h and send_command.h ....Hi Bkt,
not attach my ini and hal because ethercat i/o connect .... but for now I use demo.sim.classicladder config and I add some custom pin like:
net hal_cmd_1 classicladder.0.in-101 <= lcec.0.4.din-0
net hal_cmd_2 classicladder.0.in-102 <= lcec.0.4.din-1
net hal_cmd_3 classicladder.0.in-103 <= lcec.0.4.din-2
net hal_cmd_4 classicladder.0.in-104 <= lcec.0.4.din-3
net in17 classicladder.0.in-60 <= lcec.0.5.din-7
net out10 lcec.0.3.dout-0 => classicladder.0.out-10
hope these problem can solve in short timer ......
regards
Please Log in or Create an account to join the conversation.
21 Oct 2024 15:17 #312758
by bkt
Replied by bkt on topic c++ compiling error
not understand ...... problem here near here ....
attach complete file.
void set_CL_I20_OnOff(bool pinOutValue, QString pinOutName){
//char name[] = pinOutName.toStdString().c_str();
qDebug() << Q_FUNC_INFO << "func INPUT " << pinOutValue << " & " << pinOutName << " ;";
char name[strlen(pinOutName.toStdString().c_str()) + 1]; // Make sure there's enough space
strcpy(name, pinOutName.toStdString().c_str());
qDebug() << Q_FUNC_INFO << "func INPUT -- conv " << name << " & " << pinOutValue << " ;";
if(pinOutValue == true){ char valueOn[] = "1"; do_sets_cmd(name,valueOn);}
else { char valueOff[] = "0"; do_sets_cmd(name,valueOff);}
}
attach complete file.
Please Log in or Create an account to join the conversation.
21 Oct 2024 17:14 #312775
by Grotius
Replied by Grotius on topic c++ compiling error
Hi Bkt,
Attached file compiles ok.
It sets the component name, adds a dot, adds the pin name. This total string is valid for sending.
Did not test it. But should work. -- more info click here --
Good luck BKT.
Attached file compiles ok.
It sets the component name, adds a dot, adds the pin name. This total string is valid for sending.
Did not test it. But should work. -- more info click here --
Good luck BKT.
The following user(s) said Thank You: bkt
Please Log in or Create an account to join the conversation.
Time to create page: 0.115 seconds