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

mingw64 compilation error #36

Closed
crayxt opened this issue Nov 5, 2015 · 5 comments
Closed

mingw64 compilation error #36

crayxt opened this issue Nov 5, 2015 · 5 comments

Comments

@crayxt
Copy link
Collaborator

crayxt commented Nov 5, 2015

src/Segment/Segment.cpp: In constructor 'Segment::Segment(QGraphicsScene&, int, bool)':
src/Segment/Segment.cpp:23:74: error: cast from 'Segment*' to 'long unsigned int' loses precision [-fpermissive]
                               << " address=0x" << hex << (unsigned long) this;
                                                                          ^
src/Segment/Segment.cpp: In destructor 'virtual Segment::~Segment()':
src/Segment/Segment.cpp:29:74: error: cast from 'Segment*' to 'long unsigned int' loses precision [-fpermissive]
                               << " address=0x" << hex << (unsigned long) this;
                                                                          ^
src/Segment/Segment.cpp: In member function 'void Segment::appendColumn(int, int, const DocumentModelSegments&)':
src/Segment/Segment.cpp:49:80: error: cast from 'Segment*' to 'long unsigned int' loses precision [-fpermissive]
                                << " segment=0x" << std::hex << (unsigned long) this << std::dec
                                                                                ^
src/Segment/Segment.cpp: In member function 'void Segment::removeUnneededLines(int*)':
src/Segment/Segment.cpp:474:88: error: cast from 'Segment*' to 'long unsigned int' loses precision [-fpermissive]
                                        << " segment=0x" << std::hex << (unsigned long) this << std::dec
                                                                                        ^
Makefile:2261: recipe for target 'src/.objs/Segment.o' failed

Environment is Fedora 23 64-bit chroot, compiler is mingw64

@crayxt
Copy link
Collaborator Author

crayxt commented Nov 5, 2015

going further

src/Segment/SegmentLine.cpp: In constructor 'SegmentLine::SegmentLine(QGraphicsScene&, const DocumentModelSegments&, Segment*)':
src/Segment/SegmentLine.cpp:19:80: error: cast from 'SegmentLine*' to 'long unsigned int' loses precision [-fpermissive]
                                << " address=0x" << std::hex << (unsigned long) this;
                                                                                ^
src/Segment/SegmentLine.cpp: In destructor 'virtual SegmentLine::~SegmentLine()':
src/Segment/SegmentLine.cpp:38:80: error: cast from 'SegmentLine*' to 'long unsigned int' loses precision [-fpermissive]
                                << " address=0x" << std::hex << (unsigned long) this;
                                                                                ^
Makefile:2269: recipe for target 'src/.objs/SegmentLine.o' failed

@markummitchell
Copy link
Owner

I just tried using qintptr, but am unable to test with mingw on fedora.

@crayxt
Copy link
Collaborator Author

crayxt commented Nov 5, 2015

@markummitchell It compiles successfully, until the same case in src/Segment/SegmentLine.cpp

markummitchell pushed a commit that referenced this issue Nov 5, 2015
@markummitchell
Copy link
Owner

Thanks for the testing.

@crayxt
Copy link
Collaborator Author

crayxt commented Nov 5, 2015

Thanks,

@crayxt crayxt closed this as completed Nov 5, 2015
markummitchell pushed a commit that referenced this issue Nov 5, 2015
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