(for expert programmers only)
At present time, the executables of CsoundAV are compiled using Microsoft Visual C++ Developer Studio version 5.0. The projects, workspaces and makefiles provided with the sources are generated with this compiler. A Developer Studio workspace can contain several projects (it is the case of CsoundAV workspace).
CsoundAV Workspace is provided with three main projects:
Both CsoundAV_Con and CsoundAV_Win projects are provided with four Configurations:
To build one or more targets of CsoundAV you can
If you are using Developer Studio, be sure to activate the correct project and Configuration first.
Even if later version of Visual C++ should be compatible with earlier ones, actually, this is not always true, since I noticed that many users run into difficulties when attempting to compile CsoundAV with a version of MSVC different from the 5.0. In this case you should reconstruct the Project by scratch, and I give the following suggestions:
You can see the files to include by opening a project file (with extension .dsp) with a text editor and by observing included files having C, CPP, and CXX extension. For example:
# Begin Source File
SOURCE=.\DirectXcapture.c
# End Source File
# Begin Source File
SOURCE=.\DirectXout.c
# End Source File
# Begin Source File
SOURCE=.\DirectXset.c
# ADD CPP /D "INITGUID"
# End Source File
...... etcetera ......
You have to include all source files: this can be done by using the IDE interface by left-clicking the project name (in the following case "CsoundAV_Win files") and by choosing "Add Files to Project".
A browse-file dialog-box will appear and you can select the files you intend
to add to the project.
I don't know if later versions of MSVC allow the same procedure.
Next pass is to provide the correct settings for the project. You can do this by selecting the "Project-settings" options. A dialog box will appear, and you have to select the "C/C++" tab.
In the "Preprocessor definitions" text field you have to put the following macro definitions:
For CsoundAV_Con project:
For CsoundAV_Win project:
You have to set the runtime library to "Debug Multithreaded" for "Win32 Debug" and "Win32 double Debug" configurations and "Multithreaded" for "Win32 Release" and "Win32 double Release" configurations:
Special libraries are needed to make a full compilation of CsoundAV. These libraries (together with their include files) should be put in MSVC include directory and lib directory or in a custom user path. In the last case you have to provide this path to each project.
The required libraries are:
Microsoft DirectSound libraries:
EAX 2.0:
Paintlib:
FLTK:
OpenGL:
GLE:
Once you placed the include and lib files in a directory, you have to add the library to the link directory options. To do that, you have to select "Project-Settings" and the "Link" tab of the Settings dialog box, then filling the "Object/library modules" text field with the required libraries:
...that are
dsound.lib eaxguid.lib winmm.lib wsock32.lib paintlib.lib libtiff.lib libjpeg.lib libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib fltk.lib fltkgl.lib opengl32.lib glut32static.lib glu32.lib vfw32.lib
If you placed the special library in a path different from ..\DevStudio\VC\lib and corresponding include files in a path different from ..\DevStudio\VC\include, you have to provide the custom directories where you placed these libraries, by setting corresponding path in the Project-Setting dialog box:
... and ...
Some source files have project settings slightly different from project defaults. These are:
sfont.c
rtaudio2.c, aops.c and lptrkfns.c
... otherwise some problems will rise during compilation or run-time.
DirectXset.c
you have to add the INIGUID define macro