MIDI-OX User Forum (http://www.midiox.com/cgi-bin/yabb/YaBB.pl)
General >> General Board >> Header file missing from mf2tsrc.zip
(Message started by: eeijlar on Jul 7th, 2003, 11:33am)

Title: Header file missing from mf2tsrc.zip
Post by eeijlar on Jul 7th, 2003, 11:33am
Hi Jamie,
I tried setting up the build environment as per your last post  using nmake -f makefile.bsc. It says it's missing a header file "mfread.h" which is not in "mf2tsrc.zip"... Any idea where I can get this?

thanks again,
eeijlar

Title: Re: Header file missing from mf2tsrc.zip
Post by Jamie OConnell on Jul 8th, 2003, 2:50am
There is no makefile.bsc in the zip?  There is a makefile.msc, which is the only makefile that will work with Microsoft compilers: makefile.bcc is only for Borland C, makefile.st is for Atari ST, and makefile.unx is for Unix.  The Microsoft compiler is the only one that has a command named nmake, the others usually use a command named make.

I don't know what you really managed to do because there is also no header named mfread.h named in any of the source or the makefiles (or even in any of the text)?  The closest I can come to that is that there is a function named, mfread in midifile.c?  I downloaded a fresh copy of the source from cs.ruu.nl just to make sure.

For what it's worth, I get some warnings when I build makefile.msc with MSVC++ 6.0.  If it were my code, I would clean up the warnings, but it's not, and the resulting program works pretty good.  Here is the output I get:


\\Blues\D J:\Dev\mf2t>nmake -f makefile.msc

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

       cl -O /AC -DSETMODE /c midifile.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

Command line warning D4002 : ignoring unknown option '/AC'
midifile.c
midifile.c(476) : warning C4716: 'mferror' : must return a value
       cl -O /AC -DSETMODE /c mf2t.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

Command line warning D4002 : ignoring unknown option '/AC'
mf2t.c
mf2t.c(145) : warning C4716: 'error' : must return a value
mf2t.c(362) : warning C4716: 'prtime' : must return a value
mf2t.c(410) : warning C4716: 'prtext' : must return a value
mf2t.c(430) : warning C4716: 'prhex' : must return a value
mf2t.c(456) : warning C4716: 'initfuncs' : must return a value
       cl -O /AC -DSETMODE /c crack.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

Command line warning D4002 : ignoring unknown option '/AC'
crack.c
crack.c(79) : warning C4047: 'return' : 'int ' differs in levels of indirection
from 'void *'
crack.c(82) : warning C4047: 'return' : 'int ' differs in levels of indirection
from 'void *'
crack.c(85) : warning C4047: '!=' : 'int ' differs in levels of indirection from
'void *'
crack.c(103) : warning C4047: 'return' : 'int ' differs in levels of indirection
from 'void *'
       cl mf2t.obj midifile.obj crack.obj
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/out:mf2t.exe
mf2t.obj
midifile.obj
crack.obj
       cl -O /AC -DSETMODE /c t2mf.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

Command line warning D4002 : ignoring unknown option '/AC'
t2mf.c
t2mf.c(175) : warning C4716: 'translate' : must return a value
       cl -O /AC -DSETMODE /c t2mflex.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

Command line warning D4002 : ignoring unknown option '/AC'
t2mflex.c
       cl t2mf.obj midifile.obj crack.obj t2mflex.obj
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/out:t2mf.exe
t2mf.obj
midifile.obj
crack.obj
t2mflex.obj

\\Blues\D J:\Dev\mf2t>



Title: Re: Header file missing from mf2tsrc.zip
Post by aoeu on Oct 19th, 2008, 12:11pm
Hi,
    I'm trying to make mf2t on a unix or mac system.  It has worked really well on DOS just by downloading the .exe, but I want to use it in some scripts with UNIX programs.  I tried using makefile.unx (suggested in your post), and I cleaned up the code so that it compiled successfully (with gcc).  But there's always some glitch when I run the program.  First, it prints "unexpected byte" and exits before reaching any note messages.  How do you change the source code to get rid of this problem?

Thanks very much.

Title: Re: Header file missing from mf2tsrc.zip
Post by Jamie OConnell on Oct 20th, 2008, 10:53am
A forum member, Ying-Da Lee, has created updated versions of the original project codes.  I suggest you try those:
http://www.midiox.com/zip/mf2tXP.zip
http://www.midiox.com/zip/mf2tXP-src.zip



MIDI-OX User Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.