Project does not build on macOS 10.15 w/Qt 15.13.2
kubark42 opened this issue · 3 comments
kubark42 commented
After correcting for the issue in #2, the project fails to compile.
Steps to recreate:
- Open
qtrar.pro
, using Qt 5.13.2 kit. - Click compile button.
Output:
../../QtRAR-master/src/qtrarfile.cpp:24:24: error: expected ';' at end of declaration list
static int CALLBACK procCallback(UINT msg, LPARAM self, LPARAM addr, LPARAM size);
^
;
../../QtRAR-master/src/qtrar.cpp:44:13: error: use of undeclared identifier 'ERAR_SUCCESS'; did you mean 'RARX_SUCCESS'?
m_error(ERAR_SUCCESS) ,
^~~~~~~~~~~~
RARX_SUCCESS
../../QtRAR-master/src/unrar/errhnd.hpp:6:3: note: 'RARX_SUCCESS' declared here
RARX_SUCCESS = 0,
^
../../QtRAR-master/src/qtrarfile.cpp:43:13: error: use of undeclared identifier 'ERAR_SUCCESS'; did you mean 'RARX_SUCCESS'?
m_error(ERAR_SUCCESS)
^~~~~~~~~~~~
RARX_SUCCESS
../../QtRAR-master/src/unrar/errhnd.hpp:6:3: note: 'RARX_SUCCESS' declared here
RARX_SUCCESS = 0,
^
../../QtRAR-master/src/qtrar.cpp:55:13: error: use of undeclared identifier 'ERAR_SUCCESS'; did you mean 'RARX_SUCCESS'?
m_error(ERAR_SUCCESS) ,
^~~~~~~~~~~~
RARX_SUCCESS
../../QtRAR-master/src/unrar/errhnd.hpp:6:3: note: 'RARX_SUCCESS' declared here
RARX_SUCCESS = 0,
^
../../QtRAR-master/src/qtrarfile.cpp:52:13: error: use of undeclared identifier 'ERAR_SUCCESS'; did you mean 'RARX_SUCCESS'?
m_error(ERAR_SUCCESS)
^~~~~~~~~~~~
RARX_SUCCESS
../../QtRAR-master/src/unrar/errhnd.hpp:6:3: note: 'RARX_SUCCESS' declared here
RARX_SUCCESS = 0,
^
../../QtRAR-master/src/qtrar.cpp:76:15: error: use of undeclared identifier 'ERAR_SUCCESS'; did you mean 'RARX_SUCCESS'?
m_error = ERAR_SUCCESS;
^~~~~~~~~~~~
RARX_SUCCESS
../../QtRAR-master/src/unrar/errhnd.hpp:6:3: note: 'RARX_SUCCESS' declared here
RARX_SUCCESS = 0,
^
../../QtRAR-master/src/qtrarfile.cpp:65:13: error: use of undeclared identifier 'ERAR_SUCCESS'; did you mean 'RARX_SUCCESS'?
m_error(ERAR_SUCCESS)
^~~~~~~~~~~~
RARX_SUCCESS
../../QtRAR-master/src/unrar/errhnd.hpp:6:3: note: 'RARX_SUCCESS' declared here
RARX_SUCCESS = 0,
^
../../QtRAR-master/src/qtrarfile.cpp:74:13: error: use of undeclared identifier 'ERAR_SUCCESS'; did you mean 'RARX_SUCCESS'?
m_error(ERAR_SUCCESS)
^~~~~~~~~~~~
RARX_SUCCESS
../../QtRAR-master/src/unrar/errhnd.hpp:6:3: note: 'RARX_SUCCESS' declared here
RARX_SUCCESS = 0,
^
../../QtRAR-master/src/qtrarfile.cpp:85:36: error: unknown type name 'UINT'
int QtRARFilePrivate::procCallback(UINT msg, LPARAM rawSelf,
^
../../QtRAR-master/src/qtrar.cpp:85:5: error: use of undeclared identifier 'RARCloseArchive'
RARCloseArchive(m_hArc);
^
../../QtRAR-master/src/qtrarfile.cpp:85:46: error: unknown type name 'LPARAM'
int QtRARFilePrivate::procCallback(UINT msg, LPARAM rawSelf,
^
../../QtRAR-master/src/qtrar.cpp:87:15: error: use of undeclared identifier 'ERAR_SUCCESS'; did you mean 'RARX_SUCCESS'?
m_error = ERAR_SUCCESS;
^~~~~~~~~~~~
RARX_SUCCESS
../../QtRAR-master/src/unrar/errhnd.hpp:6:3: note: 'RARX_SUCCESS' declared here
RARX_SUCCESS = 0,
^
../../QtRAR-master/src/qtrarfile.cpp:86:36: error: unknown type name 'LPARAM'
LPARAM p1, LPARAM p2)
^
../../QtRAR-master/src/qtrarfile.cpp:86:47: error: unknown type name 'LPARAM'
LPARAM p1, LPARAM p2)
^
../../QtRAR-master/src/qtrar.cpp:101:5: error: unknown type name 'RARHeaderDataEx'
RARHeaderDataEx hData;
^
../../QtRAR-master/src/qtrar.cpp:103:47: error: use of undeclared identifier 'ERAR_SUCCESS'; did you mean 'RARX_SUCCESS'?
while (RARReadHeaderEx(m_hArc, &hData) == ERAR_SUCCESS) {
^~~~~~~~~~~~
RARX_SUCCESS
../../QtRAR-master/src/unrar/errhnd.hpp:6:3: note: 'RARX_SUCCESS' declared here
RARX_SUCCESS = 0,
^
../../QtRAR-master/src/qtrarfile.cpp:90:16: error: use of undeclared identifier 'UCM_PROCESSDATA'
if (msg == UCM_PROCESSDATA) {
^
../../QtRAR-master/src/qtrarfile.cpp:94:23: error: use of undeclared identifier 'UCM_NEEDPASSWORD'
} else if (msg == UCM_NEEDPASSWORD) {
^
../../QtRAR-master/src/qtrar.cpp:128:36: error: use of undeclared identifier 'RAR_SKIP'
if (RARProcessFile(m_hArc, RAR_SKIP, NULL, NULL) != ERAR_SUCCESS) {
^
../../QtRAR-master/src/qtrar.cpp:128:61: error: use of undeclared identifier 'ERAR_SUCCESS'
if (RARProcessFile(m_hArc, RAR_SKIP, NULL, NULL) != ERAR_SUCCESS) {
^
../../QtRAR-master/src/qtrar.cpp:160:5: error: unknown type name 'RAROpenArchiveDataEx'
RAROpenArchiveDataEx arcData;
^
../../QtRAR-master/src/qtrar.cpp:174:28: error: use of undeclared identifier 'RAR_OM_LIST'
arcData.OpenMode = RAR_OM_LIST;
^
../../QtRAR-master/src/qtrarfile.cpp:233:20: error: use of undeclared identifier 'ERAR_SUCCESS'; did you mean 'RARX_SUCCESS'?
m_p->m_error = ERAR_SUCCESS;
^~~~~~~~~~~~
RARX_SUCCESS
../../QtRAR-master/src/unrar/errhnd.hpp:6:3: note: 'RARX_SUCCESS' declared here
RARX_SUCCESS = 0,
^
../../QtRAR-master/src/qtrarfile.cpp:259:38: error: call to non-static member function without an object argument
QtRARFilePrivate::procCallback,
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
../../QtRAR-master/src/qtrar.cpp:176:28: error: use of undeclared identifier 'RAR_OM_EXTRACT'
arcData.OpenMode = RAR_OM_EXTRACT;
^
../../QtRAR-master/src/qtrarfile.cpp:260:37: error: unknown type name 'LPARAM'
reinterpret_cast<LPARAM>(m_p));
^
../../QtRAR-master/src/qtrar.cpp:184:39: error: use of undeclared identifier 'ERAR_SUCCESS'; did you mean 'RARX_SUCCESS'?
bool isSuccess = (m_p->m_error == ERAR_SUCCESS);
^~~~~~~~~~~~
RARX_SUCCESS
../../QtRAR-master/src/unrar/errhnd.hpp:6:3: note: 'RARX_SUCCESS' declared here
RARX_SUCCESS = 0,
^
../../QtRAR-master/src/qtrarfile.cpp:269:5: error: unknown type name 'RARHeaderData'
RARHeaderData hData;
^
../../QtRAR-master/src/qtrar.cpp:199:13: error: use of undeclared identifier 'RARSetPasswordW'
RARSetPasswordW(m_p->m_hArc, const_cast<wchar *>(passwordW.data()));
^
../../QtRAR-master/src/qtrarfile.cpp:270:64: error: use of undeclared identifier 'ERAR_SUCCESS'; did you mean 'RARX_SUCCESS'?
if (RARReadHeader(m_p->m_rar->unrarArcHandle(), &hData) != ERAR_SUCCESS) {
^~~~~~~~~~~~
RARX_SUCCESS
../../QtRAR-master/src/unrar/errhnd.hpp:6:3: note: 'RARX_SUCCESS' declared here
RARX_SUCCESS = 0,
^
../../QtRAR-master/src/qtrar.cpp:214:9: error: use of undeclared identifier 'RARCloseArchive'
RARCloseArchive(m_p->m_hArc);
^
../../QtRAR-master/src/qtrarfile.cpp:276:65: error: use of undeclared identifier 'RAR_TEST'
m_p->m_error = RARProcessFile(m_p->m_rar->unrarArcHandle(), RAR_TEST, 0, 0);
^
../../QtRAR-master/src/qtrarfile.cpp:279:25: error: use of undeclared identifier 'ERAR_SUCCESS'; did you mean 'RARX_SUCCESS'?
if (m_p->m_error == ERAR_SUCCESS) {
^~~~~~~~~~~~
RARX_SUCCESS
../../QtRAR-master/src/unrar/errhnd.hpp:6:3: note: 'RARX_SUCCESS' declared here
RARX_SUCCESS = 0,
^
../../QtRAR-master/src/qtrar.cpp:301:9: error: unknown type name 'RARHeaderDataEx'
RARHeaderDataEx hData;
^
../../QtRAR-master/src/qtrar.cpp:302:53: error: use of undeclared identifier 'ERAR_SUCCESS'; did you mean 'RARX_SUCCESS'?
if (RARReadHeaderEx(m_p->m_hArc, &hData) == ERAR_SUCCESS) {
^~~~~~~~~~~~
RARX_SUCCESS
../../QtRAR-master/src/unrar/errhnd.hpp:6:3: note: 'RARX_SUCCESS' declared here
RARX_SUCCESS = 0,
^
../../QtRAR-master/src/qtrar.cpp:303:45: error: use of undeclared identifier 'RAR_SKIP'
if (RARProcessFile(m_p->m_hArc, RAR_SKIP, 0, 0) == ERAR_SUCCESS) {
^
../../QtRAR-master/src/qtrar.cpp:303:64: error: use of undeclared identifier 'ERAR_SUCCESS'
if (RARProcessFile(m_p->m_hArc, RAR_SKIP, 0, 0) == ERAR_SUCCESS) {
^
18 errors generated.
make[1]: *** [qtrarfile.o] Error 1
make[1]: *** Waiting for unfinished jobs....
19 errors generated.
make[1]: *** [qtrar.o] Error 1
make: *** [sub-src-make_first] Error 2
12:22:48: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project qtrar (kit: Desktop Qt 5.13.2 clang 64bit)
When executing step "Make"
ArchangelSDY commented
I usually use CMake so qtrar.pro
may be a bit outdated. Just submitted a fix. Could you try again?
kubark42 commented
Thanks for looking into this. I still get the same error.
I also tried with cmake
, and here I think it's a path problem:
Documents: $ cd QtRAR-master
QtRAR-master: $ mkdir build
QtRAR-master: $ cd build/
build:$ cmake ..
-- The C compiler identification is AppleClang 11.0.0.11000033
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
CMake Error at CMakeLists.txt:5 (find_package):
By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Core", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5Core" with any
of the following names:
Qt5CoreConfig.cmake
qt5core-config.cmake
Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set
"Qt5Core_DIR" to a directory containing one of the above files. If
"Qt5Core" provides a separate development package or SDK, be sure it has
been installed.
-- Configuring incomplete, errors occurred!
See also "~/Documents/QtRAR-master/build/CMakeFiles/CMakeOutput.log".
build: $
ArchangelSDY commented
For qmake, if you're using Qt Creator, you can try Build - Run qmake
and Build - Rebuild All
.
For cmake, please add your Qt installation prefix to CMAKE_PREFIX_PATH
. See this doc