Dax89 / QHexView

A versatile Hexadecimal widget for Qt5
MIT License
323 stars 101 forks source link

QHexView cannot build #51

Closed neomissing closed 3 years ago

neomissing commented 3 years ago

I tried to use QHexView, including qhexview. pri, but found that it could not be compiled at all. Could you please provide a simple test to pass the demo?

audetto commented 3 years ago

How are you using it? There is no demo in this project, it is a library you can include in your application.

I use cmake, like this

https://github.com/audetto/AppleWin/blob/master/source/frontends/qt/CMakeLists.txt#L11

neomissing commented 3 years ago

I have solved it, the original Qhexview.pri omits QFileBuffer. CPP and QFileBuffer. h, I suggest you update it, and The header file path is recommended to be changed to INCLUDEPATH += $$PWD \ $$PWD/document \ $$PWD/document/commands \ $$PWD/document/buffer

audetto commented 3 years ago

https://github.com/Dax89/QHexView/pull/52

audetto commented 3 years ago

I suggest you update it, and The header file path is recommended to be changed to INCLUDEPATH += $$PWD \ $$PWD/document \ $$PWD/document/commands \ $$PWD/document/buffer

I am not sure you need to do that.

See here: https://github.com/Dax89/QHexView/blob/1594791583113ea936c79ca00d18891f23ed88ff/qhexview.cpp#L2

Only the root needs to be added to the include list, and in your project you can include as in the above link.

On the other hand, I normally try to include all files from the same standard include root, while here it seems that . is always in the include path, which makes things apparently easier, but IMHO more confused in the long run. But it might be a Qt standard???