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. |
2nd January 2003, 22:10 | #1 | Link |
C64
Join Date: Apr 2002
Location: Austria
Posts: 830
|
Compiling AviSynth
Could someone please summarize what is necessary to compile AviSynth?
I've installed VC6, SP5, ProcessorPack. There is still an error regarding DirectShow. Do I have to download some whole SDKs or are only some files needed? |
7th January 2003, 23:13 | #3 | Link |
C64
Join Date: Apr 2002
Location: Austria
Posts: 830
|
Can you give me a hint what the "newest platform SDK" is?
At MS it seems to me it is only a combination of SDK's including DX8.1 which would then not be necessary. Sadly DX8.1 SDK is not enough - now it compiles but there are linker errors (non-resolved external symbols, regarding ACM it seems). Some clues for me? Or are there some settings necessary for the project I am not aware of? |
7th January 2003, 23:22 | #4 | Link |
Retired AviSynth Dev ;)
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
|
http://www.microsoft.com/msdownload/...sdk/sdkupdate/
Install the Core SDK and DirectX SDK. You can de-select download of 64bit stuff (you can also do fine without samples and documentation), but Choosing Downloads/Install from the menu at the top. If you take only "Build environment", you only have to download about 37mb.
__________________
Regards, sh0dan // VoxPod |
8th January 2003, 06:24 | #6 | Link |
Registered User
Join Date: Sep 2002
Location: Seattle
Posts: 551
|
So how easy is it to build this thing with VC6 SP5 w/ ICL7? Does the code come with a project file that would streamline the process? I'd love to compile with P4-optimized switches and see if there's any difference.
|
8th January 2003, 08:31 | #7 | Link |
C64
Join Date: Apr 2002
Location: Austria
Posts: 830
|
I will tell my stepwise progress.
The project file is I think a VC7-file, no VC6. But I only added all files to an empty DLL project and at least compiling worked. Let's see what happens with the complete core SDK... (just downloading 342MB - still faster as 37MB on 56k) |
8th January 2003, 14:56 | #12 | Link |
C64
Join Date: Apr 2002
Location: Austria
Posts: 830
|
are we talking about this file:
http://cvs.sourceforge.net/cgi-bin/v...c/avisynth.dsw |
9th January 2003, 11:35 | #14 | Link |
C64
Join Date: Apr 2002
Location: Austria
Posts: 830
|
Ok, my mistake: .DSW is the workspace file, .DSP the project file which is ok from SF.
As you mentioned, both the core SDK + DirectX SDK are necessary What is necessary too and was nowhere mentioned when setting up the project from scratch: * include the convert_a.asm file and set up the assembler for this file (this is logical) * add some lib files to the project (penter.lib msacm32.lib quartz.lib ddraw.lib amstrmid.lib vfw32.lib version.lib user32.lib winmm.lib) - how do you know that these files are necessary? * (maybe) setting to PentiumPro code generation With these changes it compiles. Don't have checked if working flawlessly. |
9th January 2003, 15:16 | #15 | Link |
Retired AviSynth Dev ;)
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
|
1) convert_a.asm is included in the project file, and is compiling fine, when you have the preprocessor pack 5 installed. No user action required here if your installation is ok.
2) These lib files are in the platform SDK, and if you read the documentation for these, it says you must add the lib directories in Tools/Options/Directories - no need to add them manually. You must have DirectX and Core SDK headers/libraries here, and move them to the top (I cannot remember the exact order of these two). 3) This is stored in the .dsp file, so you get the optimizations from the CVS. Be careful - enabling "Maximize speed" may break temporalsoften - it seems to cause a bug in the experimental cache.
__________________
Regards, sh0dan // VoxPod |
9th January 2003, 15:42 | #16 | Link |
C64
Join Date: Apr 2002
Location: Austria
Posts: 830
|
ad 2) I understand that I have to add the path to the lib files, but isn't it necessary to add the libs in the project properties (under the c++ tab)? I did mean _this_ action, not copying the LIB-files.
So from where comes the information that those LIB's are used? Only the linker complains about missing symbols. Maybe I simply don't know enough what a .LIB file is |
9th January 2003, 18:14 | #17 | Link | |
Registered User
Join Date: Oct 2002
Posts: 462
|
Quote:
First, the lib file is only added by the linker. That means if you tried compiling without linking, you would not get an error if you did not have the libs you need. I think there are two catagories of libs: ones that the linker looks for for any c++ project and ones that the program calls for. I am not sure of that, but it doesn't matter, we're only focusing on the specific ones for each project. lib files contain methods, fuctions, procedures, or whatever you want to call them, that are called by the program. The linker only has to read the object files to know the names of the needed lib files. The only thing it doesn't know is where the lib files are. So all you need to do in this case is put the lib folder for the Platform SDK and DirectX SDK on the search path for the linker. There is no need to name each lib file it is going to need. So my main point is to explain why the linker only needs the search path to the lib directories it will need and not the names of the lib files themselves. Of course, the compiler still needs to know which libs contain the code for the procedures called. I'm guessing that information is in the sources. Stephen |
|
11th January 2003, 22:57 | #18 | Link |
C64
Join Date: Apr 2002
Location: Austria
Posts: 830
|
Thx, after reading a little bit MSDN I think I get it now.
("explicit and implicit linking") 1.You need a LIB file if you link to a DLL statically (implicit). This is the way AviSynth calls OS DLLs. Each function call (e.g. to ACM) aims at a DLL and each of those DLLs must have a LIB. So only complete knowledge of the source will tell you which DLLs are involved as they are not written somewhere. And the header files defining the functions don't have always simply the same name as the DLL. 2.If the DLL is linked explicit / dynamically you don't need a LIB, the functions are returned as pointers. This is a little more complex to program, it seems, but this is the way AviSynth calls the plugins. It has to be that way because the name of the DLL is of course not fixed when compiling AviSynth. |
12th January 2003, 01:45 | #19 | Link |
Registered User
Join Date: Oct 2002
Posts: 462
|
@WarpEnterprises
I think you need the lib file for the os dlls whether you link to them dynamically or statically. It you link to it dynamically, you still need the address of the function within the dll you are calling. Unlike the little dll we write for AviSynth or even the AviSynth dll itself, a dll like kernel32.dll has multiple indepentant programs. The calling program needs the address of the specific program being called within the dll. That information is given to the calling program by the linker through kernel32.lib. So I believe that you always need the lib file for an os dll whether you link to it statically or dynamically. My guess is that AviSynth is able to load its own dlls from a script mainly because there is a set starting place for the one program within each dll. That is great work though, and I wonder if static and implicit are not really synonymous. So that you are half right. Stephen |
|
|