[CMake] using arm toolchain and having issues with linux socket can

Gunter, Walter E Walter.Gunter at dematic.com
Fri Sep 16 19:00:51 EDT 2016


Okay, so temporarily, to get it to compile, I did this in my mycan.c

#ifndef PF_CAN
#define PF_CAN 29
#endif

#ifndef AF_CAN
#define AF_CAN PF_CAN
#endit

Doesn't seem ideal, but I tried it.  I got past that part, and now on to something I have seen before:

[ 68%] Linking CXX executable enterprise
arm-none-linux-gnueabi-g++: CMakeFiles/enterprise.dir/..o: No such file or directory

What does that mean?

-----Original Message-----
From: Rolf Eike Beer [mailto:eike at sf-mail.de] 
Sent: Friday, September 16, 2016 4:21 PM
To: cmake at cmake.org
Cc: Gunter, Walter E
Subject: Re: [CMake] using arm toolchain and having issues with linux socket can

Am Freitag, 16. September 2016, 22:13:14 schrieb Gunter, Walter E:
> So, now that I am rocking and rolling using the correct toolchain, I 
> am stuck with a failed compile.
 
> error: 'PF_CAN' was not declared in this scope
> 
> Does this mean it can’t find the header file?  I am just implementing 
> the CAN interface; nothing complex.

If it would not find linux/can.h it would tell you. It does not find the define, which means it actually can include linux/can.h. And this makes sense, as PF_CAN is in indirectly in sys/socket.h, so you should (also) include that.

Eike


More information about the CMake mailing list