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

2016-09-16 Thread Gunter, Walter E
Ah..got ya. There are two in my toolchain: Sys/socket.h Linux/socket.h I couldn't find AF_CAN or PF_CAN defined in the sys one, but it is in the linux. I included it, but still getting the error when building that it can't find it. -Original Message- From: Rolf Eike Beer [mailto:e...@sf

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

2016-09-16 Thread Gunter, Walter E
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 enterpri

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

2016-09-16 Thread Rolf Eike Beer
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 t

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

2016-09-16 Thread 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. Here is my file… Mycan.c #include Wal

Re: [CMake] is it worth using cmake to cross-compile for embedded arm device?

2016-09-16 Thread Gunter, Walter E
Okay…that made a huge difference. Just moving those set commands to a separate toolchain.cmake file worked. Even though the commands were the same, and I had the CMAKE_FIND_ROOT_PATH at the top of the toplevel CMakeLists.txt before project: # where is the target environment set(CMAKE_FIND_ROOT

Re: [CMake] is it worth using cmake to cross-compile for embedded arm device?

2016-09-16 Thread Rolf Eike Beer
Gunter, Walter E wrote: > I am having some troubles getting cmake setup and wonder if cmake is the > right tool. > Thoughts? Suggestions? Yes, it is. I do it basically every day. Read my advise and properly set up a toolchain file, that is very likely the missing magic. https://cmake.org/cmake/h

Re: [CMake] cross-compiling for arm

2016-09-16 Thread Rolf Eike Beer
Gunter, Walter E wrote: > I setup the Main CMakeLists.txt to cross_compile using an arm toolchain: > > cmake_minimum_required(VERSION 3.2) > > project(enterprise CXX) > > set(CMAKE_SYSTEM_NAME Linux) > set(CMAKE_CXX_COMPILER > /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-g++) > set(CMAK

[CMake] is it worth using cmake to cross-compile for embedded arm device?

2016-09-16 Thread Gunter, Walter E
I am having some troubles getting cmake setup and wonder if cmake is the right tool. Thoughts? Suggestions? Walter E. Gunter, Jr. Mechatronics Engineer/Roboticist AGV R&D Dematic North America 265 S 5200 W Salt Lake City, UT 84104 801.715.2602 Customer Service 1.800.530.9153 DEMATIC l We Optimi

[CMake] cross-compiling for embedded device running linux, how to include linux headers

2016-09-16 Thread Gunter, Walter E
I am referencing some includes that are part of my embedded device toolchain, #include If I have setup the cross compile directory correctly, does it know about these or do I need to make it known? if so, what’ the best approach? Current Main CMakeLists.txt cmake_minimum_required(VERSION 3.2)

Re: [CMake] cross-compiling for arm

2016-09-16 Thread Gunter, Walter E
I setup the Main CMakeLists.txt to cross_compile using an arm toolchain: cmake_minimum_required(VERSION 3.2) project(enterprise CXX) set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_CXX_COMPILER /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-g++) set(CMAKE_SYSTEM_PROCESSOR arm) set(CMAKE_AR /opt/

Re: [CMake] after running cmake, getting an error cannot find -levent

2016-09-16 Thread Gunter, Walter E
Okay. I made some changes to my cmake and am getting different errors, but still make me think I am not cross compiling: Should those be my cross compile toolchain instead of /usr/bin/c++ ?? -- The CXX compiler identification is GNU 5.4.0 -- Check for working CXX compiler: /usr/bin/c++ -- Check

[CMake] default generator officially supported?

2016-09-16 Thread Martin Weber
Hi, in [1] some pointed out that cmake seems to have a notion of _default genrator_, that is: If you invoke cmake without the -D option, it chose a generator depending on the platform and create the build scripts. Is this nice feature officially supported by cmake? I could not find it document

Re: [CMake] after running cmake, getting an error cannot find -levent

2016-09-16 Thread Marcel Loose
Hi Walter, The dash before levent looks different from the ones before lrt and lpthread. Are you sure it's not some kind of Unicode character? Cheers, Marcel Loose. On 15/09/16 18:56, Gunter, Walter E wrote: > > I am cross-compiling for an arm, and can run cmake successfully, but > when I run m