View Full Version : compiler
torwart
6th November 2012, 12:21
hello.
which compiler do i need to compile a working avisynth filter???
i tried to do it with Microsoft Visual C++ Toolkit 2003(from codeblocks) and Microsoft Visual C++ 2005/2008. i created a .cpp file , copied there a source code, included avisynth.h, but no luck. what to do?????
LoRd_MuldeR
6th November 2012, 12:56
How exactly did you try to compile? And what was the specific problem you got?
jmac698
7th November 2012, 02:54
I wrote a guide to this but unfortunately avisynthnew.wikinet.org went down
Maybe I can dig it up
I got it to work with vs2008
torwart
7th November 2012, 07:31
i think the problem is that Microsoft Visual Toolkit 2003 is not well integrated with codeblocks. i have installed toolkit 2003 but codeblocks sees only 2 files: c++ compiler and linker.
when i create a dll in codeblocks it gives me two files main.cpp and header:
http://s55.radikal.ru/i149/1211/0a/c45b0aa40e3et.jpg (http://radikal.ru/F/s55.radikal.ru/i149/1211/0a/c45b0aa40e3e.jpg.html)
http://s018.radikal.ru/i523/1211/1a/153ccbc7d60et.jpg (http://radikal.ru/F/s018.radikal.ru/i523/1211/1a/153ccbc7d60e.jpg.html)
do i need these files or it is better to just create a new .cpp file, include avisynth.h there and paste a source of a working filter????
Myrsloik
7th November 2012, 14:43
Why oh why? There are about zero reasons to use ancient compilers and obscure ides to get started.
The process is simple to get a modern environment for free:
1. Download and install vs 2010 express for free. Only the c++ part is needed. If you want to save space uncheck everything that's documentation or .net. Then apply all updates.
2. Start it. Click new project. Select win32 project. In the next window select dll and empty project.
3. Add avisynth.h to you project
4. Add a new cpp file and put your filter code there.
5. Compile and now you're done.
Bonus info
To debug:
1. Write an avisynth script that loads your filter and uses the function you want to debug in it. Make sure to point it to the path of the debug dll.
2. Right click your project in the project tree and open the properties.
3. Under the debug tab point it to run virtualdub and set the command argument to the full path of the avisynth script.
4. Start debugging.
If you feel hardcore you may try to configure qt creator to work with visual studio compiler.
jmac698
7th November 2012, 15:30
I got code blocks to work, it's a nice IDE
torwart
8th November 2012, 09:36
thanks for answers, but its still interesting how to integrate microsoft visual compiler(2003 or 2010) with codeblocks.
now i realized the problem. cnr2.cpp needed not only avisynth.h but other headers too(internal.h,resource.h). i've added them and now it needs only windows.h. what to do with it how to make them find eachother????
Gavino
8th November 2012, 12:34
thanks for answers, but its still interesting how to integrate microsoft visual compiler(2003 or 2010) with codeblocks.
now i realized the problem. cnr2.cpp needed not only avisynth.h but other headers too(internal.h,resource.h). i've added them and now it needs only windows.h. what to do with it how to make them find eachother????
I too use CodeBlocks with the Microsoft 2003 compiler (since it works, I've felt no need to 'upgrade').
Just add the folder containing windows.h (normally C:\Program Files\Microsoft Platform SDK\Include) to the list of compiler search directories, either in your project build options, or in the global compiler settings.
StainlessS
8th November 2012, 13:45
@torwart,
You can delete Internal.h & Resource.h
and replace Avisynth.h version 2 with Avisynth.h version 3
and change this sequence in cnr2.h
#include <windows.h>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include "Internal.h"
to
#include <windows.h>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include "Avisynth.h"
Internal.h is not needed with version 3 Avisynth.h and Resource.h is MS MFC generated crud.
PS, DEBUG libs are not included with TK3
EDIT: You can get Avisynth.h v3 in any of the plugins in the link in my sig.
EDIT: There is also a CNR2K plug at WarpEnterprises, dll+source, no manual. http://avisynth.org/warpenterprises/
EDIT: You dont need the latest versions compiler or other software, for maximum compatibility you need the earliest that supports
your requirements, people that think the latest version of everything is what you need are at best misguided, much like those websites that
demand the latest version browser just to view it, best avoided.
torwart
8th November 2012, 16:03
thanks for answers about headers.
i have found this page
http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE
and it seems now everything has to be clear...
so all i need is:
1) codeblocks ide
2) Microsoft Visual C++ Toolkit 2003
3) Platform SDK
4) .NET Framework SDK
now i'am downloading Microsoft Windows SDK for Windows 7 and .NET Framework 4 (ISO) and it is published 5/19/2010, version is 7.1.
is this ok for Microsoft Visual C++ Toolkit 2003????
Gavino
8th November 2012, 18:25
now i'am downloading Microsoft Windows SDK for Windows 7 and .NET Framework 4 (ISO) and it is published 5/19/2010, version is 7.1.
is this ok for Microsoft Visual C++ Toolkit 2003????
I don't think so - see http://en.wikipedia.org/wiki/Platform_SDK#Versions.
Looks like you need a version earlier than 6.1 to support Toolkit 2003.
The CodeBlocks page you mentioned has a link to download the Platform SDK for Windows Server 2003 SP1 from this page:
http://www.microsoft.com/en-us/download/details.aspx?id=12261
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.