Author |
Message |
Dr. Spankenstein
Joined: Mar 03, 2007 Posts: 136 Location: Cambridge
Audio files: 1
|
Posted: Fri Sep 28, 2007 12:25 pm Post subject:
how to set up a visual c++ express thing for compiling ChucK |
 |
|
[Note: I split this off from http://electro-music.com/forum/topic-20675.html , Blue Hell]
I'm not having any luck with Visual C++ Express. It tells me the source files I've downloaded can be opened?
I've downloaded the file from the link under the (build your own) header for the windows platform.
The .tgz file downloads a .tar file and when extracted it is just a unrecognisable file for the compiler? (A file with no extension so counts as a .0 file)
Where am I going wrong folks?
Rhys |
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 24033 Location: The Netherlands, Enschede
Audio files: 276
G2 patch files: 320
|
Posted: Fri Sep 28, 2007 1:24 pm Post subject:
|
 |
|
In the src folder there is a file chuck_win32.dsp which seems to be a "Microsoft Developer Studio Project File" can you use that one?
The native build environment (using a make file) seems to be based on cygwin and a few extra tools, but the download page was pretty explicit in saying either cygwin or visual c. But otoh I see tools like lex and yacc are needed (or maybe not strictly, there could be some pre-translated stuff), which hints at cygwin again.
I'll download the vc express version to see. This may take a while but I wanted to have look at the ChucK VM anyway
edit, NOTE : the following info got sort of lost in the topic split, it's in the old thread :
_________________ Jan
also .. could someone please turn down the thermostat a bit.
 Last edited by Blue Hell on Fri Sep 28, 2007 4:55 pm; edited 2 times in total |
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 24033 Location: The Netherlands, Enschede
Audio files: 276
G2 patch files: 320
|
Posted: Fri Sep 28, 2007 1:52 pm Post subject:
|
 |
|
Ok, I can open the project file and I can start to compile it. But then I get a lot of errors like ... "can't find windows.h" :shock:
I'm installing the platform SDK now, to see if that helps. _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 24033 Location: The Netherlands, Enschede
Audio files: 276
G2 patch files: 320
|
Posted: Fri Sep 28, 2007 2:54 pm Post subject:
|
 |
|
Ok, installing the platform SDK helps a bit, but still some files can't be found.
Useful pages to get the platform SDK integrated into vc express : here
and here (there was no need apparently to follow steps 4 and 5)
The problem files left are dsound.h and dinput.h - some directX stuff I guess, will have to search a bit now. _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 24033 Location: The Netherlands, Enschede
Audio files: 276
G2 patch files: 320
|
Posted: Fri Sep 28, 2007 3:06 pm Post subject:
|
 |
|
Ok, looks like the direct X sdk must be installed as well, to be obtained from here - it's pretty big - 500 MB or so, will take a while.
edit: that solved some problems, only one left no in compilation - linking might give some more trouble.
error C2440: 'initializing' : cannot convert from 'const char *' to 'char *' in ugen_xxx.cpp line 2590
Change
char * format = strrchr( filename, '.');
into
char * format = (char *) strrchr( filename, '.');
which is an explicit type cast and that makes the compiler happier.
then indeed I get some linking errors :
Code: | Creating library Debug/chuck.lib and object Debug/chuck.exp
rtaudio.obj : error LNK2019: unresolved external symbol __imp__CoInitialize@4 referenced in function "public: __thiscall RtApiDs::RtApiDs(void)" (??0RtApiDs@@QAE@XZ)
rtaudio.obj : error LNK2019: unresolved external symbol __imp__CoUninitialize@0 referenced in function "public: virtual __thiscall RtApiDs::~RtApiDs(void)" (??1RtApiDs@@UAE@XZ)
rtaudio.obj : error LNK2019: unresolved external symbol __imp__GetForegroundWindow@0 referenced in function "private: virtual bool __thiscall RtApiDs::probeDeviceOpen(int,enum RtApi::StreamMode,int,int,unsigned long,int *,int)" (?probeDeviceOpen@RtApiDs@@EAE_NHW4StreamMode@RtApi@@HHKPAHH@Z)
|
Right that might need some time  _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 24033 Location: The Netherlands, Enschede
Audio files: 276
G2 patch files: 320
|
Posted: Fri Sep 28, 2007 4:13 pm Post subject:
|
 |
|
There seems to be a problem with additional dependencies.
Here is some info about how to see 'm but it's not the complete solution yet, I don't know what extra libs should be included. I now added "User32.lib", "gdi32.lib" and "Advapi32.lib" as mentioned in the link.
What's left now is :
Code: | rtaudio.obj : error LNK2019: unresolved external symbol __imp__CoInitialize@4 referenced in function "public: __thiscall RtApiDs::RtApiDs(void)" (??0RtApiDs@@QAE@XZ)
rtaudio.obj : error LNK2019: unresolved external symbol __imp__CoUninitialize@0 referenced in function "public: virtual __thiscall RtApiDs::~RtApiDs(void)" (??1RtApiDs@@UAE@XZ) |
So two to go ...
Edit: the structured answer seems to be
Quote: | You need to add the libraries for the Win32 APIs you're calling to the linker settings. To find out the names of libraries, search up the corresponding API in MSDN. |
which I read here. _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 24033 Location: The Netherlands, Enschede
Audio files: 276
G2 patch files: 320
|
Posted: Fri Sep 28, 2007 4:31 pm Post subject:
|
 |
|
the complete additional dependencies list I use now reads :
Code: |
dinput.lib
odbc32.lib
odbccp32.lib
dsound.lib
dxguid.lib
wsock32.lib
winmm.lib
User32.lib
gdi32.lib
Advapi32.lib
ole32.lib
kernel32.lib
oleaut32.lib
|
and then I get :
Code: |
------ Build started: Project: chuck_win32, Configuration: Debug Win32 ------
Linking...
Creating library Debug/chuck.lib and object Debug/chuck.exp
Embedding manifest...
Build log was saved at "file://d:\Download\Music\chuck\chuck-source-1.2.1.0\src\Debug\BuildLog.htm"
chuck_win32 - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
|
 _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Fri Sep 28, 2007 6:03 pm Post subject:
Re: how to set up a visual c++ express thing for compiling C |
 |
|
Dr. Spankenstein wrote: |
The .tgz file downloads a .tar file and when extracted it is just a unrecognisable file for the compiler? (A file with no extension so counts as a .0 file)
Where am I going wrong folks?
Rhys |
Odd. It should be a dir of files, I know I downloaded the source to plain Windows computers then looked at it when in doubt about functionality that wasn't yet documented. As far as I can tell everything has proper extensions. _________________ Kassen |
|
Back to top
|
|
 |
Dr. Spankenstein
Joined: Mar 03, 2007 Posts: 136 Location: Cambridge
Audio files: 1
|
Posted: Sat Sep 29, 2007 9:21 am Post subject:
|
 |
|
Thanks very much for all the info Blue. I think I'm finally set up and ready to tackle the source...if it werent for this weird dowload issue!
Could someone please attach the windows source for me as I'm not getting a .tar file with a folder inside but instead an odd file that nothing can seem to open?!
Thanks again
Rhys
PS. I'm getting the file from:
http://chuck.cs.princeton.edu/release/files/chuck-1.2.1.0.tgz |
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sat Sep 29, 2007 9:41 am Post subject:
|
 |
|
Oh, and if this works, could you try making a version that has both the Envelope fix and the ASIO one by Philippe? _________________ Kassen |
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 24033 Location: The Netherlands, Enschede
Audio files: 276
G2 patch files: 320
|
Posted: Sat Sep 29, 2007 9:47 am Post subject:
|
 |
|
Dr. Spankenstein wrote: | http://chuck.cs.princeton.edu/release/files/chuck-1.2.1.0.tgz |
Strange, that file is OK for me (using an old winzip 8), and seemingly the same one that I used. Can you handle the file posted by Kassen? Alternatively I could zip the tar or the dir-tree with winzip and post that (there is not much extra besides the src folder that Kassen already posted, just some examples and some docs). _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
Dr. Spankenstein
Joined: Mar 03, 2007 Posts: 136 Location: Cambridge
Audio files: 1
|
Posted: Sat Sep 29, 2007 9:53 am Post subject:
|
 |
|
Yup Kassen's file works great, I'm guessing its the latest version too. I'm using WinRAR to extract any compressed files.
Will have a go at modifying the code to include the two new envelopes and post you lot the results, which will hopefully work?!
Thanks again for your time
Rhys |
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sat Sep 29, 2007 9:56 am Post subject:
|
 |
|
Assuming dr.S already has working install of ChucK under Windows there's no need for the doc or examples, those also come with the binary-only Win downloads.
I'd like to know what the issue here is/was, as far as I can tell the tar.gz is perfectly fine. _________________ Kassen |
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 24033 Location: The Netherlands, Enschede
Audio files: 276
G2 patch files: 320
|
Posted: Sat Sep 29, 2007 10:15 am Post subject:
|
 |
|
I had some trouble compiling with __WINDOWS_ASIO__ instead of __WINDOWS_DS__ (assuming that is what I have to do to make an asio version).
On compilation the following headers are missing (rtaudio.cpp line 4675) :
#include "asio/asiosys.h"
#include "asio/asio.h"
#include "asio/asiodrivers.h"
And some libs as well probably, any idea where to get those? _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
Dr. Spankenstein
Joined: Mar 03, 2007 Posts: 136 Location: Cambridge
Audio files: 1
|
Posted: Sat Sep 29, 2007 11:11 am Post subject:
|
 |
|
Quote: |
You need to add the libraries for the Win32 APIs you're calling to the linker settings. To find out the names of libraries, search up the corresponding API in MSDN.
|
I've done this and I'm still getting the same error messages?!
I've changed the VC++ directories settings in tools -> options according to what is needed in the configuration properties for chuck_win32 and still no luck!
Hmmm....everything else is fine! |
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 24033 Location: The Netherlands, Enschede
Audio files: 276
G2 patch files: 320
|
Posted: Sat Sep 29, 2007 11:16 am Post subject:
|
 |
|
What error messages exactly? _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sat Sep 29, 2007 12:06 pm Post subject:
|
 |
|
Blue Hell wrote: | I had some trouble compiling with __WINDOWS_ASIO__ instead of __WINDOWS_DS__ (assuming that is what I have to do to make an asio version).
On compilation the following headers are missing (rtaudio.cpp line 4675) :
#include "asio/asiosys.h"
#include "asio/asio.h"
#include "asio/asiodrivers.h"
And some libs as well probably, any idea where to get those? |
based on this;
https://lists.cs.princeton.edu/pipermail/chuck-dev/2007-June/000229.html
I'd say you'll likely need to get those from the RTaudio page;
http://www.music.mcgill.ca/~gary/rtaudio/
Solving problems together is fun! :¬D
Edit; I send Philippe a little mail, perhaps he can help, I'm asuming Ge is terribly bussy as he didn't respond to mails for a while. _________________ Kassen |
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 24033 Location: The Netherlands, Enschede
Audio files: 276
G2 patch files: 320
|
Posted: Sat Sep 29, 2007 12:24 pm Post subject:
|
 |
|
Thanks !
But I just found out the same thing the hard way, by googling around as a mad man, and was just about to post something about it
didn't have time yet to figure out how to use it, but working on it. _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 24033 Location: The Netherlands, Enschede
Audio files: 276
G2 patch files: 320
|
Posted: Sat Sep 29, 2007 12:28 pm Post subject:
|
 |
|
Hmm, I just copied the asio folder I found in the McGill RtAudio package to the ChucK src folder and hit compile again ... some nasty errors ...
Quote: |
d:\download\music\chuck\chuck-source-1.2.1.0\src\rtaudio.cpp(4891) : error C2143: syntax error : missing ';' before ':'
d:\download\music\chuck\chuck-source-1.2.1.0\src\rtaudio.cpp(4891) : error C2143: syntax error : missing ';' before ':'
d:\download\music\chuck\chuck-source-1.2.1.0\src\rtaudio.cpp(4914) : error C2143: syntax error : missing ';' before ':'
d:\download\music\chuck\chuck-source-1.2.1.0\src\rtaudio.cpp(4914) : error C2143: syntax error : missing ';' before ':'
d:\download\music\chuck\chuck-source-1.2.1.0\src\rtaudio.cpp(5138) : error C2039: 'cerr' : is not a member of 'std'
d:\download\music\chuck\chuck-source-1.2.1.0\src\rtaudio.cpp(5138) : error C2065: 'cerr' : undeclared identifier
|
maybe the files need modification or some setup .... _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
lamarcph
Joined: Oct 21, 2004 Posts: 40 Location: Montreal, Canada
G2 patch files: 4
|
Posted: Sat Sep 29, 2007 1:47 pm Post subject:
|
 |
|
Quote: |
Hmm, I just copied the asio folder I found in the McGill RtAudio package to the ChucK src folder and hit compile again ... some nasty errors ... |
this is "normal". I was able to fix it.
Since asia-rtaudio is normally stripped at the preprocessor level, nobody would find those out. |
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 24033 Location: The Netherlands, Enschede
Audio files: 276
G2 patch files: 320
|
Posted: Sat Sep 29, 2007 2:34 pm Post subject:
|
 |
|
lamarcph wrote: | I was able to fix it. |
Apparently , would you be willing to tell how you did it? _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sat Sep 29, 2007 2:45 pm Post subject:
|
 |
|
I just got a mail from lamarcph (philippe) reporting that his test-build (which he send to me) doesn't seem to work but that he's very bussy with school and can't spare much time.
Perhaps this will be seen as a sign that we could use a more official ASIO building process, particularly as these days RT-audio supports building a program for both DX and ASIO. With any luck Ge's new work-place will offer the ASIO enabled Windows machine that Princeton was missing in the past.
Well, I can dream.... :¬) _________________ Kassen |
|
Back to top
|
|
 |
lamarcph
Joined: Oct 21, 2004 Posts: 40 Location: Montreal, Canada
G2 patch files: 4
|
Posted: Sat Sep 29, 2007 2:49 pm Post subject:
|
 |
|
sorry about that!
most of it is only typos:
4891 and 4914 -- EM_poplog();
and for 5138, my bad, I just commented out the if--std::cerr block.
it would also be possible, I think, to change
Quote: |
std::cerr << "Possible input/output buffersize discrepancy!" << std::endl;
|
with something like
Quote: |
sprintf(message_, "RtApiAsio:Possible input/output buffersize discrepancy! (%s).",
devices_[device].name.c_str());
|
We should find a way to share the a ASIO / MS build source code on a cvs somewhere.
I hope this helps.
Thanks,
Philippe Last edited by lamarcph on Sat Sep 29, 2007 3:10 pm; edited 2 times in total |
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 24033 Location: The Netherlands, Enschede
Audio files: 276
G2 patch files: 320
|
Posted: Sat Sep 29, 2007 3:07 pm Post subject:
|
 |
|
Ok, thank you gentlemen !
I'm doing some G2 patching / listening currently, but will have a look later, probably tomorrow _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
|