Just another problem: the linker command is malconfigured. I replaced the source file with chrono_IRR_assets.cpp and expected to build the app, but the linker command fails:
[2/2] Linking CXX executable myexe.app/Contents/MacOS/myexe FAILED: myexe.app/Contents/MacOS/myexe : && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ --std=c++11 -I/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3 -I/opt/homebrew/include/irrlicht -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -framework Cocoa -framework OpenGL -framework IOKit -framework Cocoa *OpenGL IOKit* -L/Users/rainerge/Soft/Entwicklung/Chrono8/build-chrono/lib CMakeFiles/myexe.dir/my_example.cpp.o -o myexe.app/Contents/MacOS/myexe /opt/homebrew/lib/libomp.dylib /opt/homebrew/lib/libIrrlicht.dylib && : clang: error: no such file or directory: 'OpenGL' clang: error: no such file or directory: 'IOKit' ninja: build stopped: subcommand failed. (yes I changed to cmake -G Ninja) [email protected] schrieb am Sonntag, 24. April 2022 um 17:12:27 UTC+2: > Hi Younghwa and Radu, > > I am using a M1 Mac to and ran into the same problems. The eigen-related > errors ca be avoided, if we provide a search path for it and for irrlicht > like: > rm -rf build > cmake -S template_project -B build \ > -DChrono_DIR:PATH="$HOME/Soft/Entwicklung/Chrono8/build-chrono/cmake" \ > -DCMAKE_CXX_FLAGS:STRING="--std=c++11 > -I/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3 > -I/opt/homebrew/include/irrlicht" > cmake --build build > > This will take us to the next error: > > -- Configuring done > > -- Generating done > > -- Build files have been written to: /Volumes/Ramdisk/build > > [ 50%] Building CXX object CMakeFiles/myexe.dir/my_example.cpp.o > > */Volumes/Ramdisk/template_project/my_example.cpp:20:10: **fatal error: > **'chrono/assets/ChColorAsset.h' > file not found* > > #include "chrono/assets/ChColorAsset.h" > > * ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~* > > 1 error generated. > That means, the example code has to be change to the new asset system. > > Younghwa Park schrieb am Donnerstag, 21. April 2022 um 15:39:28 UTC+2: > >> >> The version is Eigen 3.4.0_1 using brew. >> Demo file are working without problem. >> On Thursday, April 21, 2022 at 2:22:04 PM UTC+2 Radu Serban wrote: >> >>> I do not have access to a Mac to check this, but first question that >>> pops to mind is: what version of Eigen do you use? >>> >>> --Radu >>> >>> >>> >>> *From:* [email protected] <[email protected]> *On >>> Behalf Of *Younghwa Park >>> *Sent:* Thursday, April 21, 2022 12:03 PM >>> *To:* ProjectChrono <[email protected]> >>> *Subject:* [chrono] Parsing error of template_prject on Mac >>> >>> >>> >>> Hi, >>> >>> I have trouble on executing template_project. >>> >>> My environment is Apple M1, Chrono 7.0.3. >>> >>> When I compile the example, ChMatrix.h has parse issue. >>> >>> These file are locked not to modify. >>> >>> Is there missing during cmake build setting, compile setting ? >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "ProjectChrono" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/projectchrono/8dbe157e-3a8c-4841-a8e9-0d0d381df7e3n%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/projectchrono/8dbe157e-3a8c-4841-a8e9-0d0d381df7e3n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/64dd67e5-39e9-4f72-b76d-f106e9a67d2bn%40googlegroups.com.
