# Setting up a C++ project

**URL:** <https://discuss.gradle.org/t/setting-up-a-c-project/44971>\
**Category:** Help/Discuss\
**Created:** [February 22, 2023, 7:36pm UTC](https://discuss.gradle.org/t/setting-up-a-c-project/44971 "2023-02-22T19:36:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![White-Fox](https://avatars.discourse-cdn.com/v4/letter/w/9dc877/32.png) [@White-Fox](https://discuss.gradle.org/u/White-Fox)\
**Post date:** [February 22, 2023, 7:36pm UTC](https://discuss.gradle.org/t/setting-up-a-c-project/44971/1 "2023-02-22T19:36:38Z")

</div>

Hi guys  
I try to set up a C++ project for windows, and get some unexpected problems.

At my first try, I have just cygwin and MinGW installed, a gcc --version returned with the expected version information, gpp did also.  
But if I tried gradle run command after the init process, gradle states that there is no gcc compiler.

The next try with the native build plugin was also successless.

I also read about to set up a C++ project with Visual Studio plugin, so I installed VS but found no gradle related plugin.

Today I did the next try and initialized a C++ project with gradle again. Now I do not get a message about missed gcc, and get a green build successful message after a gradle run command. But there is nothing in the build/exe-directory, except a folder test. I expected also to see “Hellow World” standard phrase in the power shell prompt, but I don’t get it.

Does anyone have an idea?

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [February 23, 2023, 2:53am UTC](https://discuss.gradle.org/t/setting-up-a-c-project/44971/2 "2023-02-23T02:53:11Z")

</div>

I would recommend you have a look at [https://nokee.dev/](https://nokee.dev/)

---

<div class="post-metadata">

**Author:** ![White-Fox](https://avatars.discourse-cdn.com/v4/letter/w/9dc877/32.png) [@White-Fox](https://discuss.gradle.org/u/White-Fox)\
**Post date:** [February 23, 2023, 5:49pm UTC](https://discuss.gradle.org/t/setting-up-a-c-project/44971/3 "2023-02-23T17:49:19Z")

</div>

I also tried this.

I tried it now again. I have no idea what I do different the last time, but now I get an executable. Unfortunately, I see only a window which appears immediatly, even I start it from powershell and command prompt.  
Is there an other way to run a programm without closing immediatly?

---

<div class="post-metadata">

**Author:** ![White-Fox](https://avatars.discourse-cdn.com/v4/letter/w/9dc877/32.png) [@White-Fox](https://discuss.gradle.org/u/White-Fox)\
**Post date:** [March 4, 2023, 9:28pm UTC](https://discuss.gradle.org/t/setting-up-a-c-project/44971/4 "2023-03-04T21:28:56Z")

</div>

Sorry for that late reply, I get it now running.

As I said before, I have no idea why it doesn’t work on my first try. I also have no idea why my simple Hello-World-Window expires immediatly after the program is finished, but as I just want to verify that my gradle stuff runs properly, I have now what I need. After some days, I work on it again, just simply added a user input request (dirty hack, I know…).

The nokee-plugin and gradle makes it easy, very good tools.
