Building AudioPlugin 1_3 troubles

I am trying to build the audio plugin demo on VC++ 2003 toolkit with codeblocks.

I get plentyfull error messages relating to WinNT.h which is weird. The kind you get when you forget to close a bracket.

I have tried importing the VS project, which first gives me an error saying JucePluginCharacteristics.h can be found. After I adjust the path, I get the WinNT errors.

Then I tried moving all the files (wrapper and demo) into a single dir and import them into a blank DLL project. This too requires some paths to be ajusted, but the build gives the exact same result.

Does anyone know what this is about?

Now it builds all of a sudden. I have no idea why. :smiley:
I may have done something to some paths somewhere.

The dll isn’t a valid vst though. :frowning:

Edit__
Ok, tried importing again. Now it bitches about odbc32.lib missing. Why does a plugin want odbc?

Edit__
…ANNNNND i’m back with the WinNT.h errors… :cry:

Here’s the output by the way.

[code]Project : JuceAudioPlugin Demo
Compiler : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\HWGA\JuceAudioPlugin\demo\build\VST_Win32\

Switching to target: Release
DemoJuceFilter.cpp
JUCE! Linking to: jucelib_static.lib
JuceVstWrapper.cpp
JUCE! Linking to: jucelib_static.lib
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(894) : error C2988: unrecognizable template declaration/definition
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(894) : error C2059: syntax error : '('
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(894) : error C2090: function returns array
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(894) : error C2988: unrecognizable template declaration/definition
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(894) : error C2059: syntax error : ')'
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(1454) : error C2143: syntax error : missing ‘;’ before '*'
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(2784) : warning C4164: ‘__readfsbyte’ : intrinsic function not declared
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(2785) : warning C4164: ‘__readfsword’ : intrinsic function not declared
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(2786) : warning C4164: ‘__readfsdword’ : intrinsic function not declared
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(2787) : warning C4164: ‘__writefsbyte’ : intrinsic function not declared
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(2788) : warning C4164: ‘__writefsword’ : intrinsic function not declared
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(2789) : warning C4164: ‘__writefsdword’ : intrinsic function not declared
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(2857) : error C3861: ‘__readfsdword’: identifier not found, even with argument-dependent lookup
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(2858) : error C3861: ‘__readfsdword’: identifier not found, even with argument-dependent lookup
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(2938) : error C2143: syntax error : missing ‘;’ before 'identifier’
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(2938) : warning C4091: 'typedef ’ : ignored on left of ‘_FLOATING_SAVE_AREA’ when no variable is declared
C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(2938) : fatal error C1075: end of file found before the left brace ‘{’ at ‘C:\Program Files\Microsoft Platform SDK\Include\WinNT.h(22)’ was matched
Process terminated with status 1 (0 minutes, 1 seconds)
10 errors, 7 warnings

[/code]

Thats kind of useless though. All this tells me is that it braks down when building JuceVstWrapper.cpp.

yeah, i know what this is-

the “unrecognizable template declaration/definition” bit is, if you look in the code it points to, around a spot where something called “T” is used in the winnt.h file. ‘T’ is at this point already defined as a juce macro. this macro is always defined when you include juce.h, and this error happens because windows.h is being included afterwards.

the options are: include windows.h BEFORE juce.h is ever included, OR hide any sign of things that may clash… the main things that cause problems are juce::Rectangle and the T macro, because those two words are used in the windows headers.

this thread discusses the problem, and has several possible fixes you can use.

OK. Thanks.

Your fix (from linked thread) works very well. Duplicated here for posterity:


  #undef Rectangle
  #undef T
  #define Array tempArray
  #include <windows.h>
  #undef Array
  #define T(x) L#x

I still got that darn odbc32 error though. If I just delete the lib entries, the error goes away, but I’d kind of like to know why they are there. Is it better to install odbc?

thanks for this, but i still have problems with the Rectangle being ambiguous.

cheers

D3CK