在borland turbo c++ 4.5中出现FMOD错误
FMOD error in borland turbo c++ 4.5
当我试图编译它给我26个错误,但一切都在正确的地方但无法理解的误差大多是常数太长。我想用C编程来播放mp3文件。
*错误显示在JPG图像
#include "inc/fmod.h"
FMUSIC_MODULE* handle;
int main ()
{
// init FMOD sound system
FSOUND_Init (44100, 32, 0);
// load song
handle=FMUSIC_LoadSong ("don.mp3");
// play song only once
// when you want to play a midi file you have to disable looping
// BEFORE playing the song else this command has no effect!
FMUSIC_SetLooping (handle, false);
// play song
FMUSIC_PlaySong (handle);
// wait until the users hits a key to end the app
while (!_kbhit())
{
}
//clean up
FMUSIC_FreeSong (handle);
FSOUND_Close();
}
https://i.stack.imgur.com/JH4Ts.jpg Borland Turbo c++早于大多数c++标准和现代C。我不希望FMOD或任何现代库与此编译器一起工作。
Visual c++可以在Express中自由使用,并且是一个更好的编译器。
您所列出的代码是FMOD 3代码,但您正在使用FMOD 4头文件(也可能是库)。这将不起作用,我可以从您的错误pic中看到您也有其他问题,可能包括未正确设置路径。
我们提供了一个你需要链接的Borland库:'fmodex_bc。但是这是FMOD 4的代码,我强烈建议你看看SDK附带的"playstream"示例,它演示了MP3播放。
相关文章:
- 警告处理为错误这里有什么问题
- "error: no matching function for call to"构造函数错误
- boost::进程间消息队列引发错误
- C++,OpenCV,尝试显示图像时"OpenCV(4.3.0) Error: Assertion failed (size.width>0 && size.height>0)"此错误
- 有关插入适配器的错误。[错误]请求从 'back_insert_iterator<vector<>>' 类型转换为非标量类型
- QT在错误的班级中寻找空位
- vector.resize()中的分配错误
- 代码在main()中运行,但在函数中出现错误
- 释放错误后堆使用
- (C++)分析树以计算返回错误值的简单算术表达式
- Project Euler问题4的错误解决方案
- 我的字符计数代码计算错误.为什么
- 从"int*"强制转换为"unsigned int"会丢失精度错误
- 尝试导入pybind-opencv模块时出现libgtk错误
- 链接器错误:尝试使用 FMOD 进行编译时LNK1181
- C++-fmod返回错误的答案
- 如何解决此错误?(在QT Creator中使用FMOD)
- 在borland turbo c++ 4.5中出现FMOD错误
- fmod音频.setMusicSpeed返回不支持的格式错误
- Fmod为While循环条件错误