Re: [glade--]Including header files in Glade



Jeff Mullen wrote:

> I posted this sometime ago to the Glade List. However, since I am generating
> C++ code, it was suggested that I post here...
>
> I have just downloaded Glade and am building a quick text editor to
> get accustomed to the tool. I made a main editor window with a toolbar
> that has FILE-->New File...  and I added a File Selection Dialog to
> the project.

If you use fileselections you should definitely use the CVS version. I did not
release 0.6.2 yet, but 0.5.x does not include full fileselection support.

> Everything compiles fine until I try to include the
> FileSelection.hh file to the mainEditor.cc file in order to create a
> pointer to the File Selection class. When I try to compile this I get
> the following error message
>
> mainEditWin.o: In function `mainEditWin::on_FileMenu_activate(void)':
> ~/Projects/project2/src/mainEditWin.cc:20: undefined reference to
> `fileSelection_glade type_info node'
>
> The curious thing to me is that I haven't added any code to
> on_FileMenu_activate(), I just added the header file.

Just adding the header is enough to let C++ prepare to access the class. Please
complete your new class (provide at least one member function in a .cc file,
include it in the link) and the error should just vanish.

Christof






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