CANopenNode / CANopenSocket

Obsolete repository, replaced by CANopenDemo and CANopenLinux
Apache License 2.0
208 stars 119 forks source link

Failed compiling CANopenNode in Qt C++ #22

Closed reyanvaldes closed 4 years ago

reyanvaldes commented 4 years ago

After, execute the examples you recommended as basic introduction, I tried integrating CANopenNode stack into a very simple Qt program, but it failed when compiling with lot of errors, many are in CO_drive.c. I used extern "C" for link with C functions in C++. Please could you give me an idea what I am missing. I am using C++11 in the config flag, and Qt v5.2. I included all headers and sources in the project file. For example I am getting many errors when compiling the stack/SocketCAN/CO_drive.c. Please attached are the screenshots with some errors, simple main program, and very simple Qt project, in case helps. My intention is not actually to use the entire CANOpen stack, just listening the CAN frames messages in the network and be able to parse the frames, for PDO I think understand, I am not feeling too bad, but for SDO is more complicated for me.

Thank you so much for your support

CANopenNode Compiling Error

CANopenNode main program simple

test_canopennode.zip

Thanks

geoffrey-vl commented 4 years ago

Issue also opened in CANopenNode: https://github.com/CANopenNode/CANopenNode/issues/216. For what I understand he fails in building CANopenNode. I guess we should only keep the CANopenNode issue and close this?