Newbie -- can't add file to C/C++ project [message #217713] |
Mon, 23 June 2008 18:01  |
Eclipse User |
|
|
|
Originally posted by: rball.zilog.com
I'm an Eclipse newbie, with what I assume is a very basic question. I've
inherited an Eclipse C/C++ project and would like to add a new source code
file. I used File > New > Source File and File > New > Header File to
create new files LCD_Draw.h and LCD_Draw.c. After typing code into those
files, I saved them and the asterisk went away; they are both listed in
the Project view for this project, and *seem* to be "in" the project now.
But when I try to call a function WriteDemoText() which is defined in
these files from inside main.c, I get the error message:
/cygdrive/c/Program Files/ZiLOG/BSP_2.0.0/No_OS_Test/main.c:165: undefined
reference to `WriteDemoText'
Also, there's no object file LCD_Draw.o created by the build, and when I
look at the makefile, there is no entry for how to build such an object
file, nor is it listed among the OBJECTS in the makefile.
Having inherited this project, I'm not sure if it's a "Managed Make" or
"Standard" project. I've been assuming the former since Project >
Properties . Builders indicates CDT Makefile Builder as one of the
Builders. I assume that means that the makefile is auto-generated by the
CDT Makefile Builder, but I could be wrong.
My questions, then, are: how can I tell if this project is a Managed Make
project or a Standard project? If it is a Managed Make project in which
the makefile is auto-generated, what do I have to do to get this new
module added to the list of things that must be made when the project is
built?
Thanks,
Roger
|
|
|
|
Re: Newbie -- can't add file to C/C++ project [message #217746 is a reply to message #217723] |
Tue, 24 June 2008 14:40  |
Eclipse User |
|
|
|
Originally posted by: rball.zilog.com
Hi Robert,
Thanks for your message. Yes, I think you are right; I had concluded from
a couple of other indications that this project doesn't do automated
makefile generation. However, I don't quite see the interface that you're
describing. When I go to Project > Properties, I don't have a selection
called "C/C++ Build". I do have one called "Builders", which includes an
item "CDT Makefile Builder", which IS checked; that's what made me
originally think this was an automatic-makefile project. Then there's
another screen called "C/C++ Make Project", but there's nothing there so
straightforward as a check box for "generate makefile automatically".
I'm running Eclipse version 3.3.2, build M20080221-1800. Is this a
different version from yours?
Thanks,
Roger
|
|
|
Powered by
FUDForum. Page generated in 0.03750 seconds