MC VisualC++Express Beta2

Hello

Sorry to intrude in this very exclusive coder circle :wink: (Iā€™m only a hobbyist), but I need some advice: Iā€™m switching from Delphi to C++, trying to do some VST plugs. I was used to Borland, but after days of frustration trying CBuilder to complile using VSTGUI, I started trying other compilers, like Dev-C++, and the Introductory version of MCVC I have. I ended up downloading the VisualC++2005 Express compiler, which looks nice, and in the process came across JUCE, and want to give it a try.

I downloaded the latest Platform SDK, but didnā€™t find anything like ā€œthe Microsoft SDKā€ as mentioned in the JUCE documentation. Nevertheless, after figuring out how to set up the searchpaths in VCExpress (now isnā€™t that ridiculous, having to edit manually some definitions file, AND delete a .dat somewhere else after each edit else the changes are not taken into account :evil: ), I got rid of most of the errors and JUCE lib now compiles with only 1 error: missing dsound.h.

ModulR mentions a ā€œmissing filesā€ pack but the link seems dead. Iā€™d prefer not to download and install another 200MB (I had XP SP1 , so downloaded SP2, all the MS updates, the Platform SDK, VCExpress and docs, Iā€™m getting tired), so is there a possibility somewhere to get this file, or to get the JUCE libs to compile without it and still being able to link against JUCE lib without unresolved externals?

Thanks
Dirk
PS I do insist Iā€™m a hobbyist coder, so I need to be walked through very oftenā€¦I change from Delphi to C++, from Borland to MS, fromVSTGUI to JUCE, so please be indulgentā€¦

Hi there, and welcomeā€¦

Are you sure youā€™ve not got dsound.h somewhere? Try searching your hard disk for it - on my machine itā€™s in the Platform SDK includes.

Iā€™m sure it must be in at least one of the many slightly-different-and-not-quite-compatible SDKs that Microsoft expect us to useā€¦

Hi Jules

Thanks for your concern (and many thanks for sharing your work!).

I had a dsound.h in the VC98 includes directory that VC++6 (Introductory Edition) installed, it has a time stamp from 1998, and I donā€™t want to risk conflicts with outdated files. There wasnā€™t any in the (full and latest) Platform SDK. I finally downloaded the DX9 SDK and the latest update (yet another 400Megs :frowning:

I managed to compile both the jucelib_static_debug.lib and the jucelib_static.lib succesfully. I didnā€™t try them yet (I just finished the whole download/install/compile process), but I notice something that surprises me: the _debug version is around 13Mb, the _release version is over 20Mb. Is that correct?

BTW, you can now update the ā€œgetting startedā€ section in your doc to reflect the status of VisualC++Express2005 beta2.

Dirk

Now that I managed to build ā€œHello World!ā€ (wow!) I tried to build the VST demo plugin.

I get this:

[quote] Compilingā€¦
JuceVstWrapper.cpp
JUCE! Linking to: jucelib_static_debug.lib
d:\program_files\platformsdk\include\winnt.h(894) : error C2988: unrecognizable template declaration/definition
d:\program_files\platformsdk\include\winnt.h(894) : error C2059: syntax error : '('
d:\program_files\platformsdk\include\winnt.h(894) : error C2090: function returns array
d:\program_files\platformsdk\include\winnt.h(894) : error C2988: unrecognizable template declaration/definition
d:\program_files\platformsdk\include\winnt.h(894) : error C2059: syntax error : ')'
d:\program_files\platformsdk\include\winnt.h(1454) : error C2143: syntax error : missing ā€˜;ā€™ before '*'
d:\program_files\platformsdk\include\winnt.h(2653) : warning C4164: ā€˜_bittestā€™ : intrinsic function not declared
d:\program_files\platformsdk\include\winnt.h(2654) : warning C4164: ā€˜_bittestandcomplementā€™ : intrinsic function not declared
d:\program_files\platformsdk\include\winnt.h(2655) : warning C4164: ā€˜_bittestandsetā€™ : intrinsic function not declared
d:\program_files\platformsdk\include\winnt.h(2656) : warning C4164: ā€˜_bittestandresetā€™ : intrinsic function not declared
d:\program_files\platformsdk\include\winnt.h(2657) : warning C4164: ā€˜_interlockedbittestandsetā€™ : intrinsic function not declared
d:\program_files\platformsdk\include\winnt.h(2658) : warning C4164: ā€˜_interlockedbittestandresetā€™ : intrinsic function not declared
d:\program_files\platformsdk\include\winnt.h(2679) : warning C4164: ā€˜_BitScanForwardā€™ : intrinsic function not declared
d:\program_files\platformsdk\include\winnt.h(2680) : warning C4164: ā€˜_BitScanReverseā€™ : intrinsic function not declared
d:\program_files\platformsdk\include\winnt.h(2784) : warning C4164: ā€˜__readfsbyteā€™ : intrinsic function not declared
d:\program_files\platformsdk\include\winnt.h(2785) : warning C4164: ā€˜__readfswordā€™ : intrinsic function not declared
d:\program_files\platformsdk\include\winnt.h(2786) : warning C4164: ā€˜__readfsdwordā€™ : intrinsic function not declared
d:\program_files\platformsdk\include\winnt.h(2787) : warning C4164: ā€˜__writefsbyteā€™ : intrinsic function not declared
d:\program_files\platformsdk\include\winnt.h(2788) : warning C4164: ā€˜__writefswordā€™ : intrinsic function not declared
d:\program_files\platformsdk\include\winnt.h(2789) : warning C4164: ā€˜__writefsdwordā€™ : intrinsic function not declared
d:\program_files\platformsdk\include\winnt.h(2844) : warning C4164: ā€˜__int2cā€™ : intrinsic function not declared
d:\program_files\platformsdk\include\winnt.h(2857) : error C3861: ā€˜__readfsdwordā€™: identifier not found
d:\program_files\platformsdk\include\winnt.h(2858) : error C3861: ā€˜__readfsdwordā€™: identifier not found
d:\program_files\platformsdk\include\winnt.h(2938) : error C2143: syntax error : missing ā€˜;ā€™ before 'identifierā€™
d:\program_files\platformsdk\include\winnt.h(2938) : warning C4091: 'typedef ā€™ : ignored on left of ā€˜_FLOATING_SAVE_AREAā€™ when no variable is declared
d:\program_files\platformsdk\include\winnt.h(2938) : fatal error C1075: end of file found before the left brace ā€˜{ā€™ at ā€˜d:\program_files\platformsdk\include\winnt.h(22)ā€™ was matched
[/quote]

Any Ideas? This is beyond my scope.

Thanks!
Dirk

Hi,
Maybe you are using an old platform SDK. CL (MS C++ compiler) changed much between VC6 and VC8 (Visual Studio 2005) and old template declaration donā€™t compile anymore.
I donā€™t know what version of the platform SDK you are using but JUCE works fine with ā€œMicrosoft Platform SDK for Windows XP SP2ā€. Please note that it does not include the DirectX SDK, so you still have to download it (I personnaly use the April 2005 version).

Cheers,
_john.

Well, no, as I mentioned before. I use the latest (dowloaded yesterday) Platform SDK, the latest (downloaded today) DirectX9SDK, the latest (installed yesterday) version of VisualC++Express. All is really totally up-to-date, including the OS (XP Pro SP2, all updates done) so thatā€™s not where the problem lies.

Dirk

Ooops, Iā€™ve read your first post to fast :frowning:
Please check your private messages. I think it would be easier to carry on in french ā€¦

[quote=ā€œPinup57ā€]
I get this:

Compilingā€¦
JuceVstWrapper.cpp
JUCE! Linking to: jucelib_static_debug.lib
d:\program_files\platformsdk\include\winnt.h(894) : error C2988: unrecognizable template declaration/definition
d:\program_files\platformsdk\include\winnt.h(894) : error C2059: syntax error : ā€˜(ā€™
ā€¦[/quote]

If you do have a solution to this, itā€™d be really good to see the response. Iā€™ve got exactly that same compiler error with VS2005 Beta 2 and the latest Platform SDK, etc.

Thanks,

Steve.

Okay, this seems to be something to do with jucetextfunctions.h line 64:

being included before winnt.h line 894:

extern "C++" // templates cannot be declared to have 'C' linkage template <typename T, size_t N> char (*RtlpNumberOf( UNALIGNED T (&)[N] ))[N];

I managed to work round it by moving juceVSTwrapper.cpp line 75:

down after the #include <windows.h>

Perhaps this is a bug, or perhaps Iā€™m missing a #define or something?

Cheers,

Steve.

do you have your include paths in the wrong order?

Trying to guess the order is a little annoying.

My VCProjectEngine.Dll.Express.Config file looks like:

Include="(VCInstallDir)include;C:\Program Files\Microsoft SDK\include;C:\Program Files\Microsoft SDK\include\Win64\crt;C:\Program Files\Microsoft SDK\include\Win64\atl;C:\Program Files\Microsoft SDK\include\Win64\mfc;c:\program files\Microsoft Platform SDK\Include;(FrameworkSDKDir)include;c:\juce\include"

Library="(VCInstallDir)lib;C:\Program Files\Microsoft SDK\lib;C:\Program Files\Microsoft Platform SDK\lib;c:\juce\bin;(VSInstallDir);(VSInstallDir)lib" Path="(VCInstallDir)bin;(VCInstallDir)PlatformSDK\bin;(VSInstallDir)Common7\Tools\bin;(VSInstallDir)Common7\tools;(VSInstallDir)Common7\ide;C:\Program Files\Microsoft SDK\Bin;(ProgramFiles)\HTML Help Workshop;(FrameworkSDKDir)bin;(FrameworkDir)(FrameworkVersion);(VSInstallDir);(PATH)ā€œ
Reference=ā€(FrameworkDir)(FrameworkVersion)ā€œ
Source=ā€$(VCInstallDir)crt\src"

Hi Steve

Good point there - I usually try to put my own includes after system ones for exactly this sort of reason, so Iā€™ll move that down a bit like you say.

Iā€™ve also got a bunch of other fixes to release for the VST wrapper, as Iā€™ve been debugging it under nuendo on the mac this week, where Iā€™ve had an absolute nightmare with recursive message loops because of the stupid way they track mouse-drags.

(Oh - and we should have another beer soon, tooā€¦)

I checked, the path order here looks ok.
I donā€™t have a ā€œMicrosoft SDKā€ on my system though, only the latest Platform SDK. But I could build the juce libs, and built a VST with VSTGUI too, so it seems ok.

Ah, that reminds me of a headache I had with vstgui: for some reason, VisualC++Express didnā€™t recognise this in vstgui.h:

so nothing worked until I moved the the define out of the if-endif to make it true always. Could something similar happen here?

Dirk

Hi Dirk,

If I understand your last post cprrectly, you still have problems compiling. If so, I was in exactly the same situation as you (with the same error messages, SDKs, etc.). If you canā€™t wait for Jules to post his new fixes, I suggest (in the interim) making the change to juceVSTwrapper.cpp line 75 I described a couple of messages back.

If Iā€™ve misunderstood and you already managed to get it working, feel free to ignore this!

Cheers,

Steve.

I have been having similar issues with this, but after some time I have been able to compile the juce hello world demo. When I try to load the Juce_vst Solution in the JuceAudioPlugindemo I get an error stating ā€œProject file ā€™ C:\juce\projects\juce\build\win32\vcexpress\JUCE.vcprojā€™ could not be loaded. The project is either missing from disk or access was denied.ā€

If I click ok. The project does load, and in the class view it looks to be normal, although there is no JUCE.vcproj in the tree stucture. Once here if I build the project, then I get the error shown above with the missing" ( " thing. So I made the JuceWrapper modification suggested above, and then when I build the project I get an error stating that the file Carbon\carbon.h cannot be found?

Any ideas on how to get through this. I am absolutly a beginner hobbiest in this so, forgive my ignorance and please provide some detail.

Thanks,

Mark

[quote=ā€œo2eā€]I have been having similar issues with this, but after some time I have been able to compile the juce hello world demo. When I try to load the Juce_vst Solution in the JuceAudioPlugindemo I get an error stating ā€œProject file ā€™ C:\juce\projects\juce\build\win32\vcexpress\JUCE.vcprojā€™ could not be loaded. The project is either missing from disk or access was denied.ā€

If I click ok. The project does load, and in the class view it looks to be normal, although there is no JUCE.vcproj in the tree stucture.

Mark[/quote]

Yes, I forgot to mention that :oops: I have the same prompt. If I click OK, the project loads, and I have the JUCE.vcproj in the tree, but itā€™s greyed out.

Dirk

Just as a followup to the missing dsound.h issue raised in the first post to this thread:

Iā€™m doing a clean install on a PC right now, and noticed taht sometime in the last few weeks the Platform SDK has migrated from the XP SP2 version to the Server 2003 SP1 version. It seems the latter, unlike the XP PSDK, does not include the Microsoft SDK stuff.

So for people reporting that a find files does not turn up dsound.h on their hard drive, this is probably why.

Yes, thatā€™s indeed so. I couldnā€™t find any other solution than to install the whole DirectX SDK as well. Fortunately I have a 2 Mb/sec DSL connection! Some other stuff is missing/deprecated, like libc.lib. I get many warnings like ā€œstrcpy is deprecatedā€ when trying to compile existing code. It works though, but thatā€™s not an ideal starting point for a beginner in C++. When you start learning something new, and you canā€™t even manage to compile someone elses code thatā€™s reputedly correct, you finish tearing your hair offā€¦I succeeded in making a VST using the VSTGUI libs but even had to edit stuff in the ā€œdonā€™t edit, inheritā€ VSTGUI source files. Still canā€™t get the JUCE vst plugin to compile though.

Dirk

(BTW, if you want to install these SDKā€™s, Iā€™d advise to download the ISO image files instead of using the web installer. The web installer really crawls, I couldnā€™t get more than 3Kb/sec. )

and I see in VS++2005 that after making the abovementioned mod, the #ifdef JUCE_WIN32 condition is considered false, so we get the Carbon.h error. Very similar to the VSTGUI error I talked about. This could be an issue related to the change of the Platform SDK, but I need help here!

Dirk

So I moved #define winnt.h to the top, and managed to build. The debug version crashes the host (breakpoint error), and but the release version seems to work, except that there are some serious display problems.

Dirk

Wow! I think I fixed it! The vst example compiled, and I was able to open it in Cubase. After some tinkering it frenken works.

First - getting all the includes and libraries pointing to the right place took some time. Here is what I ended up with for the VCProjectEngine.Dll.Express file:

<Directories
Include="(VCInstallDir)include;(VCInstallDir)PlatformSDK\include;(FrameworkSDKDir)include;C:\Program Files\Microsoft Platform SDK\include;c:\juce;c:\DXSDK\Include;C:\SDK\VST Plug-Ins SDK 2.3\vstsdk2.3\vstsdk2.3\source\common" Library="(VCInstallDir)lib;(VCInstallDir)PlatformSDK\lib;(FrameworkSDKDir)lib;(VSInstallDir);(VSInstallDir)lib;C:\Program Files\Microsoft Platform SDK\lib;c:\juce\bin;c:\DXSDK\Lib"
Path="(VCInstallDir)bin;(VCInstallDir)PlatformSDK\bin;(VSInstallDir)Common7\Tools\bin;(VSInstallDir)Common7\tools;(VSInstallDir)Common7\ide;(ProgramFiles)\HTML Help Workshop;(FrameworkSDKDir)bin;(FrameworkDir)(FrameworkVersion);(VSInstallDir);(PATH);C:\Program Files\Microsoft Visual Studio 8\VC\bin\;C:\juce\bin;c:\DXSDK\bin" Reference="(FrameworkDir)(FrameworkVersion)" Source="(VCInstallDir)crt\src"

Plus all the configuration Microsoft gives you when you first setup Express,

Then I followed the idea of moving the( #include ā€œā€¦/ā€¦/juce_AudioFilterBase.hā€) in the JuceVstWrapper file., but since that gave me the carbon.h error I ended up moving it out of the ifdef statement, so the code looks like

//==============================================================================

#undef Rectangle
#define Array tempArray
//#include <windows.h>
//#include ā€œā€¦/ā€¦/juce_AudioFilterBase.hā€
#undef Array

#include <Carbon/Carbon.h>

and it frenken compiled without error!

Now how do I get this strcpy is deprecated thing to go away?

Mark