Author Topic: Bricscad and wxWidgets  (Read 11648 times)

0 Members and 1 Guest are viewing this topic.

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6941
  • AKA Daniel
Re: Bricscad and wxWidgets
« Reply #15 on: January 12, 2010, 05:44:44 AM »
I could not get the sample to compile either.  :-(
I got the DLL Main code from here.
http://wxforum.shadonet.com/viewtopic.php?t=24401&highlight=autocad

gskelly

  • Newt
  • Posts: 185
Re: Bricscad and wxWidgets
« Reply #16 on: January 12, 2010, 12:12:18 PM »
Ok, I got this to compile at lunch today...

I had asked an additional question regarding wx compilation:
Quote
I wonder how critical it will be for me to have the identical settings you have?
i.e. Things like:
wxUSE_UNICODE
wxUSE_WCHAR_T
wxUSE_STREAMS
wxUSE_STL
wxUSE_STD_IOSTREAM
wxUSE_STD_STRING
and so on...

with the answer:
Quote
The settings you listed are all enabled on our side.
I think for most of them, possibly all, we use the default setting from WxWidgets.
If you need to make sure for other settings, just ask, I can check it here.

So I re-compiled my wxWidgets 2.8.10 as a unicode dll without treating wchar_t as a builtin type (/Zc:wchar_t-) and it works to create a wxdialog in a BRX module with:

Code: [Select]
#include "wx/wxprec.h"

void cmdWxWidgets()
{
    wxDialog dialog(NULL,wxID_ANY,_T("Wx Dialog"));
    dialog.ShowModal();
}

but remember to change the wchar_t setting for the source file that compiles against wx. I don't think it will be possible to mix BRX code and wx code in the same source file (if I understand everything correctly).

(edit) So the result is a BRX module that is dynamically linked to wx and is resolved to the dll's included with Bricscad. Next is to see if the messages are working right but I'm out of time for now.
« Last Edit: January 12, 2010, 12:17:34 PM by gskelly »
Bricscad v12

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6941
  • AKA Daniel
Re: Bricscad and wxWidgets
« Reply #17 on: January 13, 2010, 12:04:22 AM »
Add a button and see if it works  :-) 
here is my solution and ARX&BRX bins for 07 and v10 using static libraries.
the command is doit


It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6941
  • AKA Daniel
Re: Bricscad and wxWidgets
« Reply #18 on: January 15, 2010, 09:30:06 PM »
.... Next is to see if the messages are working right ....

Any luck with this?

frtfff

  • Bull Frog
  • Posts: 215
Re: Bricscad and wxWidgets
« Reply #19 on: January 16, 2010, 04:12:44 AM »
 :kewl:

gskelly

  • Newt
  • Posts: 185
Re: Bricscad and wxWidgets
« Reply #20 on: January 16, 2010, 07:59:16 PM »
Sorry for the delay... I did create a dialog with a couple of buttons that responded but it is making Bricscad unstable. I am gussing it is because I do not have the identical configuration when I compile my wx to link against.

I have a feeling that unless Bricsys was to provide the configuration (or even better a pre-compiled wx dev environment) there will be a lot of crashing Bricscad this way. I just can't find enough time to play! :-(
Bricscad v12

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6941
  • AKA Daniel
Re: Bricscad and wxWidgets
« Reply #21 on: January 17, 2010, 05:16:24 AM »
Thanks for testing this, I think we will just have to wait & see the roadmap Bricsys lays out for Linux plug-ins done in c++.

Swift

  • Swamp Rat
  • Posts: 596
Re: Bricscad and wxWidgets
« Reply #22 on: February 02, 2010, 07:43:53 AM »
Wow Daniel I tried to do this a few years back and never got it to work. I'll be looking at this tonight!

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6941
  • AKA Daniel
Re: Bricscad and wxWidgets
« Reply #23 on: February 02, 2010, 07:53:44 AM »
I thought I saw one of your posts over at the widgets forum dated many moons ago. let me know if you have any questions while this is fresh in my head  :laugh:

avico

  • Mosquito
  • Posts: 12
Re: Bricscad and wxWidgets
« Reply #24 on: March 07, 2010, 03:57:00 PM »
Hi, forum,

read this:

How do I make a dll for use with wxWidgets?

"
// wxDLL is a simple DLL which demonstrates how to use
// wxWindows in a DLL which is called from another
// application (not using wxWindows)
"

http://wxforum.shadonet.com/viewtopic.php?p=5964#5964


It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6941
  • AKA Daniel
Re: Bricscad and wxWidgets
« Reply #25 on: March 08, 2010, 12:08:36 AM »
Hi avico!

I think this is what I ended up using for Autocad.
Welcome to theSwamp  :-)

avico

  • Mosquito
  • Posts: 12
Re: Bricscad and wxWidgets
« Reply #26 on: March 08, 2010, 04:06:24 PM »
Hi Daniel.

More about this in:

http://groups.google.com/group/wx-users/browse_thread/thread/dbf22597ac119386
http://forums.wxwidgets.org/viewtopic.php?t=24401

And a question (no related for wxwidgets)

How to load opendcl runtime in bricscad ?
I have tested openDCL 6.0.0.23 in briscad V10.2.11 (spanish version) and not work.  OpenDCL.9.brx and OpenDCL.10.brx not load

this image http://www.intellicad.net/photo/bricscad-opendcl?xg_source=activity as a great notice.

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6941
  • AKA Daniel
Re: Bricscad and wxWidgets
« Reply #27 on: March 08, 2010, 08:24:52 PM »
You are right! it does not load.  :-o
I will post a message on OpenDCL's site   

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6941
  • AKA Daniel
Re: Bricscad and wxWidgets
« Reply #28 on: March 08, 2010, 08:29:08 PM »

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6941
  • AKA Daniel
Re: Bricscad and wxWidgets
« Reply #29 on: March 09, 2010, 04:32:21 AM »
avico,

See Owen's responce here;
http://www.opendcl.com/forum/index.php?topic=1197.0

PM me if you need a copy that works with your version  :-)