Adding new c++ file to project created from Makefile

  • From: "ralphg" < >
  • To:
  • Subject: Adding new c++ file to project created from Makefile
  • Date: Thu, 22 Nov 2012 00:14:23 -0500

I'm new to Netbeans and c++ on Linux (Ubuntu)

I've created some new C++ apps successfully in Netbeans using the option to 
create it from reading the Makefile.

Now having trouble trying to add another .cpp file to the project.  I'm 
guessing that I right click in the Projects browser on the parent directory 
of my source files and selected "Add Existing Item".  Now it shows this new 
file along with the .cpp and .h files already there.

The problem is when trying to run it I'm getting "undefined reference" 
pointing to the object defined in the new file.  It is as if the file is not 
in the project yet.

What am I doing wrong?






Adding new c++ file to project created from Makefile

ralphg 11/22/2012

Adding new c++ file to project created from Makefile

ralphg 11/22/2012

Re: Adding new c++ file to project created from Makefile

Vladimir Kvashin 11/22/2012

Adding new c++ file to project created from Makefile

ralphg 11/23/2012

Re: Adding new c++ file to project created from Makefile

Vladimir Kvashin 11/23/2012

Adding new c++ file to project created from Makefile

ralphg 11/29/2012

Project Features

About this Project

CND was started in November 2009, is owned by DimaZh, and has 131 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close