Is there another language that is native to Xojo to write plugins on Windows?
The problems that I keep running into when writing plugins in C++ for Xojo, is that I have to convert some of the functions from C++, to C, then to make sure it follows data types for Xojo. Essentially I need to know two languages (C++ and C) in order to write a more complicated plugin for Xojo.
Is there another language that I can use to write a plugin, or an IDE, or something (?) where I can write the plugin once in one language to make a Xojo plugin?
My understanding is that at this time the answer is NO… but supposedly there is a plan (when or if is another story) that a future version of Xojo will allow writing plugins in Xojo itself.
You can merge c and c++ in one plugin.
Just define common functions so one can call other.
I suppose you could write them in anything that can create a dll and adheres to whatever calling conventions (x86 etc)
If it’s only for Windows, why not use VB.NET or something that’s at least closer in syntax to Xojo?
[quote=466150:@Andy Broughton]If it’s only for Windows, why not use VB.NET or something that’s at least closer in syntax to Xojo?
Thanks for the suggestion. Unfortunately VB or C# or any other languages dont expose all the functionality of Windows, such as DirectX. The only language for Windows that exposes all the functionality is C++.
Thanks for the thought.
I could possibly write the dll with the required functionality in C++ and then write declares in Xojo to expose the methods. I am just trying to only need to touch the code once.
Thanks for you comment.
[quote=466134:@Christian Schmitz]You can merge c and c++ in one plugin.
Just define common functions so one can call other.[/quote]
Thanks. This is what I am trying to get away from, as both C and C++ is needed to write a plugin for Xojo. Having one IDE would lower code issues and minimize an updating nightmare.
I didnt make my request clear, as it would be nice to have one language and one IDE to write the plugin. Technically you answered my question.
Just make sure your C++ code exposes a C interface and things should be fine
You really cant declare into C++ classes
[quote=466160:@Norman Palardy]Just make sure your C++ code exposes a C interface and things should be fine
You really cant declare into C++ classes[/quote]
Yea, your right with exposing the C interface, as the function name-mangling issue happens with C++ in Xojo.
[quote=466157:@Eugene Dakin]Thanks for the suggestion. Unfortunately VB or C# or any other languages dont expose all the functionality of Windows, such as DirectX. The only language for Windows that exposes all the functionality is C++.
Thanks for the thought.[/quote]
Not to derail this discussion, as obviously you have researched this before jumping through the hoops you’ve had to jump through to get your c/c++ dll’s working, but as a decades-long vb/c#.net programmer, I’m very curious as to what you are unable to accomplish using vb.net. Managed DirectX for .net, for example, has been around since 2002.
I guess the other thing I’m even more curious about, is if you’re only writing for windows (an assumption), then why use Xojo at all?
Managed DirectX is deprecated, and its a matter of time until it will have compatibility issues.
The two OSs that I commonly write program for are Windows and Linux. I have a few programs with some custom hardware on Raspberry Pi. Some of my programs have been written in Xojo and it would be nice to expand the existing programs and not have to rewrite them in another language. New programs are not written in Xojo, and support for existing Programs written in Xojo are still in demand.
Copy that. Thanks, Eugene! (and hello from Airdrie!)
I am just east of Calgary. We should meet for a coffee at sometime
Too bad it is forbiden to ask for the alternative you are using in this forum…
North of you two east of Innisfail
Ok, looks there’s at least enough of us to get together and discuss Xojo while playing a game of Euchre (if that were your thing) in the Calgary Area.
I think @Brian O’Brien is in the Calgary area as well
That would make 4 hands
I know a few others as well
Almost enough for a “Alberta Users Group”
Ding Ding Ding! The correct answer is 4 (So far)
Sent you a PM.