Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th December 2013, 08:03   #1  |  Link
martin53
Registered User
 
Join Date: Mar 2007
Posts: 407
Filter_SDK/Compiling_instructions

Could someone of the experienced people please have a look at the Wiki compiling guide and update instructions for VS 2010 and VS 2012. Especially, I am confused about any advantages/disadvantages of VS 2012 over VS 2010, what the arkane "Microsoft Visual C++ Toolkit 2003" adds to the IDE and to which compiler versions it is usful, to which not. I can't find it mentioned on the Wiki page.
Quote:
Originally Posted by Groucho2004 View Post
The instructions for VS2008 should be more or less valid for VS2010/2012.
for that info! Could someone please explain 'more or less' a bit further?
martin53 is offline   Reply With Quote
Old 6th December 2013, 08:52   #2  |  Link
TurboPascal7
Registered User
 
TurboPascal7's Avatar
 
Join Date: Jan 2010
Posts: 270
2012 is better than 2010 in pretty much any aspect. It's a lot faster, has better compilers and just feels/looks nicer. 2013 is a minor improvement over 2012 GUI-wise, but again a lot new stuff in C/C++ compilers.

The only obvious reason why you might "need" an older version of visual studio - there's a plugin with VC6 project file and you don't want to create a new project file yourself. I think 2005 was the last version that could convert VC6 project files to something newer. You never need an older compiler. Of course there is some stuff about "compiling plugins only with compiler used to build avisynth" etc., but as long as you don't do anything dumb (allowing exceptions to leave your plugin) - you'll be perfectly fine.

There are also some codebases that cannot be compiled with newer compilers because the authors abused some buggy VC6 behavior (leaking for loop scope being an obvious example). Do yourself a favor - fix them and not just downgrade to something inferior to current tools.

As for "how to create a new plugin", you just:
1) File -> New -> Project, there select Empty project in Templates -> Other languages -> Visual C++ path.
2) Go to Project -> Properties -> Configuration properties -> Configuration type. Set it to "Dynamic library (.dll").
3) Add avisynth.h to your project. Put it in the project folder in file explorer, and drag-n-drop from there to visual studio solution explorer or your project.
4) Add a new .cpp file, include Windows.h and avisynth.h in it.
5) Go learn some C++ and start writing code. Actually, please learn some C++ before you do the first 4 steps.
__________________
Me on GitHub | AviSynth+ - the (dead) future of AviSynth

Last edited by TurboPascal7; 6th December 2013 at 09:00.
TurboPascal7 is offline   Reply With Quote
Old 6th December 2013, 09:59   #3  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,423
Quote:
Originally Posted by TurboPascal7 View Post
3) Add avisynth.h to your project. Put it in the project folder in file explorer, and drag-n-drop from there to visual studio solution explorer or your project.
Rather than have a copy of avisynth.h in every project folder, you may prefer just to add the containing folder (eg C:\Program Files\AviSynth 2.5\FilterSDK\include) to the list of include folders for the project.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Old 6th December 2013, 10:13   #4  |  Link
TurboPascal7
Registered User
 
TurboPascal7's Avatar
 
Join Date: Jan 2010
Posts: 270
Quote:
Originally Posted by Gavino View Post
Rather than have a copy of avisynth.h in every project folder, you may prefer just to add the containing folder (eg C:\Program Files\AviSynth 2.5\FilterSDK\include) to the list of include folders for the project.
Not really, I think it's better to distribute your sources with the exact version of avisynth.h used to build it. Two reasons:
1) Avisynth folder might be different on different systems, someone who uses your project file will need to modify that. One might not even have the required version installed. Of course if you're writing closed source plugins or hope to avoid contributors, this is "fine".
2) It shows you the exact version of avisynth.h used to build a plugin. Just earlier this week I had to fix a plugin that didn't work in x64 mode because it still used AvisynthPluginInit2 even though it came with 2.6 header. This header being included helped me to identify the problem a lot faster than I could do with other methods.
__________________
Me on GitHub | AviSynth+ - the (dead) future of AviSynth
TurboPascal7 is offline   Reply With Quote
Old 6th December 2013, 13:35   #5  |  Link
SEt
Registered User
 
Join Date: Aug 2007
Posts: 374
Stick to the VS2010 for now – it's stable and well supported environment if you'd want to install some extensions (GPU development, profilers,...)
VS2012 is horrible: RTM couldn't even compile my Avisynth version (crashed with internal compiler error). Additions aren't worth the problems and reduced extensions support.
VS2013... maybe. Looks like debugged VS2012 with nice improvement in standards compliance. Almost no extensions support atm.
SEt is offline   Reply With Quote
Old 6th December 2013, 20:24   #6  |  Link
martin53
Registered User
 
Join Date: Mar 2007
Posts: 407
Quote:
Originally Posted by TurboPascal7 View Post
I think 2005 was the last version that could convert VC6 project files to something newer
I generally use Sandboxie to seclude applications from my OS. That should hopefully allow me to install VS 2010 and VS 2005 in two sandboxes. Is it worth installing VS 2005 to convert VC6 project files to a newer format and then work with 2010 (i.e. is there a format for that step and is it usually worth the effort for the project files)?
martin53 is offline   Reply With Quote
Old 6th December 2013, 20:32   #7  |  Link
ultim
AVS+ Dev
 
ultim's Avatar
 
Join Date: Aug 2013
Posts: 359
Or you can just use the source for Avisynth+, and CMake will generate project files for you directly into VS2010/12/13 format ready to compile.
__________________
AviSynth+
ultim is offline   Reply With Quote
Old 6th December 2013, 20:44   #8  |  Link
SEt
Registered User
 
Join Date: Aug 2007
Posts: 374
First of all, you can install several versions of VS on one system with no problems. I usually have 2-3 installed.
Second, you should not convert project files – they will be full of garbage from previous versions and conversion. It's always best to recreate the project and just add the files there manually.
SEt is offline   Reply With Quote
Old 7th December 2013, 01:46   #9  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,550
If you're only using the Express edition without any plugins, you might as well go straight to 2013. 2012 U1 fixed all of the problems I had, it's up to U4 now, but 2013 includes all of that anyway. I'm sure the new C++11 stuff might be a bit flaky, but it's unlikely to affect avisynth plugin writers.
foxyshadis is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:57.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.