Csound Csound-dev Csound-tekno Search About

Update: How to compile win32 exes from sources

Date1999-01-18 06:54
Fromrasmus ekman
SubjectUpdate: How to compile win32 exes from sources
((Too late I noted that some people stumbled on this recently.
Hans, perhaps there could be a footnote to the article in the
(very nice) Csound eMag.))


There is one bugish thing about the distributed win32 project 
files for "consound" and "winsound": The new c-code files since 
about 3.48 have not been added to the project, so if you just open 
con/winsound and hit F7 to compile, you'll get a bundle of 
"unresolved external" errors from the linker.

All the menu and dialog paths given below pertain to the old
MsDev 4.x compiler, but I hope it looks reasonably similar
in later versions and other compilers.


MISSING FILES

Several files must be added to the distributed Csound project files 
"consound.mdp" and "winsound.mdp".

The simplest way is to go to menu "Insert", item "Files into Project...", 
and paste the whole long line below into the "Filename" edit box of 
the file browser dialog.

"aifc.c" "argdecode.c" "biquad.c" "flanger.c" "lowpassr.c" "midiops3.c" "one_file.c" "pvocext.c" "schedule.c" "uggab.c"

That's it for Csound version 3.50 of those projects. Note that you
don't add the H(eader) files, you must add the C code files.


PREPROCESSOR DEFINES

If you use some other compiler, or want to create your own project 
configuration, there is also another thing to mind:

Preprocessor defines.
Consound uses: _CONSOLE,    WIN32,SFIRCAM,PIPES,MACROS,RTAUDIO,MSVC
Winsound has: WINDOWS,CWIN, WIN32,SFIRCAM,PIPES,MACROS,RTAUDIO,MSVC

These are added in the dialog opened from menu Build | Settings, 
tab "C/C++", listed in the textbox titled "Preprocessor definitions".


MSDEV 4.x SPECIFIC PROBLEM

Finally, an old omission in MsDev 4.x default config was that the lib
file "winmm.lib" is not automatically included, leading to more
unresolved externals for operating system calls like "waveInblah", 
"waveOutblah" and "midiIn/Outditto" etc.

So, if you're still using that particular compiler, you have to add 
this by hand to just about any project that you ever create. 
Add "winmm.lib" (without quotes) to the list in the dialog opened 
from menu Build | Settings, tab "Link", category "General". 
The list is in the edit box "Object/Library modules"


... and possibly something else. Just wanted all this on record
at the same place for once.


Hope this helps somebody,

Date1999-01-18 08:15
FromRicardo MadGello
SubjectRE: Update: How to compile win32 exes from sources
This brought the error/warning count down to 0/1 for ConSound 3.50 under MS
VC++ 5.
"E:\Csound\Pvanal.c(242) : warning C4035: 'pvanal' : no return value"
Does this matter?
--
This and the above compilation warning shows when building debug consound
3.50.
"E:\Csound\Memalloc.c(52) : warning C4013: '_CrtCheckMemory' undefined;
assuming extern returning int"
Pointing to CRTDBG.h from the msdev in the manner suggested below didn't
help.

BTW, winmm.lib seems to be getting linked okay under Ms VC++ 5 with default
settings.


Thanks re!
That solved what was happening with earlier builds for sure.

-----Original Message-----
From: owner-csound-outgoing@maths.ex.ac.uk
[mailto:owner-csound-outgoing@maths.ex.ac.uk]On Behalf Of rasmus ekman
Sent: Sunday, January 17, 1999 10:55 PM
To: Csound list
Cc: Hans Mikelson
Subject: Update: How to compile win32 exes from sources


((Too late I noted that some people stumbled on this recently.
Hans, perhaps there could be a footnote to the article in the
(very nice) Csound eMag.))


There is one bugish thing about the distributed win32 project
files for "consound" and "winsound": The new c-code files since
about 3.48 have not been added to the project, so if you just open
con/winsound and hit F7 to compile, you'll get a bundle of
"unresolved external" errors from the linker.

All the menu and dialog paths given below pertain to the old
MsDev 4.x compiler, but I hope it looks reasonably similar
in later versions and other compilers.


MISSING FILES

Several files must be added to the distributed Csound project files
"consound.mdp" and "winsound.mdp".

The simplest way is to go to menu "Insert", item "Files into Project...",
and paste the whole long line below into the "Filename" edit box of
the file browser dialog.

"aifc.c" "argdecode.c" "biquad.c" "flanger.c" "lowpassr.c" "midiops3.c"
"one_file.c" "pvocext.c" "schedule.c" "uggab.c"

That's it for Csound version 3.50 of those projects. Note that you
don't add the H(eader) files, you must add the C code files.


PREPROCESSOR DEFINES

If you use some other compiler, or want to create your own project
configuration, there is also another thing to mind:

Preprocessor defines.
Consound uses: _CONSOLE,    WIN32,SFIRCAM,PIPES,MACROS,RTAUDIO,MSVC
Winsound has: WINDOWS,CWIN, WIN32,SFIRCAM,PIPES,MACROS,RTAUDIO,MSVC

These are added in the dialog opened from menu Build | Settings,
tab "C/C++", listed in the textbox titled "Preprocessor definitions".


MSDEV 4.x SPECIFIC PROBLEM

Finally, an old omission in MsDev 4.x default config was that the lib
file "winmm.lib" is not automatically included, leading to more
unresolved externals for operating system calls like "waveInblah",
"waveOutblah" and "midiIn/Outditto" etc.

So, if you're still using that particular compiler, you have to add
this by hand to just about any project that you ever create.
Add "winmm.lib" (without quotes) to the list in the dialog opened
from menu Build | Settings, tab "Link", category "General".
The list is in the edit box "Object/Library modules"


... and possibly something else. Just wanted all this on record
at the same place for once.


Hope this helps somebody,

	re