Jump to content


Tutorial 8 with C++ OpenGL?


1 reply to this topic

#1 IceFire

    New Member

  • Members
  • Pip
  • 1 posts

Posted 14 April 2005 - 02:36 AM

Hello, I'm currently in the process of building a OGG streaming engine for my OpenGL game. I've looked and messed around with the Tutorial 8 program, trying to implement it into C++ GL, but to my dismay I came to realize that the Vorbis DLLs are built from C code, and call the LIBC library, which affects my using it in C++. I was just wondering if there's a way I could somehow get around that, without having to dig into the libraries and dlls to change stuff. I've tried rebuilding the DLLs as C++ builds, but it seems there's a struct or something named class, which isn't legal C++ code, and I don't even dare touch it.

Anyhow, I'd be grateful to anybody who could offer me some help with this. I've been fussing over it for a while now, and I'm beginning to think I should just dump it all and move on to SDL or FMOD haha

Thanks,
IceFire

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 5311 posts
  • LocationSanta Clara, CA

Posted 14 April 2005 - 03:20 AM

The DLLs using a different library shouldn't cause any problems. There might be a problem including a C header file into a C++ program due to name mangling, but that can be solved by placing extern "C" around the header. EG:
extern "C" {
  #include "ogg.h"
}

reedbeta.com - developer blog, OpenGL demos, and other projects





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users