View Full Version : Problem compiling 2.5 plugins
Si
30th January 2003, 07:59
Time for 1st set of stupid problems :o
I tried compling one of my filters using avisynth.h from the 2.5 beta source zip package on sourceforge and got 3 errors like
c:\program files\microsoft visual studio\vc98\include\winnt.h(3143) : error C2146: syntax error : missing ';' before identifier 'ContextRecord'
and 2 errors similar to above but referring to winbase.h.
I tried doing the same on a simple copy source to dest filter and got the same errors.
If I replace avisynth.h with old version - no problems.
Any clues anyone?
regards
Simon
neuron2
30th January 2003, 14:20
Try including internal.h instead of avisynth.h but leave the new avisynth.h in the directory.
trbarry
30th January 2003, 17:06
That's what I've been doing too but I think it's really because you also need to include windef.h or something like that.
- Tom
vlad59
30th January 2003, 18:23
@siwalters
That's strange. I'm developing with VC6 and I never got these warnings. My include starts like this :
#include <windows.h>
#include <string.h>
#include <stdio.h>
#include "avisynth.h"
I don't thinks I'm statically linking a lots of libs.
Hope this helps.
Si
30th January 2003, 20:47
Thanks for the info - I tried vlad59's and it works - I'm sure the other way would do as well.
Just for info - its the combination of including windows.h and avisynth.h that removes the errors.
@developer team - can you update the documentation/invert examples please (or put windows.h in avisynth.h - if its possible/wise :confused: )
regards
Simon
ARDA
30th January 2003, 21:30
I've just made #include "internal.h" in avisynth.h
leave "internal.h" in the same directory.Internal.h
has all this includes:
#include <objbase.h>
#include <vfw.h>
#include <windows.h>
#include <stdio.h>
#include <malloc.h>
#include <math.h>
#include <vector>
I hope that can be useful Arda
neuron2
30th January 2003, 21:57
Originally posted by ARDA
I've just made #include "internal.h" in avisynth.hBut internal.h already includes avisynth.h.
Around and around we go. :)
ARDA
30th January 2003, 22:20
#ifndef __Internal_H__
#define __Internal_H__
#define WIN32_LEAN_AND_MEAN
#include <objbase.h>
#include <vfw.h>
#include <windows.h>
#include <stdio.h>
#include <malloc.h>
#include <math.h>
#include <vector>
this the one I use.Where did I get it?:confused:
ARDA
30th January 2003, 22:24
I've just dowload from cvs the latest one
and you are right this its header
#ifndef __Internal_H__
#define __Internal_H__
#define AVS_VERSION 2.50
#define AVS_VERSTR "AviSynth 2.50 beta (avisynth.org) 28 jan. 2003"
#define WIN32_LEAN_AND_MEAN
#include <objbase.h>
#include <vfw.h>
#include <windows.h>
#include <stdio.h>
#include <malloc.h>
#include <math.h>
#include <vector>
#include "avisynth.h"
anyway I could compile in that way
Arda:confused:
scmccarthy
30th January 2003, 22:37
@siwalters
The answer is you must include windows.h, windef.h gets included with windows.h, so I just replace windef.h with windows.h in the avisynth.h file itself. Then I just include avisynth.h in my source. Not all those other includes. I feel internal.h simply pulls in too many include files you don't need. It used to be nesessary to include internal.h, but not longer. Now avisynth.h has everything you need. Everything except for one point, windef.h cannot be included directly without generating errors, you have to include windows.h instead.
Stephen
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.