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)

win32.log (54.5 KB) - added by wagabunda 10 years ago.
6971-mythplugins-mythvideo-mtd-logging_cpp.patch (455 bytes) - added by Jonathan Martens <jonathan@…> 10 years ago.
Fix mtd compilation
6971-mythplugins-mythvideo-mtd-logging_cpp.2.patch (390 bytes) - added by Jonathan Martens <jonathan@…> 10 years ago.
Correct version of the patch for mtd's logging.cpp

Download all attachments as: .zip

Change History (14)

Changed 10 years ago by wagabunda

Attachment: win32.log added

comment:1 Changed 10 years ago by anonymous

Just add to the top of schedulecommon.cpp:

#include <unistd.h>

comment:2 in reply to:  1 ; Changed 10 years ago by Jonathan Martens <jonathan@…>

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 in reply to:  2 ; Changed 10 years ago by wagabunda

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 in reply to:  3 ; Changed 10 years ago by Jonathan Martens <jonathan@…>

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 Jonathan Martens <jonathan@…>

Fix mtd compilation

comment:5 in reply to:  4 ; Changed 10 years ago by wagabunda

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 in reply to:  5 ; Changed 10 years ago by Jonathan Martens <jonathan@…>

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 in reply to:  6 Changed 10 years ago by wagabunda

... and you should hold your horses.

They have already gone to sleep...

comment:8 Changed 10 years ago by Jonathan Martens <jonathan@…>

Oops, it seems my patch accidentally dropped a line, which it should not have. Will attach a new one.

Changed 10 years ago by Jonathan Martens <jonathan@…>

Correct version of the patch for mtd's logging.cpp

comment:9 in reply to:  2 Changed 10 years ago by anonymous

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 in reply to:  8 Changed 10 years ago by wagabunda

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 markk

Resolution: fixed
Status: newclosed

(In [21658]) Small compilation fix for MythVideo? on windows. Closes #6971.

Note: See TracTickets for help on using tickets.