Page 2 of 2

Re: compile error - "Ui" has not been declared

Posted: Tue Jan 25, 2011 3:46 am
by xuetaowang
Hi Daniel,

Eventually it can be built. (but didn't figure out why code::block call uic3 first. I can run other project using qmake directly and this thing never happen)

1) removed /usr/bin/uic-qt3 and /usr/bin/uic3, and uninstall qt3-dev-tools package

(in .bashrc It is set before)
PATH=/usr/local/Trolltech/Qt-4.6.2/bin:$PATH
export PATH

2) deleted all previous moc_*.cpp and ui_*.h

I have two more question:
1) Could you let me know how I can run it (or where I can find the instruction--English).(If i click "run" in build tool bar, following message dialog is pop up)
"It seems that this project has not been built yet.
Do you want to build it now?"

2)When i work other qt project (either Windows or Linux) i use nmake or/ make disclean can clean up moc or ui.h file. But in the cloudcompare project i didn't find .pro file. How code::block use qmake to build it? Can I use qmake directly build cloudcompare.

Thank you very much for your help.

Xuetao

Re: compile error - "Ui" has not been declared

Posted: Tue Jan 25, 2011 8:36 am
by daniel
Hello,

in fact, Code::Blocks works more like MS Visual C++, but without any 'Qt addin' available (AFAIK). So, we don't use qmake (and more generally we don't use any make file). The job is done by the 'qt-prebuild' tool which takes care of creating/updating 'moc' and 'ui' files. By the way, neither Code::Blocks nor qt-prebuild call 'uic3' (you can look at the unique class of qt-prebuild to see how it's working - it's very straightforward). I'm far from being a Linux 'guru', so I can't help you on your strange 'PATH' behavior.

Anyway, the CloudCompare executable (qCC) is created in the 'bin' project (you can check this in the project parameters dialog). Once again, it's strange you can't run it by clicking on the 'run' icon. On my side I work on Debian and Windows and the way Code::Blocks works on both OS is pretty much the same. I believed Ubuntu was roughly equivalent to Debian (I'll try to install Ubuntu and test out the whole project as soon as I have a little time).

Thank you for your tenacity!

Daniel