LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 03-16-2018, 09:58 PM   #1
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 651
Blog Entries: 135

Rep: Reputation: 188Reputation: 188
qutycapt


CutyCapt is a program to grab a web page and render it as a png. Has anyone ever actually gotten it to compile?

After a while wrestling with just finding the damn thing (I swear these sites hide the links to the source tarballs with great deliberation and forethought) I found the source to consist of the following:

Code:
-rwxr-xr-x 1 bob users 23876 Mar 16 22:45 CutyCapt.cpp
-rwxr-xr-x 1 bob users  2250 Mar 16 22:45 CutyCapt.hpp
-rwxr-xr-x 1 bob users   297 Mar 16 22:45 CutyCapt.pro
Ah, an old school no-make-file compile. Yeah, I can do that ... or so I thought...
Code:
$ gcc -o try CutyCapt.cpp 
CutyCapt.cpp:26:10: fatal error: QApplication: No such file or directory
 #include <QApplication>
          ^~~~~~~~~~~~~~
compilation terminated.
$
Can anyone supply a clue? Have I got missing source files? Do I need to do a special dance?

Linux From Scratch 8.1, with Qt, Qt web engine and Qupzilla installed already.

Last edited by jr_bob_dobbs; 03-16-2018 at 09:59 PM.
 
Old 03-17-2018, 01:34 AM   #2
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,622
Blog Entries: 40

Rep: Reputation: Disabled
Quote:
Originally Posted by jr_bob_dobbs View Post
Linux From Scratch 8.1, with Qt, Qt web engine and Qupzilla installed already.
Are these the development libraries? As you use LFS, which I do not have any experience with, I “may presume” that you compiled the Qt-libraries yourself. If not, either do that or get whatever qualifies as a Qt-development environment under LFS.

And [Aheam; cleaning my throat], could you modify the thread-title to give a better hint on the topic, which is more compilation- than application-related.

TIA.
 
Old 03-17-2018, 12:25 PM   #3
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
open the .proj file in qtcreator, I had to comment out the QPrinter bits, lines 285-289 in cutty.cpp after that built fine.
 
Old 03-17-2018, 01:15 PM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Or manually
Code:
moc CutyCapt.hpp -o moc_CutyCapt.cpp
g++ -fPIC $(PKG_CONFIG_PATH=/usr/lib64/qt5/pkgconfig/ pkg-config --cflags --libs  Qt5Widgets Qt5WebKit Qt5Svg Qt5WebKitWidgets Qt5Core Qt5Gui Qt5Widgets) CutyCapt.cpp moc_CutyCapt.cpp -o cutty
You may have to change the PKG_config path.
This is actually a nice little tool.
 
Old 03-17-2018, 03:33 PM   #5
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Minor update for QT 5.8.0 ( maybe other versions ).
The QPrinter problem is this define
Code:
#if QT_VERSION < 0x050000
#include <QPrinter>
#endif
at Line 31.

Just remove the #if/#endif and leave the #include and the QPrinter error goes away at line 285 allowing you to save the OP to pdf.
You also need to add "Qt5PrintSupport" to the pkg-config command like so:
Code:
 
g++ -fPIC $(PKG_CONFIG_PATH=/usr/lib64/qt5/pkgconfig/ pkg-config --cflags --libs  Qt5Widgets Qt5WebKit Qt5Svg Qt5WebKitWidgets Qt5Core Qt5Gui Qt5Widgets Qt5PrintSupport) CutyCapt.cpp moc_CutyCapt.cpp -o cutty
Hope this helps
 
Old 03-19-2018, 07:39 AM   #6
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 651

Original Poster
Blog Entries: 135

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by Keith Hedger View Post
open the .proj file in qtcreator, I had to comment out the QPrinter bits, lines 285-289 in cutty.cpp after that built fine.
No cutty.ccp here. Looks like I've got missing files. That would explain everything.
 
Old 03-19-2018, 07:50 AM   #7
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Quote:
Originally Posted by jr_bob_dobbs View Post
No cutty.ccp here. Looks like I've got missing files. That would explain everything.
Sorry typo I meant CutyCapt.cpp NOT cutty.ccp.
 
Old 03-19-2018, 07:55 AM   #8
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 651

Original Poster
Blog Entries: 135

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by Keith Hedger View Post
Sorry typo I meant CutyCapt.cpp NOT cutty.ccp.
Oh! Understood! Thank you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 11:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration