Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QtXlsxWriter can't compiled by QT5.2.1? #44

Closed
abellee opened this issue Jun 17, 2014 · 4 comments
Closed

QtXlsxWriter can't compiled by QT5.2.1? #44

abellee opened this issue Jun 17, 2014 · 4 comments

Comments

@abellee
Copy link

abellee commented Jun 17, 2014

I tried to build by Qt 5.2.1,no errors and all passed.
then I entered into the Debug/Release directory that built, and use terminal to "make install", and also seems no errors, but when I tried to include it, I only can include QtXlsxDepends. then I tried to use source directly, include xlsx/xlsxdoucment.h,but there is a error "QtXlsx file not found", anyone could tell me why this happened?

thanks in advanced!

@JohnGreek
Copy link

hey,
if i recall correctly you need to copy the header files found in "src". If you are using QtCreator use INCLUDEPATH += path/to/header/files in your .pro file. Otherwise copy the headers in "src" to the include path your compiler is instructed to search into.
Are you using linux?

@abellee
Copy link
Author

abellee commented Jun 18, 2014

I build it in Qt Creator 3.1.1 and Qt 5.2.1
then I into the release directory and make install
seems everything is done, but when i back to the ide and change the .pro file
QT += xlsx
but i also can not include Qtxlsx

below is the output when i do "make install"

AbeltekiMacBook-Pro:build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release abellee$ make install
cd src/ && ( test -e Makefile || /Users/abellee/Qt/5.3/clang_64/bin/qmake /Users/abellee/Downloads/QtXlsxWriter-master/src/src.pro -spec macx-clang CONFIG+=x86_64 -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile install
cd xlsx/ && ( test -e Makefile || /Users/abellee/Qt/5.3/clang_64/bin/qmake /Users/abellee/Downloads/QtXlsxWriter-master/src/xlsx/xlsx.pro -spec macx-clang CONFIG+=x86_64 -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile install
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.Release install
cp -f "../../lib/QtXlsx.framework/Versions/0/QtXlsx" "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/Versions/0/QtXlsx"
rm -f "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/Versions/Current"
cp -f -R ../../lib/QtXlsx.framework/Versions/Current "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/Versions/Current"
rm -f "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/QtXlsx"
cp -f -R ../../lib/QtXlsx.framework/QtXlsx "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/QtXlsx"
rm -f "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/Contents/Info.plist"
cp -f -R ../../lib/QtXlsx.framework/Contents/Info.plist "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/Contents/Info.plist"
rm -f "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/Headers"
cp -f -R ../../lib/QtXlsx.framework/Headers "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/Headers"
rm -f "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/Versions/0/Headers/QtXlsxDepends"
cp -f -R ../../lib/QtXlsx.framework/Versions/0/Headers/QtXlsxDepends "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/Versions/0/Headers/QtXlsxDepends"
sed -e s,/Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/include,/Users/abellee/Qt/5.3/clang_64/include,g -e s,/Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/lib,/Users/abellee/Qt/5.3/clang_64/lib,g "../../lib/QtXlsx.framework/QtXlsx.prl" >"/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/QtXlsx.prl"
sed -e s,/Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/include,/Users/abellee/Qt/5.3/clang_64/include,g -e s,/Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/lib,/Users/abellee/Qt/5.3/clang_64/lib,g "../../lib/QtXlsx.la" >"/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.la"
sed -e s,/Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/include,/Users/abellee/Qt/5.3/clang_64/include,g -e s,/Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/lib,/Users/abellee/Qt/5.3/clang_64/lib,g "../../lib/pkgconfig/Qt0Xlsx.pc" >"/Users/abellee/Qt/5.3/clang_64/lib/pkgconfig/Qt0Xlsx.pc"
cp -f /Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/mkspecs/modules-inst/qt_lib_xlsx.pri /Users/abellee/Qt/5.3/clang_64/mkspecs/modules/
cp -f /Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/mkspecs/modules-inst/qt_lib_xlsx_private.pri /Users/abellee/Qt/5.3/clang_64/mkspecs/modules/
cp -f /Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/lib/cmake/Qt5Xlsx/Qt5XlsxConfig.cmake /Users/abellee/Qt/5.3/clang_64/lib/cmake/Qt5Xlsx/
cp -f /Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/lib/cmake/Qt5Xlsx/Qt5XlsxConfigVersion.cmake /Users/abellee/Qt/5.3/clang_64/lib/cmake/Qt5Xlsx/
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.Debug install
cp -f "../../lib/QtXlsx.framework/Versions/0/QtXlsx_debug" "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/Versions/0/QtXlsx_debug"
rm -f "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/Versions/Current"
cp -f -R ../../lib/QtXlsx.framework/Versions/Current "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/Versions/Current"
rm -f "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/QtXlsx_debug"
cp -f -R ../../lib/QtXlsx.framework/QtXlsx_debug "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/QtXlsx_debug"
rm -f "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/Contents/Info.plist"
cp -f -R ../../lib/QtXlsx.framework/Contents/Info.plist "/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/Contents/Info.plist"
sed -e s,/Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/include,/Users/abellee/Qt/5.3/clang_64/include,g -e s,/Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/lib,/Users/abellee/Qt/5.3/clang_64/lib,g "../../lib/QtXlsx.framework/QtXlsx_debug.prl" >"/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx.framework/QtXlsx_debug.prl"
sed -e s,/Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/include,/Users/abellee/Qt/5.3/clang_64/include,g -e s,/Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/lib,/Users/abellee/Qt/5.3/clang_64/lib,g "../../lib/QtXlsx_debug.la" >"/Users/abellee/Qt/5.3/clang_64/lib/QtXlsx_debug.la"
sed -e s,/Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/include,/Users/abellee/Qt/5.3/clang_64/include,g -e s,/Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/lib,/Users/abellee/Qt/5.3/clang_64/lib,g "../../lib/pkgconfig/Qt0Xlsx.pc" >"/Users/abellee/Qt/5.3/clang_64/lib/pkgconfig/Qt0Xlsx.pc"
cp -f /Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/mkspecs/modules-inst/qt_lib_xlsx.pri /Users/abellee/Qt/5.3/clang_64/mkspecs/modules/
cp -f /Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/mkspecs/modules-inst/qt_lib_xlsx_private.pri /Users/abellee/Qt/5.3/clang_64/mkspecs/modules/
cp -f /Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/lib/cmake/Qt5Xlsx/Qt5XlsxConfig.cmake /Users/abellee/Qt/5.3/clang_64/lib/cmake/Qt5Xlsx/
cp -f /Users/abellee/Downloads/build-qtxlsx-Desktop_Qt_5_3_0_clang_64bit-Release/lib/cmake/Qt5Xlsx/Qt5XlsxConfigVersion.cmake /Users/abellee/Qt/5.3/clang_64/lib/cmake/Qt5Xlsx/

anything i do wrong?

@abellee
Copy link
Author

abellee commented Jun 18, 2014

I open the .pro file and right click in it, choose the "add lib" -> "add system lib",
then choose the Qt/5.3/clang_64/lib/QtXlsx.framework
but only i can include QtXlsxDepends.
it almost make me crazy!

@abellee
Copy link
Author

abellee commented Jun 18, 2014

Bravo!
I have successfully done!

first I create a folder on my desktop, then
git clone https://github.com/dbzhang800/QtXlsxWriter

after finish cloning, cd to the QtXlsxWriter folder, and
qmake
sudo make install

before u do qmake, u'd better sure that the qmake is in the PATH,
my qmake is:
/Users/{your user name}/Qt/5.3/clang_64/bin:$PATH
then open a new Terminal window to make sure that take effect with.

now if everything is ok,
open the .pro file and
QT += xlsx
open the mainwindow.h, and
#include <xlsxdocument.h>

then you could try it with input
QXlsx::Document xlsx;
in any file of your project.

Hope these can help anyone else, really make me crazy these days!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants