Radu, Thanks a lot for pointing me to the solution. I was able to get past the macro errors and get my project running.
Sincerely, Shubhankar On Sunday, July 3, 2022 at 4:11:59 AM UTC-4 Radu Serban wrote: > Shubhankar, > > > > I suspect the problem is that you are setting the compiler flags listed in > the variable CHRONO_CXX_FLAGS using obsolete CMake syntax. Take a look at: > https://github.com/projectchrono/chrono/blob/develop/CHANGELOG.md#changed-cmake-project-configuration-script > > and make sure your CMakeLists.txt uses *target_compile_options* to set > the C++ flags for your project, just like it’s done in the latest version > of the code for the template_project > <https://github.com/projectchrono/chrono/blob/2f37fc6ec5f0764b28f87436728038e6af688d88/template_project/CMakeLists.txt#L141> > > example. > > > > If this does not fix your problem, please provide more details: > > - Which version of Chrono you are working with > - What version of CMake you have > - What compiler version you have > > And attach the CMakeLists.txt file for your project. > > > > --Radu > > *From:* [email protected] <[email protected]> *On > Behalf Of *Shubhankar Kulkarni > *Sent:* Sunday, July 3, 2022 2:23 AM > *To:* ProjectChrono <[email protected]> > *Subject:* [chrono] Custom Project Macro definition error > > > > Hello, > > I am trying to implement a custom project using the tutorial steps > enlisted. When I generate my project after giving the source, build and > Chrono_DIR, I notice that the values of the CXX flags and C flags are as > follows > > CHRONO_CXX_FLAGS (Compiler flags): > /DWIN32;/D_WINDOWS;/W3;/GR;/EHsc;-openmp;/arch:AVX2;/arch:AVX;/Zc:__cplusplus;/wd4275 > > CHRONO_C_FLAGS (Compiler flags): > /DWIN32;/D_WINDOWS;/W3;-openmp;/arch:AVX2;/arch:AVX;;/wd4275 > > these are getting generated from the ChronoConfig.cmake or > ChronoConfig.cmake.install I suppose. > > > > However when I load my solution and my project in VS, I'm seeing this > error of command-line error:invalid macro definition (refer attachment > below). Unable to resolve it. > > > > Thanks, > > Shubhankar > > -- > 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/de72a4f4-bf93-4026-a788-9991ddb88857n%40googlegroups.com > > <https://groups.google.com/d/msgid/projectchrono/de72a4f4-bf93-4026-a788-9991ddb88857n%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/adbb8ccb-2c04-4fbe-9e2f-bd450f10e5e6n%40googlegroups.com.
