MC VisualC++Express Beta2

I’ll come back to these problems as soon as I get a moment, but here’s a link I found to the previous version of the Platform SDK, which is the one I’m using.

http://www.microsoft.com/msdownload/platformsdk/sdkupdate/XPSP2FULLInstall.htm

I had to search the MS support forums to find that link, it’s not on public display!

strcpy is depreciated because it has buffer overflow possibilities. If preferable, it is best to copy strings using memcpy using a specified length. In the new headers though, strcpy is replaced with strsafecpy or strcpy_safe or something like that.

ha! just when i thought it had all been really easy to get it back up and running, i now encounter this exact problem. the message from MS that “…this SDK replaces the Windows XP SP2 Platform SDK …” blah blah made me think it’d be fine to get that. It has the same errors that are being discussed here when trying to compile the JuceAudioPlugin. It’s very much a pain in the arse.

An alternative fix i’ve successfully used in JuceVstWrapper.cpp is

...

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

...

what i’ve done is to put that into a separate file called “juce_windows.h”…


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

…and put that file in the juce folder alongside juce.h

If you need to include windows.h after including juce.h for whatever reason, then you just instead put #include <juce_windows.h>

also, is this a problem?

juce_win32_ASIO.obj : warning LNK4221: no public symbols found; archive member will be inaccessible
juce_Process.obj : warning LNK4221: no public symbols found; archive member will be inaccessible
juce_CriticalSection.obj : warning LNK4221: no public symbols found; archive member will be inaccessible
juce_AudioCDReader.obj : warning LNK4221: no public symbols found; archive member will be inaccessible
juce_SystemClipboard.obj : warning LNK4221: no public symbols found; archive member will be inaccessible

this happens at the end of building the JUCE project in DEBUG mode. i’ve not noticed anything not working tho, but perhaps i’ve not tried anything that may be broken? :? i tried just adding a CriticalSection and using it, and it worked fine in debug build. my guess is that it won’t be a problem if you’re not trying to hook into juce as if it were a dll… am i mental?

not a problem - those are just cpp files that don’t have any actual code in them, either because the code is disabled with #ifdef, or because it’s implemented elsewhere. I guess the only way to lose the warnings is to remove the files from the build.

i tried to use juce.h and windows.h . i used the tips here, but still got rectangle defined twice. can you please help me? thanks.

D3CK

[code]#ifndef MODULELOADER_H
#define MODULELOADER_H

#include “Module.h”
#include “ModuleContainer.h”

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

#include <juce.h>

class ModuleLoader {

public:
    ModuleLoader(ModuleContainer* container);
    virtual ~ModuleLoader();

	int listModules(File path, bool recursive);
Module* loadModule(String moduleType);

protected:
private:
	ModuleContainer* container;

};

#endif // MODULELOADER_WIN_H[/code]

is the code.
in the ModuleContainer.h (or better, in its implementation)
i use rectangles, and complier tells me they are ambiguous.

So just use “juce::Rectangle” to disambiguate it…

thaought of thath (sorry) but thougt there is a nicer solution.

thanks again jules!

edit: no no , this deos not work for me. i get error “juce” left of :: must be a type. i tried namespace, but compilation still fails, but th error occurs less often. (modulecontainer, witch Rectangle as member compiles fin eone time, but fails after another.
i’ll do some more tests.

edit2: i added a "using namespace juce"
at the end of juce.h. seems like i have to rethink my inclusion structure then.

peace