Rtas sdk and VS2008?


#1

Has anyone compiled an Rtas plugin with VS2008 here?

Andrew Simper


#2

I am trying right today, although I get this error message when linking

PlugInLib.lib(DOA_IUnknown.obj) : error LNK2005: _IID_IUnknown already defined in uuid.lib(unknwn_i.obj)

It’s a project I am porting to the tip version after having used the 1.45 for quite long, so maybe there’s something I missed (even considering I’m using PT SDK 7.3 and not 8.0)

Haven’t tried compiling the JUCE demo plugin though, if I can’t sort things out in a while, I’ll give it a try and see if it compiles correctly.


#3

Some additional information: RTAS compiles ok if JUCE is compiled as a library then linked with my plugin.

The clash with the symbol happens only when I’m using the amalgamated version, which sounds strange to me because it should result in the very same object code.

In addition, I can’t figure a reason why the JUCE library itself has to do something with this issue at all: it’s the PluginLibrary.lib complaining that the symbol is defined in a uuid.lib found on the system… compiling JUCE as a library or as a single object file within the project shouldn’t make any difference.

Anyway, I suspect Jules had the same problems when building his demo plugin with the amalgamated version, because it’s project configuration for Visual Studio features an interesting “/FORCE:multiple” additional option in the “Command Line” preferences for the Linker


#4

Yes, I never did find a way to properly fix that, but it seems to work ok.


#5

Yes, I never did find a way to properly fix that, but it seems to work ok.[/quote]

Yep… any clues about why it does happen only with the amalgamated version and not when linking JUCE as a library?


#6

…no, can’t think of any reason why it’d be different…


#7

Just to not leave a thread hanging I did get an rtas to compile using vs 2008. The reason the plugin wasn’t showing up in pro tools is because I was using the channel config {4, 2} which juce does not support properly.

Andrew Simper


#8

This was a helpful thread for me, as I’ve just gotten a Pro Tools plugin built using VS 2008.

The last headache that was giving me odd linker errors was solved by following Jules’ instructions in this comment:

"Important note on Windows: In your project settings for the three juce_RTAS_DigiCode.cpp files and the juce_RTAS_Wrapper.cpp file, you need to set the calling convention to "__stdcall".   If you don't do this, you'll get some unresolved externals and will spend a long time wondering what's going on... All the other files in your project can be set to use the normal __cdecl convention."

Indeed, I had not done this, got the errors, spent a long time wondering…kicking, screaming, etc. I finally noticed the comment but it was not obvious, so I thought I would post it here.


#9

Alright, I got the same error:

How did you guys fix it? I’m not using the amalgamated version because of T macro clashes with Boost - I include the “juce_withoutMacro.h” instead.

Any ideas? How do I link Juce as a library?


#10

After I got the plugin running with VS2008 (VC9) I always had a shutdown crash which I could not track down. I ended up fixing the issue by using VS2005 (VC8) instead.


#11

Hm, well, I am using VS2005…


#12

Someone has posted an rtas shutdown fix, so I’m going to test out VS2008 (VC9) again as it was hopefully this bug and not a compiler issue. I’ll post back here when I found out either way.


#13

[quote=“yfede”]I am trying right today, although I get this error message when linking

PlugInLib.lib(DOA_IUnknown.obj) : error LNK2005: _IID_IUnknown already defined in uuid.lib(unknwn_i.obj)

[/quote]

I got exactly the same error since I upgrade to VC9.
I am using the Juce lib (not amalgamated). Does anyone have the solution for this link error?

[EDIT]
the /FORCE:MULTIPLY flag in the linker command line arg seems to do the job. The error becames a warning.
[/EDIT]

Thx
Kevin