CMake error when running example_kinetics
- Camille Frayssinhes
- Posts: 13
- Joined: Thu Nov 16, 2023 9:42 am
CMake error when running example_kinetics
Good afternoon,
I am trying to run the example_kinetics file on Windows, but I have the following CMake error that I don't understand how to solve. I followed the instructions of the README file on github. Could you help me resolve the problem please?
Thank you for your help!
Best,
Camille
I am trying to run the example_kinetics file on Windows, but I have the following CMake error that I don't understand how to solve. I followed the instructions of the README file on github. Could you help me resolve the problem please?
Thank you for your help!
Best,
Camille
- Attachments
-
- example_kinetics_error.png (247.17 KiB) Viewed 2161 times
- Antoine Falisse
- Posts: 438
- Joined: Wed Jan 07, 2015 2:21 am
Re: CMake error when running example_kinetics
Hi,
Did you install Visal Studio? Looks like your default generator is different from what the code expects.
Best,
Antoine
Did you install Visal Studio? Looks like your default generator is different from what the code expects.
Best,
Antoine
- Camille Frayssinhes
- Posts: 13
- Joined: Thu Nov 16, 2023 9:42 am
Re: CMake error when running example_kinetics
No, I'm not running the code through visual studio. I installed Anaconda, and I'm running the code through the Anaconda command prompt.
- Camille Frayssinhes
- Posts: 13
- Joined: Thu Nov 16, 2023 9:42 am
Re: CMake error when running example_kinetics
Actually I just downloaded visual studio 2022 community version.
But, I still have the same error.
After downloading VS, should I run the code through the anaconda prompt or through VS?
But, I still have the same error.
After downloading VS, should I run the code through the anaconda prompt or through VS?
- Antoine Falisse
- Posts: 438
- Joined: Wed Jan 07, 2015 2:21 am
Re: CMake error when running example_kinetics
Hi, Through the anaconda prompt. Did you install the C++ extension when installing visual studio 2022 community?
- Camille Frayssinhes
- Posts: 13
- Joined: Thu Nov 16, 2023 9:42 am
Re: CMake error when running example_kinetics
Okay. So even after installing Anaconda with the C++ extension, I still ran through the same exact error than above!
- Scott Uhlrich
- Posts: 124
- Joined: Tue Jan 20, 2015 4:29 pm
Re: CMake error when running example_kinetics
Anaconda or Visual Studio with C++?
- Camille Frayssinhes
- Posts: 13
- Joined: Thu Nov 16, 2023 9:42 am
Re: CMake error when running example_kinetics
Sorry. Even after having installed VS with the C++ extension, and running the example_kinetics.py through the Anaconda prompt, I still have the same error.
- Camille Frayssinhes
- Posts: 13
- Joined: Thu Nov 16, 2023 9:42 am
Re: CMake error when running example_kinetics
Do I have to make any change to this CMakeLists.txt file?
- Attachments
-
- Screenshot 2024-01-05 at 15.51.05.png (323.92 KiB) Viewed 2048 times
- Antoine Falisse
- Posts: 438
- Joined: Wed Jan 07, 2015 2:21 am
Re: CMake error when running example_kinetics
I think what is going on is that the wrong generator is being used.
ChatGPT:
NMake Makefiles is one of the generators that can be used with CMake. When you run CMake, you can specify a generator, which is essentially a set of instructions used by CMake to create files for a specific build system. The generator determines how the build process is managed. If you're working on Windows and specifically with Visual Studio, you would typically use a Visual Studio generator rather than NMake, because Visual Studio has its own build system integrated into the IDE.
What we can do is specify the generator directly in the cmake command:
You can add -G "Visual Studio 17 2022" in the commands here https://github.com/stanfordnmbl/opencap ... D.py#L1706 and here https://github.com/stanfordnmbl/opencap ... D.py#L1799 This should force using Visual Studio
Keep us posted,
Antoine
ChatGPT:
NMake Makefiles is one of the generators that can be used with CMake. When you run CMake, you can specify a generator, which is essentially a set of instructions used by CMake to create files for a specific build system. The generator determines how the build process is managed. If you're working on Windows and specifically with Visual Studio, you would typically use a Visual Studio generator rather than NMake, because Visual Studio has its own build system integrated into the IDE.
What we can do is specify the generator directly in the cmake command:
You can add -G "Visual Studio 17 2022" in the commands here https://github.com/stanfordnmbl/opencap ... D.py#L1706 and here https://github.com/stanfordnmbl/opencap ... D.py#L1799 This should force using Visual Studio
Keep us posted,
Antoine