Sorry, but I'm not good at this kind of things, so I can't help you anymore.
I tried compiling the demo and it gives me just a couple of warnings (similar to yours), but no errors.
I need help..
hahahaha...
thanks for helping me to solve the first source code..
I will just have to forget about the second source code..
thanks for helping me to solve the first source code..
I will just have to forget about the second source code..
In VC7, this compiles (the thing demo) fine.
There's two warnings to do with floats that need to be cast to ints in Progess.h, not an issue:
glVertex2i(100+600*(int)x, 290); ////////// cast
glVertex2i(100+600*(int)x, 310); ////////// cast
The stuff your getting about _calloc and _free has to do with the miniFMOD lib included with the program, if you go to www.fmod.org, you can download the source to this lib, fix it and recompile the lib.
The problem you're having tracks down to the system_memory.h file in the code distribution, here's the source of the problem:
#ifndef _SYSTEM_MEMORY_H_
#define _SYSTEM_MEMORY_H_
// include your system's header here
#include <stdlib.h>
// redefine here
#define FSOUND_Memory_Free(_ptr) free(_ptr)
#define FSOUND_Memory_Alloc(_len) calloc(_len, 1)
#define FSOUND_Memory_Calloc(_len) calloc(_len, 1)
#define FSOUND_Memory_Realloc(_ptr, _len) realloc(_ptr, _len)
#endif
The minifmod lib redefines local API functions and exports them back to the main binary (the one you're trying to compile) - this just results in a redefinition warning on VC7.
If you want to fix this, comment out the offending stuff in minifmod's system_memory.h and rewrite the above four macros as functions, wrapping the calls to free(), calloc() and realloc() inside those functions, like this:
void FSOUND_Memory_Free(void *_ptr){
free(_ptr);
return;
}
void * FSOUND_Memory_Alloc(unsigned int _len){
return (void *) calloc(_len,1);
}
void * FSOUND_Memory_Calloc(unsigned int _len){
return (void *) calloc(_len,1);
}
void * FSOUND_Memory_Realloc(void *_ptr, unsigned int _len){
return (void *) realloc(_ptr, _len);
}
I think that'll do what you need.
[Edited by - comservlant on November 28, 2004 12:03:15 AM]
There's two warnings to do with floats that need to be cast to ints in Progess.h, not an issue:
glVertex2i(100+600*(int)x, 290); ////////// cast
glVertex2i(100+600*(int)x, 310); ////////// cast
The stuff your getting about _calloc and _free has to do with the miniFMOD lib included with the program, if you go to www.fmod.org, you can download the source to this lib, fix it and recompile the lib.
The problem you're having tracks down to the system_memory.h file in the code distribution, here's the source of the problem:
#ifndef _SYSTEM_MEMORY_H_
#define _SYSTEM_MEMORY_H_
// include your system's header here
#include <stdlib.h>
// redefine here
#define FSOUND_Memory_Free(_ptr) free(_ptr)
#define FSOUND_Memory_Alloc(_len) calloc(_len, 1)
#define FSOUND_Memory_Calloc(_len) calloc(_len, 1)
#define FSOUND_Memory_Realloc(_ptr, _len) realloc(_ptr, _len)
#endif
The minifmod lib redefines local API functions and exports them back to the main binary (the one you're trying to compile) - this just results in a redefinition warning on VC7.
If you want to fix this, comment out the offending stuff in minifmod's system_memory.h and rewrite the above four macros as functions, wrapping the calls to free(), calloc() and realloc() inside those functions, like this:
void FSOUND_Memory_Free(void *_ptr){
free(_ptr);
return;
}
void * FSOUND_Memory_Alloc(unsigned int _len){
return (void *) calloc(_len,1);
}
void * FSOUND_Memory_Calloc(unsigned int _len){
return (void *) calloc(_len,1);
}
void * FSOUND_Memory_Realloc(void *_ptr, unsigned int _len){
return (void *) realloc(_ptr, _len);
}
I think that'll do what you need.
[Edited by - comservlant on November 28, 2004 12:03:15 AM]
there are 2 minifmod files..
"minifmod160" and "minifmod170"
which one should I download..?
let's say I have downloaded one of the files.. then what should I do next. Do I have to drag the whole files into the Andreas(source code folder)?
"minifmod160" and "minifmod170"
which one should I download..?
let's say I have downloaded one of the files.. then what should I do next. Do I have to drag the whole files into the Andreas(source code folder)?
I grabed version, 170.
I'm sure they're both backward-compatible with the version used in the demo.
When you unzip the files, the minifmod directory's doc-root is
..\minifmod170, just double-click on the *.dsw file you find in there and the project will load into VC.
Be sure to set the project to 'release' mode before you compile since VC has a habit of defaulting to debug if it has to 'convert' a project because of version differences.
The compiled minifmod.lib file is droped in ..\minifmod170 rather than the \debug or \release directories created by VC.
Replace the minifmod.lib file you find in Andreas Hammar's source-directory with the minifmod.lib you just compiled and you're good to go.
This demo is really well done, Andreas did a great job on it.
I'm sure they're both backward-compatible with the version used in the demo.
When you unzip the files, the minifmod directory's doc-root is
..\minifmod170, just double-click on the *.dsw file you find in there and the project will load into VC.
Be sure to set the project to 'release' mode before you compile since VC has a habit of defaulting to debug if it has to 'convert' a project because of version differences.
The compiled minifmod.lib file is droped in ..\minifmod170 rather than the \debug or \release directories created by VC.
Replace the minifmod.lib file you find in Andreas Hammar's source-directory with the minifmod.lib you just compiled and you're good to go.
This demo is really well done, Andreas did a great job on it.
BTW, if it turns out that you're having a difficult time getting this to compile because the demo may have beem originally built with VC7 and you're using VC6 (and I don't know this to be the case), you may want to take advantage of Microsoft's free compiler offer.
You can download the PRO (optimising) version of VC 2003.net, (although command line only, without the IDE), here:
msdn.microsoft.com/visualc/vctoolkit2003
About 35 megs or so, as I recall.
You can download the PRO (optimising) version of VC 2003.net, (although command line only, without the IDE), here:
msdn.microsoft.com/visualc/vctoolkit2003
About 35 megs or so, as I recall.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement