Files missing in source package?

Use this forum to ask questions about how to do things in the QCAD Community Edition.

Moderator: andrew

Files missing in source package?

Postby Fatman » Wed Oct 21, 2009 12:32 pm

Hi all.

I'm having trouble compiling the source code for QCad, I've got the dxflib, fparser and qcadactions projects compiled, but the others seem to have files missing, such as moc_rs_commands.cpp (for qcadcmd) and rs_export.cpp (for qcadlib).

Why are the files missing, and where can I get them?

Thanks,
Adam J Richardson
Fatman
Newbie Member
 
Posts: 7
Joined: Wed Oct 21, 2009 12:23 pm

Postby andrew » Wed Oct 21, 2009 12:57 pm

Qt version?
User avatar
andrew
Site Admin
 
Posts: 2529
Joined: Fri Mar 30, 2007 6:07 am

Postby Fatman » Wed Oct 21, 2009 1:09 pm

Wow, quick reply. Thanks.

I have QT3 and QT4 headers installed. QT3 version is 3.3.4, QT4 version (according to Qt Creator) is 4.5.3.

I've set the compiler to use the QT3 headers.
Fatman
Newbie Member
 
Posts: 7
Joined: Wed Oct 21, 2009 12:23 pm

Postby andrew » Wed Oct 21, 2009 1:16 pm

Qt 3 is good. moc_ files should be generated by Qt (qmake / moc). Make sure that correct qmake / moc are used (qmake -version).

rs_export.cpp should be in the tar.gz (pretty sure it is).
User avatar
andrew
Site Admin
 
Posts: 2529
Joined: Fri Mar 30, 2007 6:07 am

Postby Fatman » Wed Oct 21, 2009 1:30 pm

Ah. There's one problem. I'm not doing anything with Qmake, because I'm a Qt newbie. (I use Gtkmm for my projects.)

I had a look in the tarball but couldn't find rs_export.cpp. I also had problems with rs_fileio.h, but found it in qcadlib/src/fileio. No such luck with rs_export.cpp. I can't find rs_import.cpp either.

I've downloaded the tarball (btw, qcad-2.0.5.0-1-community.src.tar.gz) again on a second system. I still can't find rs_export.cpp or rs_import.cpp.
Fatman
Newbie Member
 
Posts: 7
Joined: Wed Oct 21, 2009 12:23 pm

Postby andrew » Wed Oct 21, 2009 1:43 pm

Fatman wrote:Ah. There's one problem. I'm not doing anything with Qmake, because I'm a Qt newbie. (I use Gtkmm for my projects.)


OK, cannot help with that :(

Fatman wrote:I had a look in the tarball but couldn't find rs_export.cpp. I also had problems with rs_fileio.h, but found it in qcadlib/src/fileio. No such luck with rs_export.cpp. I can't find rs_import.cpp either.

I've downloaded the tarball (btw, qcad-2.0.5.0-1-community.src.tar.gz) again on a second system. I still can't find rs_export.cpp or rs_import.cpp.


You're right. Not there, not needed. Use qmake :)
User avatar
andrew
Site Admin
 
Posts: 2529
Joined: Fri Mar 30, 2007 6:07 am

Postby Fatman » Wed Oct 21, 2009 1:55 pm

andrew wrote:
Fatman wrote:I had a look in the tarball but couldn't find rs_export.cpp. I also had problems with rs_fileio.h, but found it in qcadlib/src/fileio. No such luck with rs_export.cpp. I can't find rs_import.cpp either.

I've downloaded the tarball (btw, qcad-2.0.5.0-1-community.src.tar.gz) again on a second system. I still can't find rs_export.cpp or rs_import.cpp.


You're right. Not there, not needed. Use qmake :)


Interesting... you mean qmake will #define out the unnecessary #includes? Or something?

Oh well, time to start reading about qmake then. Thanks for the help. :)
Fatman
Newbie Member
 
Posts: 7
Joined: Wed Oct 21, 2009 12:23 pm

Postby Fatman » Thu Oct 22, 2009 10:32 am

Now I definitely found a hole where a file should be. ;) Everything compiles perfectly up to qcadguiqt, where I get the error:

Code: Select all
qg_actionhandler.cpp:146:31: qg_cadtoolbarsnap.h: No such file or directory


It seems this file is required for struct QG_CadToolBarSnap.

([EDIT] I should have mentioned, this also results in a lot of 0-byte moc files.)

Just to confirm my understanding is correct, the process I'm using is approximately:
    1. cd into the src dir
    2. "qmake -project"
    3. "qmake"
    4. "moc subdir/source.h -o moc/moc_source.cpp" for each source.h (subdir optional)
    5. compile as normal
    6. check the lib directory has a lib and move to the next project

    On any errors, correct and start again from step 2.
Fatman
Newbie Member
 
Posts: 7
Joined: Wed Oct 21, 2009 12:23 pm

Postby andrew » Thu Oct 22, 2009 12:25 pm

Fatman wrote:
    1. cd into the src dir
    2. "qmake -project"
    3. "qmake"
    4. "moc subdir/source.h -o moc/moc_source.cpp" for each source.h (subdir optional)
    5. compile as normal
    6. check the lib directory has a lib and move to the next project


Drop step 2. The package already contains .pro files. Generating them again will overwrite the existing .pro files (which work) with new ones (which will likely not work).

Installing, building and launching QCAD should really be as easy as:
- unpack archive
- cd scripts
- build_qcad.sh
- cd qcad
- ./qcad
User avatar
andrew
Site Admin
 
Posts: 2529
Joined: Fri Mar 30, 2007 6:07 am

Postby Fatman » Thu Oct 22, 2009 3:38 pm

Thanks, that fixed the moc file issue. :)

Now to compile them...

I could use the shell script, but it does me no harm to understand the Qt build process.

Out of disk space. How typical, ha ha. Just sort that out... done. Building.

...

The build failed because it's trying to compile nonexistent files. The missing filenames seem to correspond to the generated moc files (for instance, there is no ui/qg_blockdialog.cpp but there is a moc/moc_qg_blockdialog.cpp).

Should I remove the nonexistent files from the build and go ahead without them? (Looks like it'd work.) Or are the missing files required?

The missing files (apologies for the length of this):
Code: Select all
ui\qg_arcoptions.cpp
ui\qg_beveloptions.cpp
ui\qg_blockdialog.cpp
ui\qg_cadtoolbar.cpp
ui\qg_cadtoolbararcs.cpp
ui\qg_cadtoolbarcircles.cpp
ui\qg_cadtoolbardim.cpp
ui\qg_cadtoolbarellipses.cpp
ui\qg_cadtoolbarinfo.cpp
ui\qg_cadtoolbarlines.cpp
ui\qg_cadtoolbarmain.cpp
ui\qg_cadtoolbarmodify.cpp
ui\qg_cadtoolbarpoints.cpp
ui\qg_cadtoolbarselect.cpp
ui\qg_cadtoolbarsnap.cpp
ui\qg_circleoptions.cpp
ui\qg_commandwidget.cpp
ui\qg_coordinatewidget.cpp
ui\qg_dimlinearoptions.cpp
ui\qg_dimoptions.cpp
ui\qg_dlgarc.cpp
ui\qg_dlgattributes.cpp
ui\qg_dlgcircle.cpp
ui\qg_dlgellipse.cpp
ui\qg_dlghatch.cpp
ui\qg_dlgimageoptions.cpp
ui\qg_dlginitial.cpp
ui\qg_dlginsert.cpp
ui\qg_dlgline.cpp
ui\qg_dlgmirror.cpp
ui\qg_dlgmove.cpp
ui\qg_dlgmoverotate.cpp
ui\qg_dlgoptionsdrawing.cpp
ui\qg_dlgoptionsgeneral.cpp
ui\qg_dlgpoint.cpp
ui\qg_dlgrotate.cpp
ui\qg_dlgrotate2.cpp
ui\qg_dlgscale.cpp
ui\qg_dlgtext.cpp
ui\qg_exitdialog.cpp
ui\qg_imageoptions.cpp
ui\qg_insertoptions.cpp
ui\qg_layerdialog.cpp
ui\qg_libraryinsertoptions.cpp
ui\qg_librarywidget.cpp
ui\qg_lineangleoptions.cpp
ui\qg_linebisectoroptions.cpp
ui\qg_lineoptions.cpp
ui\qg_lineparalleloptions.cpp
ui\qg_lineparallelthroughoptions.cpp
ui\qg_linepolygon2options.cpp
ui\qg_linepolygonoptions.cpp
ui\qg_linerelangleoptions.cpp
ui\qg_mousewidget.cpp
ui\qg_moverotateoptions.cpp
ui\qg_printpreviewoptions.cpp
ui\qg_roundoptions.cpp
ui\qg_selectionwidget.cpp
ui\qg_snapdistoptions.cpp
ui\qg_textoptions.cpp
ui\qg_trimamountoptions.cpp
ui\qg_widgetpen.cpp
Fatman
Newbie Member
 
Posts: 7
Joined: Wed Oct 21, 2009 12:23 pm


Return to QCAD Community 'How Do I' Questions

Who is online

Users browsing this forum: No registered users and 1 guest