Comments (25)
You can easily compile it without gcc/g++ on mac. Make sure your xcode is upto date and then use make && sudo make install
.
Just looking at error I can assure you that your default gcc/g++ is not 4.7. Please run gcc -v
and if it's the case then export proper compiler before compiling if you dont wants to use LLMV compiler.
from pdf2htmlex.
Lalith-Balasubramanians-MacBook-Pro:coolwanglu-pdf2htmlEX-f461358 lalithbalasubramanian$ gcc --version
gcc (MacPorts gcc47 4.7.1_6) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
from pdf2htmlex.
and g++ -v
?
from pdf2htmlex.
Can you find anything about "c++0x" in 'man g++' ?
from pdf2htmlex.
@iapain please note the details below :
Lalith-Balasubramanians-MacBook-Pro:Downloads lalithbalasubramanian$ g++ --version
g++ (MacPorts gcc47 4.7.1_6) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@coolwanglu the preprocessor options are below from the "man g++"
what exactly do you require me to find ? I have a huge man for g++. I installed gcc47 from macports, the commandline fails as "-std=c++0x" is not a valid compile time arg.
from pdf2htmlex.
not --version but -v
just search c++0x, or checkout if there's c++0x listed under -std=
On Thu, Sep 27, 2012 at 6:00 PM, Lalith B [email protected] wrote:
@iapain https://github.com/iapain please note the details below :
Lalith-Balasubramanians-MacBook-Pro:Downloads lalithbalasubramanian$ g++
--version
g++ (MacPorts gcc47 4.7.1_6) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.@coolwanglu https://github.com/coolwanglu the preprocessor options are
below from the "man g++"what exactly do you require me to find ? I have a huge man for g++. I
installed gcc47 from macports, the commandline fails as "-std=c++0x" is not
a valid compile time arg.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/31#issuecomment-8931447.
from pdf2htmlex.
Oh I see it should have been dropped starting from 4.7
Can you please try replace all c++0x with c++11 in CMakeList.txt
I will add a condition later
On Thu, Sep 27, 2012 at 6:01 PM, 王璐 [email protected] wrote:
not --version but -v
just search c++0x, or checkout if there's c++0x listed under -std=
On Thu, Sep 27, 2012 at 6:00 PM, Lalith B [email protected]:
@iapain https://github.com/iapain please note the details below :
Lalith-Balasubramanians-MacBook-Pro:Downloads lalithbalasubramanian$ g++
--version
g++ (MacPorts gcc47 4.7.1_6) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.@coolwanglu https://github.com/coolwanglu the preprocessor options are
below from the "man g++"what exactly do you require me to find ? I have a huge man for g++. I
installed gcc47 from macports, the commandline fails as "-std=c++0x" is not
a valid compile time arg.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/31#issuecomment-8931447.
from pdf2htmlex.
still does'nt work after converting/replace all with c++11 check the error log below :
the error appears also on the gcc version 4.4.7. I changed the gcc version and tried but its still throwing the same error
Lalith-Balasubramanians-MacBook-Pro:coolwanglu-pdf2htmlEX-f461358 lalithbalasubramanian$ cmake . && make && sudo make install
-- checking for module 'libfontforge>=2.0.0'
-- package 'libfontforge>=2.0.0' not found
Trying to locate fontforge...
Found fontforge.h: /opt/local/include/fontforge/fontforge.h
Found fontforge: /opt/local/lib/libfontforge.dylib
Found gunicode: /opt/local/lib/libgunicode.dylib
Looking for libraries of python, which is required by fontforge, if you can link fontforge without python, you may disable this
-- checking for one of the modules 'python;python-2.7'
Found config.h: /opt/local/include/fontforge/config.h
-- Configuring done
-- Generating done
-- Build files have been written to: /users/lalithbalasubramanian/Downloads/coolwanglu-pdf2htmlEX-f461358
[ 7%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/pdf2htmlEX.cc.o
cc1plus: error: unrecognized command line option "-std=c++11"
make[2]: *** [CMakeFiles/pdf2htmlEX.dir/src/pdf2htmlEX.cc.o] Error 1
make[1]: *** [CMakeFiles/pdf2htmlEX.dir/all] Error 2
make: *** [all] Error 2
from pdf2htmlex.
Is CMake actually using GCC?
And how about the manpage?
Or can you compile a simple cpp file with g++ --std=c++0x ?
On Thu, Sep 27, 2012 at 6:16 PM, Lalith B [email protected] wrote:
still does'nt work check the error log below :
Lalith-Balasubramanians-MacBook-Pro:coolwanglu-pdf2htmlEX-f461358
lalithbalasubramanian$ cmake . && make && sudo make install
-- checking for module 'libfontforge>=2.0.0'
-- package 'libfontforge>=2.0.0' not found
Trying to locate fontforge...
Found fontforge.h: /opt/local/include/fontforge/fontforge.h
Found fontforge: /opt/local/lib/libfontforge.dylib
Found gunicode: /opt/local/lib/libgunicode.dylib
Looking for libraries of python, which is required by fontforge, if you
can link fontforge without python, you may disable this
-- checking for one of the modules 'python;python-2.7'
Found config.h: /opt/local/include/fontforge/config.h
-- Configuring done
-- Generating done
-- Build files have been written to:
/users/lalithbalasubramanian/Downloads/coolwanglu-pdf2htmlEX-f461358
[ 7%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/pdf2htmlEX.cc.o
cc1plus: error: unrecognized command line option "-std=c++11"
make[2]: *** [CMakeFiles/pdf2htmlEX.dir/src/pdf2htmlEX.cc.o] Error 1
make[1]: *** [CMakeFiles/pdf2htmlEX.dir/all] Error 2
make: *** [all] Error 2—
Reply to this email directly or view it on GitHubhttps://github.com//issues/31#issuecomment-8931809.
from pdf2htmlex.
I had the version from iapains repo and it dint work even a bit on my system. now i've progressed in the compilation war and currently struck at this point ..!!
Lalith-Balasubramanians-MacBook-Pro:coolwanglu-pdf2htmlEX lalithbalasubramanian$ cmake . && make && sudo make install
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.4.7
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /opt/local/bin/gcc
-- Check for working C compiler: /opt/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /opt/local/bin/c++
-- Check for working CXX compiler: /opt/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /opt/local/bin/pkg-config (found version "0.27.1")
-- checking for module 'poppler>=0.20.0'
-- found poppler, version 0.20.4
-- checking for module 'libfontforge>=2.0.0'
-- package 'libfontforge>=2.0.0' not found
Trying to locate fontforge...
Found fontforge.h: /opt/local/include/fontforge/fontforge.h
Found fontforge: /opt/local/lib/libfontforge.dylib
Found gunicode: /opt/local/lib/libgunicode.dylib
Looking for libraries of python, which is required by fontforge, if you can link fontforge without python, you may disable this
-- checking for one of the modules 'python;python-2.7'
Found config.h: /opt/local/include/fontforge/config.h
-- Configuring done
-- Generating done
-- Build files have been written to: /users/lalithbalasubramanian/Downloads/coolwanglu-pdf2htmlEX
Scanning dependencies of target pdf2htmlEX
[ 7%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/pdf2htmlEX.cc.o
[ 14%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/general.cc.o
[ 21%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/state.cc.o
[ 28%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/install.cc.o
[ 35%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/export.cc.o
[ 42%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/text.cc.o
/users/lalithbalasubramanian/Downloads/coolwanglu-pdf2htmlEX/src/HTMLRenderer/text.cc:28: error: 'std::round' has not been declared
make[2]: *** [CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/text.cc.o] Error 1
make[1]: *** [CMakeFiles/pdf2htmlEX.dir/all] Error 2
make: *** [all] Error 2
from pdf2htmlex.
std::round should be in since c++11, seems it is not in gcc 4.4.7?
as a workaround you can define round as floor(x+0.5);
I'll fix it later
On Thu, Sep 27, 2012 at 6:54 PM, Lalith B [email protected] wrote:
I had the version from iapains repo and it dint work even a bit on my
system. now i've progressed in the compilation war and currently struck at
this point ..!!Lalith-Balasubramanians-MacBook-Pro:coolwanglu-pdf2htmlEX
lalithbalasubramanian$ cmake . && make && sudo make install
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.4.7
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /opt/local/bin/gcc
-- Check for working C compiler: /opt/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /opt/local/bin/c++
-- Check for working CXX compiler: /opt/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /opt/local/bin/pkg-config (found version "0.27.1")
-- checking for module 'poppler>=0.20.0'
-- found poppler, version 0.20.4-- checking for module 'libfontforge>=2.0.0'
-- package 'libfontforge>=2.0.0' not found
Trying to locate fontforge...
Found fontforge.h: /opt/local/include/fontforge/fontforge.h
Found fontforge: /opt/local/lib/libfontforge.dylib
Found gunicode: /opt/local/lib/libgunicode.dylib
Looking for libraries of python, which is required by fontforge, if you
can link fontforge without python, you may disable this
-- checking for one of the modules 'python;python-2.7'
Found config.h: /opt/local/include/fontforge/config.h
-- Configuring done
-- Generating done
-- Build files have been written to:
/users/lalithbalasubramanian/Downloads/coolwanglu-pdf2htmlEX
Scanning dependencies of target pdf2htmlEX[ 7%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/pdf2htmlEX.cc.o
[ 14%] Building CXX object
CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/general.cc.o
[ 21%] Building CXX object
CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/state.cc.o
[ 28%] Building CXX object
CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/install.cc.o
[ 35%] Building CXX object
CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/export.cc.o
[ 42%] Building CXX object
CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/text.cc.o
/users/lalithbalasubramanian/Downloads/coolwanglu-pdf2htmlEX/src/HTMLRenderer/text.cc:28:
error: 'std::round' has not been declared
make[2]: *** [CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/text.cc.o] Error 1make[1]: *** [CMakeFiles/pdf2htmlEX.dir/all] Error 2
make: *** [all] Error 2—
Reply to this email directly or view it on GitHubhttps://github.com//issues/31#issuecomment-8932600.
from pdf2htmlex.
Also, your /opt/local/bin/gcc
is GCC 4.4.7 as you can see in cmake log. Force C and CXX compiler to 4.7 in cmake.
from pdf2htmlex.
@coolwanglu what is 'x' in floor(x+0.5) ?? am i missing something ?
from pdf2htmlex.
I mean implement a simple round function, in case there's no std::round.
I guess it'll be fine if you use 4.7
On Thu, Sep 27, 2012 at 7:32 PM, Lalith B [email protected] wrote:
@coolwanglu https://github.com/coolwanglu what is 'x' in floor(x+0.5)
?? am i missing something ?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/31#issuecomment-8933320.
from pdf2htmlex.
I just replaced floor instead of round and seems to work fine. I dont know what is the purpose of the text.cc :)
I used the following func :
int round(double number)
{
return (number >= 0) ? (int)(number + 0.5) : (int)(number - 0.5);
}
from pdf2htmlex.
The code compiled and executed fine. I also tried converting a simple pdf to html and it worked fine. :) I want to convert the html back to pdf once again...!! after manupulations on the html. Is it possible ??
from pdf2htmlex.
Glad to hear that!
And you'll need another tool to convert html to pdf.
On Thu, Sep 27, 2012 at 7:44 PM, Lalith B [email protected] wrote:
The code compiled and executed fine. I also tried converting a simple pdf
to html and it worked fine. :) I want to convert the html back to pdf once
again...!! after manupulations on the html. Is it possible ??—
Reply to this email directly or view it on GitHubhttps://github.com//issues/31#issuecomment-8933518.
from pdf2htmlex.
Hi Everyone,
i am having the EXACT same issues building it from macports. i am trying to follow the steps mentioned in the discussion here. but being a newbie i have difficulty understanding where the cmakelists.txt file is and all the other compiler settings that need to be changed. can somebody help me out with this and for the benefit of everyone who might use macports to install pdf2htmlEX, provide a workaround for this issue?
Thanks!
from pdf2htmlex.
@lts205 what's the compiler you are using, and what's the version?
from pdf2htmlex.
hi coolwanglu,
i finally got it to install, just used the "build from source" instructions on the "code" tab. but still i had issues when using gcc42. i then installed mp-gcc47 and made it active with the instruction sudo port select --set gcc mp-gcc47. after this the installation "build from source" went smooth.
as for your question i was using gcc42 which i guess came along with my xcode 3.2.6, latest macport version. so i tried to build it with macports but i got the exact same failure as discussed in the forum above which did not change after i installed gcc47 and made it active. maybe i missed something obvious.
btw awesome tool :D
from pdf2htmlex.
@lts205 gcc42 is too old to be supported, as there are quite a few c++11 features being used.
@iapain is it possible to add a dependency on higher versions of GCC in MacPorts ?
from pdf2htmlex.
@coolwanglu We should do all these checks in CMakeList instead of Portfile or BrewFormula.
from pdf2htmlex.
What I meant is, for MacPorts or Brew, I may even remove the CMake files,
as long as there's a valid Makefile(with no check), and proper dependencies
in Ports/Brew, the user will be able to install it.
If I add the check in CMakeList, I think MacPorts users may ask why still
it cannot compile, or why they have to install gcc manually.
What do you think?
On Fri, Oct 12, 2012 at 10:01 PM, Deepak [email protected] wrote:
@coolwanglu https://github.com/coolwanglu We should do all these checks
in CMakeList instead of Portfile or BrewFormula.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/31#issuecomment-9377415.
from pdf2htmlex.
Your point is valid if we see compiler as dependency. To me compiler is very important asset, I hate when some program updates or override my compiler settings. Well, you decide. I can inject proper compiler dependency. For those who have properly installed Xcode (with all updates) will never be an issue.
from pdf2htmlex.
I added in CMakeLists.txt, and I'm expecting new complains about this.
On Fri, Oct 12, 2012 at 10:13 PM, Deepak [email protected] wrote:
Your point is valid if we see compiler as dependency. To me compiler is
very important asset, I hate when some program updates or override my
compiler settings. Well, you decide. I can inject proper compiler
dependency. For those who have properly installed Xcode (with all updates)
will never be an issue.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/31#issuecomment-9377834.
from pdf2htmlex.
Related Issues (20)
- How to convert a PDF form into a table label in HTML HOT 1
- Warning: Very difficult to get this to build or run HOT 1
- 无法查看网页源代码
- Open at 100% width HOT 1
- Segmentation Fault HOT 1
- Embed background images into CSS instead of HTML
- Is this project dead? HOT 4
- running this image from nodejs program. HOT 1
- pdf2html is a wonderful tool.
- Memory leak for some pdf files
- How to compile pdf2htmlEX in CentOS 7?
- How to get the width of the div?
- How to get hidden element using --correct-text-visibility option?
- Official way to run it on ubuntu 18.04
- pdftohtmlex for ios HOT 1
- Problems with list symbols HOT 1
- compile error HOT 4
- is there a way to use em font-sizes instead of px
- how to building and run it on ubuntu16 HOT 2
- Option to generate images as in pdf f
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdf2htmlex.