Opened 10 years ago
Closed 10 years ago
#6971 closed defect (fixed)
Win32 compile error
Reported by: | wagabunda | Owned by: | Isaac Richards |
---|---|---|---|
Priority: | minor | Milestone: | 0.22 |
Component: | MythTV - General | Version: | unknown |
Severity: | high | Keywords: | |
Cc: | Ticket locked: | no |
Description
from revision 21606, I did not check earlier.
schedulecommon.cpp: In member function 'void ScheduleCommon::ShowDetails(ProgramInfo*) const': schedulecommon.cpp:61: error: 'usleep' was not declared in this scope make[2]: *** [schedulecommon.o] Error 1
Attachments (3)
Change History (14)
comment:2 follow-ups: 3 9 Changed 10 years ago by
Replying to anonymous:
Just add to the top of schedulecommon.cpp:
#include <unistd.h>
Shouldn't this be fixed by adding (as this most likely is only for windows):
#ifdef USING_MINGW #include <unistd.h> #endif
comment:3 follow-up: 4 Changed 10 years ago by
After this change the mythfrontend compiled correctly. However, there are other errors.
ignored:
cp "mythfrontend.exe" "/C/mythtv/build/bin/mythfrontend.exe" ldconfig make[2]: ldconfig: Command not found make[2]: [install_setting] Error 127 (ignored)
and critical:
logging.cpp: In member function 'void MTDLogger::addStartup()': logging.cpp:68: error: 'gethostname' was not declared in this scope make[2]: *** [logging.o] Error 1 make[2]: Leaving directory `/C/mythtv/mythplugins/mythvideo/mtd' make[1]: *** [sub-mtd-install_subtargets] Error 2 make[1]: Leaving directory `/C/mythtv/mythplugins/mythvideo' make: *** [sub-mythvideo-install_subtargets] Error 2
comment:4 follow-up: 5 Changed 10 years ago by
Replying to wagabunda:
and critical:
logging.cpp: In member function 'void MTDLogger::addStartup()': logging.cpp:68: error: 'gethostname' was not declared in this scope make[2]: *** [logging.o] Error 1 make[2]: Leaving directory `/C/mythtv/mythplugins/mythvideo/mtd' make[1]: *** [sub-mtd-install_subtargets] Error 2 make[1]: Leaving directory `/C/mythtv/mythplugins/mythvideo' make: *** [sub-mythvideo-install_subtargets] Error 2
Hold your horses, I still have a few patches to test, but this one should fix that issue.
Changed 10 years ago by
Attachment: | 6971-mythplugins-mythvideo-mtd-logging_cpp.patch added |
---|
Fix mtd compilation
comment:5 follow-up: 6 Changed 10 years ago by
Hold your horses, I still have a few patches to test, but this one should fix that issue.
Unfortunately, another problem appeared.
logging.cpp: In member function 'bool MTDLogger::Init()': logging.cpp:32: error: 'gContext' was not declared in this scope logging.cpp:35: error: 'VB_IMPORTANT' was not declared in this scope logging.cpp:36: error: 'VERBOSE' was not declared in this scope logging.cpp:47: error: 'VB_IMPORTANT' was not declared in this scope logging.cpp:50: error: 'VERBOSE' was not declared in this scope logging.cpp: In member function 'void MTDLogger::writeString(const QString&)': logging.cpp:100: error: 'VB_IMPORTANT' was not declared in this scope logging.cpp:100: error: 'VERBOSE' was not declared in this scope logging.cpp:104: error: 'QTextStream' was not declared in this scope logging.cpp:104: error: expected `;' before 'stream' logging.cpp:105: error: 'stream' was not declared in this scope logging.cpp:105: error: 'endl' was not declared in this scope logging.cpp:105: error: 'flush' was not declared in this scope make[2]: *** [logging.o] Error 1 make[2]: Leaving directory `/C/mythtv/mythplugins/mythvideo/mtd' make[1]: *** [sub-mtd-install_subtargets] Error 2 make[1]: Leaving directory `/C/mythtv/mythplugins/mythvideo' make: *** [sub-mythvideo-install_subtargets] Error 2
comment:6 follow-up: 7 Changed 10 years ago by
Replying to wagabunda:
Hold your horses, I still have a few patches to test, but this one should fix that issue.
Unfortunately, another problem appeared.
That is why I said I was still testing things... and you should hold your horses.
comment:7 Changed 10 years ago by
... and you should hold your horses.
They have already gone to sleep...
comment:8 follow-up: 10 Changed 10 years ago by
Oops, it seems my patch accidentally dropped a line, which it should not have. Will attach a new one.
Changed 10 years ago by
Attachment: | 6971-mythplugins-mythvideo-mtd-logging_cpp.2.patch added |
---|
Correct version of the patch for mtd's logging.cpp
comment:9 Changed 10 years ago by
Replying to Jonathan Martens <jonathan@snetram.nl>:
Shouldn't this be fixed by adding (as this most likely is only for windows):
#ifdef USING_MINGW #include <unistd.h> #endif
Sure, you can do that, but unistd.h is not just windows; it's POSIX standard header for usleep, so it should be fine to include on any unix-like platform.
comment:10 Changed 10 years ago by
Replying to Jonathan Martens <jonathan@snetram.nl>:
Oops, it seems my patch accidentally dropped a line, which it should not have. Will attach a new one.
Now it is correct. Thanks!
comment:11 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [21658]) Small compilation fix for MythVideo? on windows. Closes #6971.
Just add to the top of schedulecommon.cpp:
#include <unistd.h>