CMake Error: Could not create named generator MinGW Makefile

General questions regarding the usage of CodeLite
hptphuong
CodeLite Curious
Posts: 8
Joined: Mon May 29, 2017 1:18 pm
Genuine User: Yes
IDE Question: PHP
Contact:

CMake Error: Could not create named generator MinGW Makefile

Post by hptphuong »

Hi all,

I want to create a project with cmake generator.

But when i create new project with cmake by codelite and "run cmake", i have the issue "CMake Error: Could not create named generator MinGW Makefiles".

I already install MinGW64 in my lap. But it's not solve.

Please let me know how to fix this problem.

One more question , how to modify ' -G"MinGW Makefiles" ' ( default variable when "run cmake").

Thanks & Best Regards,

Jame
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CMake Error: Could not create named generator MinGW Make

Post by eranif »

You need to provide a new generator in the project settings.
Open your project settings->general->build->Makefile generator->Arguments, set the generator you want (e.g. -G"Unix Makefiles")
cmake-settings.png
You do not have the required permissions to view the files attached to this post.
Make sure you have read the HOW TO POST thread
hptphuong
CodeLite Curious
Posts: 8
Joined: Mon May 29, 2017 1:18 pm
Genuine User: Yes
IDE Question: PHP
Contact:

Re: CMake Error: Could not create named generator MinGW Make

Post by hptphuong »

I tried as your said.
But if i add directly to argument, it becomes like that

Code: Select all

-G"MinGW Makefiles" -G"Unix Makefiles"
It's not effect.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CMake Error: Could not create named generator MinGW Make

Post by eranif »

Can you post the build log? (see my signature)
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CMake Error: Could not create named generator MinGW Make

Post by eranif »

This looks like a bug in CodeLite.
However, if you add in the "Arguments" field (NOTICE the space before the -G):

Code: Select all

 -G"Unix Makefiles"
- it will use a different generator

EDIT:
I have fixed the extra space needed bug in git master

EDIT2:
You really need to ask yourself, how come CMake does not know MinGW generator... it should be enabled by default on Windows (unless you are running in some kind of Unix emulator etc)
Make sure you have read the HOW TO POST thread
Post Reply