Make error when using $(WorkspacePath) in Project Settings

CodeLite installation/troubleshooting forum
muawijhe
CodeLite Curious
Posts: 5
Joined: Thu Mar 10, 2016 3:17 pm
Genuine User: Yes
IDE Question: C++
Contact:

Make error when using $(WorkspacePath) in Project Settings

Post by muawijhe »

Ehi!

I made a super-simple workspace with two projects:

1. A static C library
2. A console C application

My idea was to verify how the CodeLite handle project dependencies.

I have a few questions:

1. So far, the only dependency handle is regarding the build order... it will be nice to import for example
the output file of a dependent library project (to avoid to mess the Linker options)
2. I'm trying to use the same Output folder for the projects, in particular my structure should be (for Debug):

include folder: $(WorkspacePath)/include
intermediate folder: $(WorkspacePath)/build/Debug
output file: $(WorkspacePath)/build/lib$(ProjectName)D.a

the include folder can be fixed easily with the global settings (see the attachment).
The remaining two settings are instead stopping the building process due to some make error.

C:\WINDOWS\system32\cmd.exe /C mingw32-make -e -f Makefile
"----------Building project:[ staticexample - Debug ]----------"
staticexample.mk:75: *** multiple target patterns. Stop.
mingw32-make: *** [All] Error 2

I do not understand what is wrong in the Makefile to cause this, but I suspect that

1. differentiating the intermediate folder with the output folder will be beneficial for a good IDE
2. it is mandatory that macro (such as $(WorkspacePath)) should work also in project settings
without compromising a simple project like this.


Hope you can help me with this

V.
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Make error when using $(WorkspacePath) in Project Settin

Post by eranif »

staticexample.mk:75: *** multiple target patterns. Stop.
You are trying too hard, why not look at the makefile at line 75 and see whats wrong there?
Also, can you upload this makefile (or copy/paste it here)

Eran
Make sure you have read the HOW TO POST thread
muawijhe
CodeLite Curious
Posts: 5
Joined: Thu Mar 10, 2016 3:17 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Make error when using $(WorkspacePath) in Project Settin

Post by muawijhe »

eranif wrote:
staticexample.mk:75: *** multiple target patterns. Stop.
You are trying too hard, why not look at the makefile at line 75 and see whats wrong there?
Also, can you upload this makefile (or copy/paste it here)

Eran
I'm trying to hard...After 20 years of C/C++ programming, gcc/g++ from bash, a decade with
visual studio and MS compiler... I don't think I'm trying very hard eheheheh

I'm just wondering what is the problem with this IDE since what I'm trying to do is quite simple, isn't it?

Btw please take a look to the makefile.
staticexample.zip
If you need it I can upload the entire workspace folder...

V.
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Make error when using $(WorkspacePath) in Project Settin

Post by eranif »

muawijhe wrote:I'm trying to hard...After 20 years of C/C++ programming, gcc/g++ from bash, a decade with
visual studio and MS compiler... I don't think I'm trying very hard eheheheh
Sounds like I offended you - my apologize, English is not my native language, so sometimes I freely translate phrases from Hebrew into English and this is what I get :)
muawijhe wrote:I'm just wondering what is the problem with this IDE since what I'm trying to do is quite simple, isn't it?
From looking at the Makefile, it looks like that the $(IntermediateDirectory) become a makefile rule. I am not sure how this happened, can you please attach the .project file as well or the entire workspace?

Thanks
Eran
Make sure you have read the HOW TO POST thread
muawijhe
CodeLite Curious
Posts: 5
Joined: Thu Mar 10, 2016 3:17 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Make error when using $(WorkspacePath) in Project Settin

Post by muawijhe »

eranif wrote:
muawijhe wrote:I'm trying to hard...After 20 years of C/C++ programming, gcc/g++ from bash, a decade with
visual studio and MS compiler... I don't think I'm trying very hard eheheheh
Sounds like I offended you - my apologize, English is not my native language, so sometimes I freely translate phrases from Hebrew into English and this is what I get :)
Do not apologize, I'm just mentioned that in order to use a more technical language if necessary ;)

Please take a look to the workspace
CodeLite.zip
Waiting your feedback

best regards,

V.
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Make error when using $(WorkspacePath) in Project Settin

Post by eranif »

strangely, this works on Linux.
I don't have access to Windows machine here, will try it later today.

Some things you might want to try:

- I noticed that you use VC, so why not change the generated makefile to NMake instead of MinGW ? to do this: settings->Build Settings->Build Systems
tbh, I never tried this (this generator was contributed and I never tried it myself :D)

- Updated your MinGW toolchain, I always recommend on TDM-GCC

In any case, I will look into this later on today on a Windows machine

Eran
Make sure you have read the HOW TO POST thread
muawijhe
CodeLite Curious
Posts: 5
Joined: Thu Mar 10, 2016 3:17 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Make error when using $(WorkspacePath) in Project Settin

Post by muawijhe »

eranif wrote:strangely, this works on Linux.
I don't have access to Windows machine here, will try it later today.

Some things you might want to try:

- I noticed that you use VC, so why not change the generated makefile to NMake instead of MinGW ? to do this: settings->Build Settings->Build Systems
tbh, I never tried this (this generator was contributed and I never tried it myself :D)

- Updated your MinGW toolchain, I always recommend on TDM-GCC

In any case, I will look into this later on today on a Windows machine

Eran
I'll try on the Linux machine as well.
BTW, what about the project dependencies? Any possibility to inherit library paths and library object from a dependent project?
muawijhe
CodeLite Curious
Posts: 5
Joined: Thu Mar 10, 2016 3:17 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Make error when using $(WorkspacePath) in Project Settin

Post by muawijhe »

After a similar test on my Ubuntu machine I can confirm that:

1. the project options are working fine
2. the debug works perfectly
3. the support for the unittest-cpp is amazing :D

hope that could help you to shrink the investigation (look at MS systems).


V.
Post Reply