PATH for makefile and main.c [message #1856829] |
Wed, 04 January 2023 20:59 |
Me My Messages: 3 Registered: January 2023 |
Junior Member |
|
|
Eclipse doesn't see the files main.c and makefile
without explicit definition of the full path to these files.
I illustrated the question by video (audio off): https://youtu.be/-ioKBtEuTTA
I try to build a simplest project with only 'main.c' and 'makefile' using 'Build command' mingw32-make.exe .
My project path is D:\a\
The files main.c and makefile are placed also here.
But Eclipse doesn't see these files.
Now to correctly Build the project I use
Build command: mingw32-make (it's path is placed in Windows global PATH for search)
Build argument: -f D:\a\makefile
and
the path D:\a\ in makefile for main.c, for example;
main.o: D:\a\main.c
gcc -O0 -g3 -Wall -c D:\a\main.c
IDE doesn't search main.c and makefile even in workspace path.
QUESTION: where I must define this path (D:\a\)?
If in C/C++ Build \ Environment, is it correct to create new variable (not add the path to the 'PATH' variable)? How to use such new variabe?
Or may be there is somewhere a checkbox to provide search in workspace path?
[Updated on: Sat, 07 January 2023 16:10] Report message to a moderator
|
|
|
Re: PATH for makefile and main.c [message #1856897 is a reply to message #1856829] |
Sat, 07 January 2023 21:50 |
Me My Messages: 3 Registered: January 2023 |
Junior Member |
|
|
The question is solved.
On project create one must select the Configuration: Debug and Release should be selected or one of them. If neither Debug, nor Release are selected, the buttons Next and Finish are not active.
So, if one deselects the property Generate Makefiles Automatically and if Debug only or Debug and Release are selected, the folder \Debug is added to Build directory to the Properties \ C/C++ Build : ${workspace_loc/<Your dir for project>}/Debug; if only Release is selected the Build directory is ${workspace_loc/<Your dir for project>}/Release (see the video, 0:44, 2:27).
The IDE tries to search Your project files in \Debug or in \Release directiries.
One must click Workspace button under Build directory control then select project directory. This action defines the path to the files in project for IDE.
[Updated on: Sat, 07 January 2023 21:56] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03383 seconds