Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Custom Build Step not firing
Custom Build Step not firing [message #222335] Tue, 19 August 2008 12:57 Go to next message
Eclipse UserFriend
Originally posted by: alan_krzywicki.avid.com

I've setup a custom build step associated with a header file and I never
see the build step run.

I'm building a project with QT and need to use the QT MOC command to
create an associated file. I did actually have this working, then I need
to setup the project again, so I re-imported the exiting project into a
new one.

For the custom build step I have it set to "Apply Custom Build Step .... "
the "Additional Input file name(s)" is blank
the "Output file name(s)" is blank
the command line appears to be setup as necessary, see makefile below
and I have some text in the Description field.

When rebuild the project I never see the text from the Description field,
and the output file is not created. I tried the verbose switch and I
still do not see any custom build step actions. It is as if it is being
completely ignored. The same is true if run the makefile directly.

Here is a copy of the makefile, the custom build step is at the bottom.
(Eclipse platform 3.4, C++ CDT 5.0)


# Add inputs and outputs from these tool invocations to the build
variables
CPP_SRCS += \
../TestQT.cpp \
../main.cpp

OBJS += \
/TestQT.o \
/main.o

CPP_DEPS += \
/TestQT.d \
/main.d


# Each subdirectory must supply rules for building sources it contributes
%.o: ../%.cpp
@echo 'Building file: $<'
@echo 'Invoking: GCC C++ Compiler'
g++ -D__APPLE__ -I/usr/local/Trolltech/Qt-4.4.1/include -O0 -g3 -Wall -c
-fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<"
@echo 'Finished building: $<'
@echo ' '

: ../TestQT.h ../${ProjDirPath}/TestQT.h
@echo 'Building file: $<'
@echo 'Create MOC file from TestQt.h'
/usr/local/Trolltech/Qt-4.4.1/bin/moc
/Users/krzy/Projects/Learning/Eclipse1/TestQT.h -o
/Users/krzy/Projects/Learning/Eclipse1/Qt_moc_files/TestQT_m oc.cpp
@echo 'Finished building: $<'
@echo ' '
Re: Custom Build Step not firing [message #222353 is a reply to message #222335] Tue, 19 August 2008 13:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alan_krzywicki.avid.com

I almost forgot ...

In the Project Explorer, when I look at the file name I see an header icon
that includes '<>' (in blue) in the upper left corner of the icon. Can
some one tell me what the additional '<>' means with an icon? If I
explicitly exclude the header from the project the '<>' is removed from
the icon, if they means anything.
Re: Custom Build Step not firing [message #222422 is a reply to message #222335] Thu, 21 August 2008 13:33 Go to previous message
Eclipse UserFriend
Originally posted by: alan_krzywicki.avid.com

... and my solution is ...

1st .. you need to have an output specified, Fill in the "Output file
name(s)" I was hoping to get away without this, but in reality it would
case the build to recreate the moc file each time. Without it is just
never seems to fire the custom build step.

2nd .. the .cpp moc file needs to be in the same directory as the header.
Eclipse seems to choke if the output moc file is in a subdirectory. The
make files don't get created correctly.

3rd ... (and I don't know if this is 100% necessary) I excluded the
created moc file from the project. but eclipse still builds it. (oh the
irony) I exclude it just to keep track of what is actually include for
source code control.
Previous Topic:Some build issues (one related to Ganymede)
Next Topic:compiler generates incomplete type errors - why?
Goto Forum:
  


Current Time: Mon Jun 02 16:10:21 EDT 2025

Powered by FUDForum. Page generated in 0.03358 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top