Build problem

CodeLite installation/troubleshooting forum
FFX
CodeLite Curious
Posts: 5
Joined: Fri Nov 05, 2021 12:31 am
Genuine User: Yes
IDE Question: c++
Contact:

Build problem

Post by FFX »

Hi,

I am new to Codelite. I have read the docs about building a program. I am using version 15.0.6. I am using MSYS2 on Windows 10.

When I want to build a program I have written I get the following error:

Code: Select all

C:/msys64/mingw64/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  Makefile
"----------Building project:[ Zaxx - Debug ]----------"
mingw32-make[1]: Entering directory 'C:/Users/recht/Documents/Documents/Zaxx/Zaxx'
A subdirectory or file -p already exists.
Error occurred while processing: -p.
A subdirectory or file ../build-Debug/Zaxx already exists.
Error occurred while processing: ../build-Debug/Zaxx.
mingw32-make[1]: *** [Zaxx.mk:84: MakeIntermediateDirs] Error 1
mingw32-make[1]: *** Waiting for unfinished jobs....
A subdirectory or file -p already exists.
Error occurred while processing: -p.
A subdirectory or file ../build-Debug/Zaxx already exists.
Error occurred while processing: ../build-Debug/Zaxx.
mingw32-make[1]: *** [Zaxx.mk:88: ../build-Debug/Zaxx/.d] Error 1
C:/msys64/mingw64/bin/gcc.exe -c  "C:/Users/recht/Documents/Documents/Zaxx/Zaxx/main.c" -g -O0 -Wall  -o ../build-Debug/Zaxx/main.c.o -I. -I.
mingw32-make: *** [Makefile:5: All] Error 2
mingw32-make[1]: Leaving directory 'C:/Users/recht/Documents/Documents/Zaxx/Zaxx'
=== build completed successfully (0 errors, 0 warnings) ===

I don't know what the problem is. Can someone help me out?

Thanks,

Ben

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

Re: Build problem

Post by eranif »

could you upload the generate Makefile? (PROJECT_NAME.mk)

Make sure you have read the HOW TO POST thread
FFX
CodeLite Curious
Posts: 5
Joined: Fri Nov 05, 2021 12:31 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Build problem

Post by FFX »

When I try that, the board software returns the message:

Code: Select all

Error: Invalid file extension: Zaxx.mk

But I get the -p error with all the projects I create.

Thanks

DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Build problem

Post by DavidGH »

You could try zipping it. I just tried a .zip and it worked for me.

Last edited by DavidGH on Fri Nov 05, 2021 2:13 am, edited 2 times in total.
Reason: Test
FFX
CodeLite Curious
Posts: 5
Joined: Fri Nov 05, 2021 12:31 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Build problem

Post by FFX »

Done

You do not have the required permissions to view the files attached to this post.
FFX
CodeLite Curious
Posts: 5
Joined: Fri Nov 05, 2021 12:31 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Build problem

Post by FFX »

Also, I never have the option to compile my files.

Thanks

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

Re: Build problem

Post by eranif »

This line in your Makefile:

Code: Select all

@mkdir -p "../build-$(ConfigurationName)/Zaxx"

suggests that you are using the non standard Makefile generator (i.e. you are forcing CodeLite to generate UNIX compatible Makefiles while your toolchain is using native Windows)

Can you confirm this?

To do this:

right click your project (the blue folder on the tree view) -> settings -> general -> Makefile Generator

My guess is that it is set to CodeLite Makefile Generator - UNIX, while it should be set to CodeLite Makefile Generator

EDIT:

I run CodeLite with clean setup and it seems that if your compiler is MSYS based, CodeLite will suggest you to switch to the UNIX generator
I am guessing that this what happened in your case: a wrong suggestion from CodeLite

EDIT 2:

This is now fixed.
https://github.com/eranif/codelite/comm ... 542143c400

Make sure you have read the HOW TO POST thread
FFX
CodeLite Curious
Posts: 5
Joined: Fri Nov 05, 2021 12:31 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Build problem

Post by FFX »

Sorry for the late response, but you were right. CodeLite Makefile Generator - UNIX was set instead of CodeLite Makefile Generator. By changing the value to CodeLite Makefile Generator the problem was solved.

Thanks,

Ben

Post Reply