Re: Writing a c++ plugin under windows

jon klein <[email protected]> Thu, 7 Apr 2005 12:22:32 -0400
Newsgroups gmane.comp.breve
Message-ID <[email protected]>
On Apr 6, 2005, at 7:51 PM, Michael Ahern wrote:

> Hi,
>
> I have been having trouble compiling the c++Sample.cpp plugin under 
> windows.
>
> My current setup is with the current release of MinGW (3.1).
> Following the instructions I compile the demo with the following set
> of commands:
>
> g++ -c -DWINDOWS c++Sample.cpp
> dlltool -z c++Sample.def c++Sample.o
> ld -shared -o c++Sample_plugin.o c++Sample.o c++Sample.def 
> ../../bin/breve.exe
>
> Finally however, when I try to run the sample I get the following 
> error message:
>> error loading plugin c++Sample_plugin.o: Invalid access to memory 
>> location.
>>
>> Unknown Function Error: Internal function "cppSampleMakeTestClass" 
>> not found at
>> line 26 of file "c++SampleDemo.tz"
>
> Has anyone had success compiling the sample with a similar setup or
> does anyone have a windows configuration that works for them?
>
> Any help would be greatly appreciated.

There's a new way to build a plugin for Windows which uses the attached
plugin library instead of linking to the breve binary directly.

g++ -I.. -shared -o c++Sample_plugin.o c++Sample.cpp ./plugin.a



I'm not sure why the original method isn't working, but give this new
library a try.  Let me know if the attachment doesn't come through.

- jon klein

_______________________________________________
breve mailing list
[email protected]
http://lists.spiderland.org/mailman/listinfo/breve
plugin.a (application/octet-stream, 63.3 KB) - not displayed