MC VisualC++Express Beta2


#1

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…


#2

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…


#3

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


#4

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


#5

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.


#6

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


#7

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 …


#8

[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.


#9

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.


#10

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"


#11

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…)


#12

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


#13

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.


#14

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


#15

[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


#16

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.


#17

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. )


#18

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


#19

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


#20

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