Skip to navigation
   
Dave F's Blog

QT - rolling your own

By Dave F in Reader

Posted in Uncategorized on June 19, 2007 at 1:40 pm

Permalink | Author Profile

QT - neat development environment that is Mac/Linux/Windows independent - comes with a load of tools. I’ve just been using some of them and they don’t work :-(

It’s not a major problem, just a minor bug or perhaps not even that. QT project files can contain comments which are started with # and terminate at the end of line. Lines can be extended with \. The problem is a comment which isn’t line extended ends the line and more importantly the block eg

SOURCES = \
FILE1.c \
FILE2.cpp \
# a comment
FILE3.c
HEADERS = \ etc
FILE3.c isn’t part of the Sources block because of the new line after the comment.
# comment \
would be fine.
I’m not even sure this counts as a bug as you could say that is a valid interpretation of the syntax. The problem is most of the tools handle the # comment OK, just the ones you tend to use at the end of the development cycle don’t so you can get in a bit of a state. Especially as you get no errors or warnings - it just ignores the files after the comment. As you can guess it took me a while to figure out what was happening.
However a neat feature of QT is that it comes with sources to the libraries and tools. So hey presto I edit the source to say comments don’t end the block and away we go. I think, I’d better check what else my changes might affect!

The moral of the tale? Don’t add comments!

12345
Not yet rated
Loading ... Loading ...

Previous Post | Next Post

 
 
Comments
This article has no comments yet.

Make a comment

* required

* required

We stop spam using reCaptcha.
Type the words below and click Submit Comment.

Advertisement