Plugin registers, but isn't available



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/08/2003 at 23:40, xxxxxxxx wrote:

    I double checked the plugin ID and the res files. I changed the Mac style line endings to DOS-style line endings in the res files. It's the only plugin installed.

    All to no avail.

    Condidered that Cinema is showing "Initializing MyPlugin" I assume that the plugin is returning true - is that correct?

    Kabe

    P.S.: The SDK builds and works fine



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/08/2003 at 03:23, xxxxxxxx wrote:

    Since it works on the mac but not on the pc it's almost with 100% certainity a global object somewhere in your code, or a static object in a function. These will break the PC API, since they are initialized before the memory manager is ready.
    Either remove the global object (a global String somewhere?), or see this thread for a solution: http://www.plugincafe.com/forum/display_topic_threads.asp?ForumID=4&TopicID=569
    (And no, 'Initializing MyPlugin' doesn't mean that Register() returned TRUE. Chances are pretty high that Register() isn't even called in your case. You can test that by placing a breakpoint on the Register() function.)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/08/2003 at 06:31, xxxxxxxx wrote:

    yes, globals can stop a plugin from running.
    the only globals you can use are those with a fixed size.
    An easy work around is to build your own structure and put everything global in there. Make 1 global instance of your structure and access that instance from all your plugins / classes. This way you can use anything you like as a global and its also nice and clean.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/08/2003 at 06:51, xxxxxxxx wrote:

    That works, but to be clear you can only have a global pointer to that structure, not make the whole structure instance global. You can allocate the structure in your PluginStart() function and deallocate it in PluginEnd().
    However, if you're using library code that makes use of its own static or global objects you have to use the other workaround/fix.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/08/2003 at 11:08, xxxxxxxx wrote:

    Mmmh, I don't have any globals - well, except the global struct that is used in exactly the way it is used in the SDK.

    I stumbled upon something that might have to do with it though:

    The VC class browser doesn't show any class or struct at all! Is there some setting that I've overlooked? VC may be a good compiler, but the GUI is the worst I've seen in quite some time (exspecially in a bad German translation...)

    Thanks for any help in this frustrating situation.

    Kabe



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/08/2003 at 12:55, xxxxxxxx wrote:

    What "global struct"? Did you try setting a breakpoint on the Register() function to see if the execution ever gets there?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/08/2003 at 13:27, xxxxxxxx wrote:

    Beside the line with the central algorithm and the plugin ID there is *no* (and I mean literally no) difference at all between the SDK Gradient example and my plugin. The same is true for the global struct. In fact, it all works when I copy/paste the code directly into the SDK example.

    In the meantime I'm pretty shure that the class isn't compiled into the final plugin at all. There is some VC mumbo going on here. It doesn't know that the class is in the code, and it doesn't look for it. I rebuild the whole project and now get a LNK2019 for the Register... Method...

    Adding a class always creates a new file. How to add a file that already contain the class definition? I'm completely lost with these f*#%ing assistants, and the German translation is so bad that I'm seriously thinking about getting the English version.

    I'm just searching for a quick and solid way to set up a VC project, starting from the *.cpp and *.res files. I shouldn't have to do much more than to drop the source files, set the target name and compile.

    Currently it looks like I have to learn a fubar system just to compile my files for Windows.

    Thanks for listening.

    Kabe



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/08/2003 at 19:21, xxxxxxxx wrote:

    Now we're getting somewhere. Are you saying that you're trying to create the VC project from scratch? That will be hard. Do as I guess you did on the mac and base the project on the cinema4dsdk workspace. Then you just have to replace the files in the file view and change the linker output filename in the settings to yourplugin.cdl.
    You shouldn't have to use the assistants. Just add the files and VC will find the classes.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 30/08/2003 at 02:31, xxxxxxxx wrote:

    Mh, no, I do not try to create a VC project from scratch - I would rather hit myself with a blunt object... ;-)

    That's what I'm doing:

    - Starting with a CinemaSDK that compiles and works fine (release)
    - I copy the whole folder
    - throw away the old res folder
    - copy my res folder
    - replace main.cpp
    - open the project
    - Save Project map and Project under a new name
    - add my plugin.cpp
    - remove the SDKplugins code
    - compile & build (no errors)

    However, the plugin doesn't show up in the shader list, and the plugin class doesn't show up in VC's class browser. Especially the latter is very disturbing and seems to point to an error - as in the SDK all the classes are shown with their methods in the class browser.

    This is Visual C++ .net 2002, if that matters.

    Cheers

    Kabe

    P.S.: Also there are 3 unused local variables in the class' output method, which throw a warning in MW - I don't know if they shouldn't do in VC as well.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 31/08/2003 at 11:04, xxxxxxxx wrote:

    Hmm, that's strange. Could you try placing breakpoints in PluginStart() and your Register() function to see if they are ever called?
    What do you mean by "- Save Project map and Project under a new name"? I guess this is VC.NET terminology for Workspace and Project? I haven't done this from within VC, since I don't think it's possible in VC6. You could try doing this step by simply renaming the .dsw and .dsp files. VC should ask you to locate the new files when you open yourplugin.dsw.
    (Also, I'm curious. If you have unused variables that MW keeps warning you about, why don't you just remove them...? ;-)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 31/08/2003 at 12:46, xxxxxxxx wrote:

    I guess that workspace and project are the correct terms (don't forget that I have to deal with a ridiculous translation of the VC interface ;-)

    I'll try renaming "Sterner Style" tomorrow.

    Thanks for now

    Kabe

    P.S.: The unused variabled are needed in a line of code that's currently commented out... As the compiler doesn't do anything with an unused variable anyway - I leave them in there to remind me that there is some code that is meant to be included later in the release.


Log in to reply