WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: FlaxPDF pdf reader  (Read 14656 times)

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: FlaxPDF pdf reader
« Reply #15 on: September 22, 2015, 09:28:35 AM »
hope I found all issues.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: FlaxPDF pdf reader
« Reply #16 on: September 22, 2015, 01:12:50 PM »
Applied, thanks!

Notes for the future:
- never compare floats for equality, it can fail even if they are equal
- if you'd like proper attribution in the git log, send git format-patch output instead of git diff
The only barriers that can stop you are the ones you create yourself.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: FlaxPDF pdf reader
« Reply #17 on: September 23, 2015, 07:04:47 AM »
Cool, I also wondered about the float comparisons, what do you think of this?
Thanks for the feedback.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11624
Re: FlaxPDF pdf reader
« Reply #18 on: September 23, 2015, 10:40:28 AM »
Hi hiro
The way you compare floats for equality is to test if their values are close enough for your application that you would
consider them to be equal. Something like this:
Code: [Select]
float CloseEnough=0.01;

if((fabs(float1 - float2)) < CloseEnough)
{
code to execute if the two floats are considered to be equal
}

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: FlaxPDF pdf reader
« Reply #19 on: September 23, 2015, 04:11:07 PM »
@hiro

That's missing one parenthesis, mainly for clarity - casting happens before ==, but it's good to have the parens around in case other things get added.

Applied with the parens added.
The only barriers that can stop you are the ones you create yourself.

Offline nimday

  • Jr. Member
  • **
  • Posts: 75
Re: FlaxPDF pdf reader
« Reply #20 on: December 23, 2015, 07:07:49 PM »
Good morning , i have a little compiling problem
Code: [Select]
make[2]: Entering directory '/tmp/flaxpdf-0.7.2/src'
g++  -g -O2  -pthread -isystem /usr/local/include -isystem /usr/local/include/freetype2 -isystem /usr/local/include -fvisibility-inlines-hidden -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D_REENTRANT -isystem /usr/local/include/poppler -isystem /usr/local/include -Wall -Wextra -ffunction-sections -fdata-sections  -Wl,-O1 -Wl,-gc-sections -Wl,-as-needed -o flaxpdf main.o loadfile.o helpers.o view.o  -llzo2   -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lfltk_images -lpng -lz -ljpeg -lfltk -lXcursor -lXfixes -lXft -lfontconfig -lXinerama -lpthread -ldl -lm -lX11 -L/usr/local/lib -lpoppler -lXrender -lX11
main.o:(.rodata._ZTI12Fl_PNG_Image[_ZTI12Fl_PNG_Image]+0x8): undefined reference to `typeinfo for Fl_RGB_Image'
view.o:(.rodata._ZTI7pdfview[_ZTI7pdfview]+0x8): undefined reference to `typeinfo for Fl_Widget'
loadfile.o: In function `renderer':
/tmp/flaxpdf-0.7.2/src/loadfile.cpp:190: undefined reference to `omp_get_num_procs'

Maybe you can give me a clue

Thanks

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14816
Re: FlaxPDF pdf reader
« Reply #21 on: December 23, 2015, 11:50:06 PM »

Offline nimday

  • Jr. Member
  • **
  • Posts: 75
Re: FlaxPDF pdf reader
« Reply #22 on: December 24, 2015, 05:25:15 PM »
Does this help:

http://tinycorelinux.net/6.x/x86_64/tcz/src/flaxpdf/compile_flaxpdf

Thanks it solved the problem and the last issue with omp fixed with -fopenmp switch
I just want to change line 188 from main.cpp to enable other fltk schemes and add icon to file browser

Code: [Select]
Fl::scheme("gtk+");  //changed to null
Fl_File_Icon::load_system_icons(); //added

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: FlaxPDF pdf reader
« Reply #23 on: December 26, 2015, 12:33:31 PM »
Added the icon line, thanks. configure should have added -fopenmp, I wonder why it failed for you?
The only barriers that can stop you are the ones you create yourself.

Offline nimday

  • Jr. Member
  • **
  • Posts: 75
Re: FlaxPDF pdf reader
« Reply #24 on: December 27, 2015, 01:51:06 PM »
Added the icon line, thanks. configure should have added -fopenmp, I wonder why it failed for you?

I did it again and yes added , maybe i missed something before  :-[