You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Krasu

Beginner

  • "Krasu" started this thread

Posts: 30

Location: Republic of Belarus

  • Send private message

1

Wednesday, May 11th 2005, 6:18pm

subdirectory & .ui files

I've just added new subdirectory to my project (KDevelop 2.1). I've put some .ui files in it, but 'make' failed. Here is toplevel Makefile.am:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
####### kdevelop will overwrite this part!!! (begin)##########
bin_PROGRAMS = ksquirrel

## INCLUDES were found outside kdevelop specific part

ksquirrel_SOURCES = ...
ksquirrel_LDADD   = ./imageedit_dlg/libimageedit_dlg.a ./imageedit_overlay/libimageedit_overlay.a $(LIB_KIO) $(LIB_KDEPRINT) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) $(LIBSOCKET)

SUBDIRS = imageedit_dlg imageedit_overlay

EXTRA_DIST = ...

# set the include path for X, qt and KDE
INCLUDES= $(all_includes)

METASOURCES = AUTO

# the library search path.
ksquirrel_LDFLAGS = $(all_libraries) $(KDE_RPATH)


And Makefile.am in this subdirectory:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
####### kdevelop will overwrite this part!!! (begin)##########
noinst_LIBRARIES = libimageedit_dlg.a

INCLUDES = $(all_includes)

libimageedit_dlg_a_METASOURCES = AUTO

libimageedit_dlg_a_SOURCES = sq_writeoption.ui sq_imagerotate.ui sq_imageresize.ui sq_imageprint.ui sq_imageeditsplash.ui sq_imageeditoptions.ui sq_imageconvert.ui sq_imagebcg.ui


EXTRA_DIST = sq_imagebcg.ui sq_imagebcg.ui.h sq_imageconvert.ui sq_imageconvert.ui.h sq_imageeditoptions.ui sq_imageeditoptions.ui.h sq_imageeditsplash.ui sq_imageeditsplash.ui.h sq_imageprint.ui sq_imageprint.ui.h sq_imageresize.ui sq_imageresize.ui.h sq_imagerotate.ui sq_imagerotate.ui.h sq_writeoption.ui

####### kdevelop will overwrite this part!!! (end)############


make error:

Source code

1
2
$ make
make: *** No rule to make target `sq_writeoption.o', needed by `libimageedit_dlg.a'.  Stop.


but sq_writeoption.ui exists ... It seemed that ui files in subdirectory are not converted to sources. Why ?

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Thursday, May 12th 2005, 4:17pm

Hmm, good question.

I think in KDevelop2 you could work around that by one time manually converting the .ui files using uic and then adding those .h and .cpp files to the project

Cheers,
_
Qt/KDE Developer
Debian User

Krasu

Beginner

  • "Krasu" started this thread

Posts: 30

Location: Republic of Belarus

  • Send private message

3

Thursday, May 12th 2005, 9:59pm

Heh ... I added some source files in this subdirectory, and now 'make' works ...

sq_fix.h:

Source code

1
2
3
4
5
6
7
#include <qobject.h>

class SQ_Fix : public QObject
{
    public:
        SQ_Fix();
};


sq_fix.cpp:

Source code

1
2
3
4
#include "sq_fix.h"

SQ_Fix::SQ_Fix() : QObject()
{}


If there is no even one c++ source file in subdir, make fails ?(