Re: undefined reference ! Help !



On 3/27/07, schmirrwurst free fr <schmirrwurst free fr> wrote:
I've try to click on "add to project" in anjuta, but I had a message
that is is already in the target..

But I had a look in Makefile, and it seems to be missing ? :
gparted_SOURCES = \
        Device.cc                       \
        Dialog_Base_Partition.cc        \
        Dialog_Disklabel.cc             \
        Dialog_Partition_Copy.cc        \
        Dialog_Partition_Info.cc        \
        Dialog_Partition_New.cc         \
        Dialog_Partition_Resize_Move.cc \
        Dialog_Progress.cc              \
        DialogFeatures.cc               \
        DialogManageFlags.cc            \
        DrawingAreaVisualDisk.cc        \
        FileSystem.cc                   \
        Frame_Resizer_Base.cc           \
        Frame_Resizer_Extended.cc       \
        GParted_Core.cc                 \
        HBoxOperations.cc               \
        Operation.cc                    \
        OperationCopy.cc                \
        OperationCheck.cc               \
        OperationCreate.cc              \
        OperationDelete.cc              \
        OperationDetail.cc              \
        OperationFormat.cc              \
        OperationResizeMove.cc          \
        Partition.cc                    \
        TreeView_Detail.cc              \
        Utils.cc                        \
        Win_GParted.cc                  \
        ext2.cc                         \
        ext3.cc                         \
        fat16.cc                        \
        fat32.cc                        \
        hfs.cc                          \
        hfsplus.cc                      \
        jfs.cc                          \
        linux_swap.cc                   \
        main.cc                         \
        ntfs.cc                         \
        reiser4.cc                      \
        reiserfs.cc                     \
        ufs.cc                          \
        xfs.cc

How can I add it properly ?

Is it possible with anjuta ? I try another time with the menu :
project>add source file , and I've selected the target "gparted", and
again, "already in target" !
I've run configure, and looked in Makefile, again no
"DIalog_make_image.cc" !



Le mardi 27 mars 2007 à 07:42 -0500, Paul Davis a écrit :
> On 3/27/07, schmirrwurst free fr <schmirrwurst free fr> wrote:
> > Hi,
> > I'm  pretty new, and I'm trying to add some functionality to gparted...
> > By compiling I get an error, it seems that my function is not properly
> > declared, but I can't find the mistake ! Can somebody help me ?
> >
> >       * Here is the error message :
> >       * -------------------------------------------------------------------------
> > Win_GParted.o: In function
> > `GParted::Win_GParted::activate_make_image()':
> > /home/wsb/Projects/gparted/src/Win_GParted.cc:1799: undefined reference
> > to `GParted::Dialog_Make_Image::Dialog_Make_Image(GParted::Partition
> > const&)'
> > collect2: ld returned 1 exit status
> >       * ---------------------------------------------------------------------------
> >       * Here is the function in Win_GParted.cc
> >       * ---------------------------------------------------------------------------
> > void Win_GParted::activate_make_image()
> > {
> >         get_window() ->set_cursor( Gdk::Cursor( Gdk::WATCH ) ) ;
> >         while ( Gtk::Main::events_pending() )
> >                 Gtk::Main::iteration() ;
> >
> >         Dialog_Make_Image dialog( selected_partition ) ; //line 1799
> >         dialog .set_transient_for( *this ) ;
> >         /*dialog .signal_get_flags .connect(
> >                 sigc::mem_fun( &gparted_core, &GParted_Core::get_available_flags ) ) ;
> >         dialog .signal_toggle_flag .connect(
> >                 sigc::mem_fun( &gparted_core, &GParted_Core::toggle_flag ) ) ;
> >         */
> >         get_window() ->set_cursor() ;
> >
> >         dialog .run() ;
> >         dialog .hide() ;
> >
> > }
> >       * ---------------------------------------------------------------------------
> >       * Here is Dialog_make_image.h :
> >       * ---------------------------------------------------------------------------
> > Here is Dialog_make_image.h :
> > #ifndef DIALOG_MAKE_IMAGE_H
> > #define DIALOG_MAKE_IMAGE_H
> >
> > #include "../include/Partition.h"
> >
> > #include <gtkmm/dialog.h>
> > #include <gtkmm/treeview.h>
> > #include <gtkmm/liststore.h>
> >
> > namespace GParted
> > {
> >
> > class Dialog_Make_Image : public Gtk::Dialog
> > {
> > public:
> >         Dialog_Make_Image( const Partition & partition );
> >
> >         sigc::signal< std::map<Glib::ustring, bool>, const Partition & >
> > signal_get_flags ;
> >
> > sigc::signal< bool, const Partition &, const Glib::ustring &,
> > bool > signal_toggle_flag ;
> >
> > private:
> >         Partition partition ;
> > };//class
> >
> > } //GParted
> >
> >
> > #endif //DIALOG_MAKE_IMAGE_H
> >       * ---------------------------------------------------------------------------
> >       * Here is Dialog_make_image.cc :
> >       * ---------------------------------------------------------------------------
> > #include "../include/Dialog_Make_Image.h"
> >
> > #include <gtkmm/main.h>
> > #include <gtkmm/stock.h>
> > #include <gdkmm/cursor.h>
> >
> > namespace GParted
> > {
> >
> > Dialog_Make_Image::Dialog_Make_Image( const Partition & partition )
> > {
> >         set_title( String::ucompose( _("Make an image from partition %1"),
> > partition .get_path() ) );
> >         set_has_separator( false ) ;
> >         set_resizable( true ) ;
> >
> >         Glib::ustring str_temp = "<span weight=\"bold\" size=\"larger\">" ;
> >         str_temp += String::ucompose( _("Choose target image file for the %1
> > backup"), partition .get_path() ) ;
> >         str_temp += "</span>\n" ;
> >         get_vbox() ->pack_start( * Utils::mk_label( str_temp ),
> > Gtk::PACK_SHRINK );
> >
> >         add_button( Gtk::Stock::CLOSE, Gtk::RESPONSE_OK ) ->grab_focus() ;
> >
> >         show_all_children() ;
> >         this ->partition = partition ;
> >
> > } //class
> >
> > }//gparted
> >
> > _______________________________________________
> > gtkmm-list mailing list
> > gtkmm-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gtkmm-list
> >
>
> I'm just guessing, but did you create a new source file and forget to
> add it to the list of files that needs to be compiled and linked in
> the build script?
>
> Paul Davis



You'd probably have better luck asking about this on an anjuta
specific list.  My guess is that there's probably a 'regnerate build
system' button somewhere.

If you're not having any luck, I'd close anjuta. Add the source file
by hand to the Makefile.am (I believe it is...) and run automake or
whatever it is that regenerates the Makefile.in files I think.

Its been quite a long time since I've actually tried using autotools
as a build system, so that last paragraph may or may not make sense.

I do realize you're working with an existing project, but for future
reference you should check out SCons.  Its my build tool of choice and
I have to be a zealot whenever build systems are mentioned...

HTH,
Paul Davis



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]