Opened 16 years ago

Closed 16 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 16 years ago.
6971-mythplugins-mythvideo-mtd-logging_cpp.patch (455 bytes ) - added by Jonathan Martens <jonathan@…> 16 years ago.
Fix mtd compilation
6971-mythplugins-mythvideo-mtd-logging_cpp.2.patch (390 bytes ) - added by Jonathan Martens <jonathan@…> 16 years ago.
Correct version of the patch for mtd's logging.cpp

Download all attachments as: .zip

Change History (14)

by wagabunda, 16 years ago

Attachment: win32.log added

comment:1 by anonymous, 16 years ago

Just add to the top of schedulecommon.cpp:

#include <unistd.h>

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

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

in reply to:  2 ; comment:3 by wagabunda, 16 years ago

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

in reply to:  3 ; comment:4 by Jonathan Martens <jonathan@…>, 16 years ago

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.

by Jonathan Martens <jonathan@…>, 16 years ago

Fix mtd compilation

in reply to:  4 ; comment:5 by wagabunda, 16 years ago

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

in reply to:  5 ; comment:6 by Jonathan Martens <jonathan@…>, 16 years ago

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.

in reply to:  6 comment:7 by wagabunda, 16 years ago

... and you should hold your horses.

They have already gone to sleep...

comment:8 by Jonathan Martens <jonathan@…>, 16 years ago

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

by Jonathan Martens <jonathan@…>, 16 years ago

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

in reply to:  2 comment:9 by anonymous, 16 years ago

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.

in reply to:  8 comment:10 by wagabunda, 16 years ago

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 by markk, 16 years ago

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.