Page 1 of 1

Build problem

Posted: Fri Nov 05, 2021 12:55 am
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


Re: Build problem

Posted: Fri Nov 05, 2021 1:39 am
by eranif

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


Re: Build problem

Posted: Fri Nov 05, 2021 2:04 am
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


Re: Build problem

Posted: Fri Nov 05, 2021 2:12 am
by DavidGH

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


Re: Build problem

Posted: Fri Nov 05, 2021 2:16 am
by FFX

Done


Re: Build problem

Posted: Fri Nov 05, 2021 2:34 am
by FFX

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

Thanks


Re: Build problem

Posted: Fri Nov 05, 2021 12:08 pm
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


Re: Build problem

Posted: Fri Nov 05, 2021 12:55 pm
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