Re: Interfacing to Breve using Visual Studio.NET?
Ian Lindsay <[email protected]> Sat, 5 Mar 2005 19:02:25 -0500
| Newsgroups | gmane.comp.breve |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Mar 05, 2005 at 05:26:02PM -0500, Greg Schmidt wrote: > I'd like to write c++ code in Visual Studio.NET that interfaces to Breve. > After reading the documentation and tinkering with plugins, my impression > is that GCC must be used on a Windows platform. If I create a DLL > project using VS.NET and try to build the c++ plugin code, I obtain the > following error: > > VSTest error LNK2019: unresolved external symbol _brNewBreveCall > referenced in function _cppSampleLoadFunctions I've only tested linking plugins on Windows with gcc in MinGW and Cygwin, but it should be no problem with the Microsoft compiler if you feed it the import library for breve (which seems to have been omitted from the release). According to this page: http://www.geocities.com/yongweiwu/stdcall.htm ... you'll also need to declare the functions in slBrevePluginAPI.h as __cdecl or give the linker a .def file for the symbols in the import library. > Even if I were successful, I'm still confused because on the one hand, the > documentation refers to dlltool which I believe should create a DLL from a > GCC object file - yet the @plugin directive appears to expect a GCC *.o > object file, not a DLL. The documentation is misleading since Breve just calls LoadLibrary() to load a plugin on Windows, so the @plugin should refer to your DLL. > I'm beginning to think that it is not possible to use VS.NET, perhaps not > without porting Breve to VS.NET (something I'd rather not consider > attempting) Try linking your plugin against the attached import library and .def (instead of against breve.exe). _______________________________________________ breve mailing list [email protected] http://lists.spiderland.org/mailman/listinfo/breve
plugin.def
(text/plain, 962 B)
EXPORTS
_Z19brObjectGetUserDataP8brObject @1
brDataFree @2
brDataNew @3
brEngineAddInstance @4
brEngineAddObject @5
brEngineAddObjectAlias @6
brEngineRegisterObjectType @7
brEngineRemoveInstance @8
brEngineRemoveInstanceDependency @9
brEngineRemoveInstanceObserver @10
brEvalListInsert @11
brEvalListNew @12
brInstanceAddDependency @13
brInstanceAddObserver @14
brInstanceFree @15
brInstanceGetUserData @16
brInstanceRelease @17
brMethodCall @18
brMethodCallByName @19
brMethodCallByNameWithArgs @20
brMethodFind @21
brMethodFindWithArgRange @22
brMethodFree @23
brNewBreveCall @24
brObjectAddCollisionHandler @25
brObjectFind @26
brObjectFree @27
brObjectSetIgnoreCollisionsWith @28
brPluginFindFile @29
brUnknownObjectFind @30
slFree @31
slGetLogFilePointer @32
slMalloc @33
slMessage @34
slRealloc @35
slStrdup @36
plugin.a
(application/octet-stream, 22.8 KB) - not displayed