ogledit Where is it and can it be built?

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
olduser
Earned a small fee
Earned a small fee
Posts: 12
Joined: Sun Jun 06, 2021 7:16 am

ogledit Where is it and can it be built?

Post by olduser » Sun Jun 06, 2021 7:21 am

I used to used wxwidget version 2.4 and have an application using ogledit.
I tried to port it but could not with many compiler errors that I don't understand.

Was wondering if anyone is able to build it with the newest version.

I am using ubuntu 18 at the moment.

If not, was wondering if I can get 2.4 or 2.8 to work perhaps with an older compiler.

DavidHart
Site Admin
Site Admin
Posts: 4063
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: ogledit Where is it and can it be built?

Post by DavidHart » Sun Jun 06, 2021 10:30 am

Hi,

The 'contrib/' section was removed in wx3, so the latest version that contained contrib/samples/ogl/ogledit is wx2.8.12.
I am using ubuntu 18 at the moment.
I presume you mean 18.04 (bionic). That doesn't supply wx2.8, but it's not hard to build it from a tarball (which you can get from https://www.wxwidgets.org/downloads/).

I successfully built that in a bionic virtualbox guest: in the dir of the extracted tarball do:

Code: Select all

export CFLAGS=-std=c99 CXXFLAGS=-std=c++98
(cd udb && ../configure --prefix=$(pwd) --enable-debug && make -j`nproc`)
However I can't get the contrib section to link:
"cannot find -lwx_gtk2d_deprecated-2.8"
(IIRC one reason for removing contrib/ was that nobody was bothering to maintain it.)

So, before I spend more time trying, could I ask why you feel you need ogledit? I've no idea what it is supposed to do, but perhaps there are more recent alternatives (which might even be better...).

Regards,

David

olduser
Earned a small fee
Earned a small fee
Posts: 12
Joined: Sun Jun 06, 2021 7:16 am

Re: ogledit Where is it and can it be built?

Post by olduser » Sun Jun 06, 2021 4:26 pm

Thanks David

I am also getting "cannot find -lwx_gtk2d_deprecated-2.8" too.

make does not do anything in the deprecated directory

I have tried to port my program to 3.1.4. The program uses ogledit as part of the visualization aspect. I ran into a compiler error that was unrelated and nothing on google about people having the same problem so for now, my only way is to get it working on the old version. And then maybe I can see if I can upgrade.

olduser
Earned a small fee
Earned a small fee
Posts: 12
Joined: Sun Jun 06, 2021 7:16 am

Re: ogledit Where is it and can it be built?

Post by olduser » Sun Jun 06, 2021 4:41 pm

ogledit is one of a kind.
There is nothing better at integrating a graph editing system.
To be clear graph as in nodes and edges like a visio drawing.
It was seamless.

I have not tried
https://github.com/vadz/grapheditor

But from what I can see it creates a graphvis drawing.
With ogledit, you can modify the graph and the data structure simultaneously. Using a drawing program does not allow that.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 5224
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: ogledit Where is it and can it be built?

Post by ONEEYEMAN » Sun Jun 06, 2021 4:58 pm

Hi,
Maybe you can ask Vadim to add it?
Or maybe it is already in planning?

Thank you.

olduser
Earned a small fee
Earned a small fee
Posts: 12
Joined: Sun Jun 06, 2021 7:16 am

Re: ogledit Where is it and can it be built?

Post by olduser » Sun Jun 06, 2021 5:21 pm

Anyone who can make it work is my friend.
I don't know who Vadim is.

User avatar
doublemax
Moderator
Moderator
Posts: 16189
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: ogledit Where is it and can it be built?

Post by doublemax » Sun Jun 06, 2021 5:38 pm

I threw all the ogl and ogledit files into an empty VS project and checked the errors. Although there are many, they're mostly the same type of error. It may take a few hours, but i think porting this to wx 3.x should be possible. If you want to do it, we can help, but i don't think anyone else is doing this for you.
Use the source, Luke!

PB
Part Of The Furniture
Part Of The Furniture
Posts: 3062
Joined: Sun Jan 03, 2010 5:45 pm

Re: ogledit Where is it and can it be built?

Post by PB » Sun Jun 06, 2021 5:51 pm

I was able to build it with 3.1.6 on MSW, just as doublemax did, i.e., dropping it onto a single project and building it there.

It required just few tweaks, would be even easier if wxWidgets were built with WXWIN_COMPATIBILITY_2_8 to avoid all those GDI enum warnings.

It may require more tweaks for 64-bit, as there are some non-portable pointer to long casts.

olduser
Earned a small fee
Earned a small fee
Posts: 12
Joined: Sun Jun 06, 2021 7:16 am

Re: ogledit Where is it and can it be built?

Post by olduser » Sun Jun 06, 2021 6:11 pm

Thanks, guys.

Then the code is fine as is.

It must have to do with the building routine in ubuntu.
autogen.sh does nothing it seems, but configure does a lot.
I wonder if it is not dealing with the contrib directory.

I see a lot of talk about cmake but I am using make.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 5224
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: ogledit Where is it and can it be built?

Post by ONEEYEMAN » Sun Jun 06, 2021 6:28 pm

Hi,
S what if you just drop its files directly into project you do the porting and compile?

Thank you.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 3062
Joined: Sun Jan 03, 2010 5:45 pm

Re: ogledit Where is it and can it be built?

Post by PB » Sun Jun 06, 2021 7:02 pm

olduser wrote:
Sun Jun 06, 2021 6:11 pm
Then the code is fine as is.
It is not, at least with wxWidgets 3.1.6. I had to make a couple of changes both to the ogl files and the sample to be able to build it, including commenting out some #includes. But nothing difficult.
ogl-sample.png
ogl-sample.png (6.19 KiB) Viewed 1340 times
But that is just building it and was preferring speed, so I may have missed something. I noticed that the sample does not save the file, it always has 0 size.

Making it actually work properly may not be easy or possible, the code seems to be really old.

olduser
Earned a small fee
Earned a small fee
Posts: 12
Joined: Sun Jun 06, 2021 7:16 am

Re: ogledit Where is it and can it be built?

Post by olduser » Sun Jun 06, 2021 8:42 pm

Ok then for now I will have to in fact stick with the old version of wx.

olduser
Earned a small fee
Earned a small fee
Posts: 12
Joined: Sun Jun 06, 2021 7:16 am

Re: ogledit Where is it and can it be built?

Post by olduser » Sun Jun 06, 2021 8:56 pm

[/quote]

I had to make a couple of changes both to the ogl files and the sample to be able to build it, including commenting out some #includes. But nothing difficult.
[/quote]

I was wondering how could one get a hold of your changes. At least it's something to work with.

olduser
Earned a small fee
Earned a small fee
Posts: 12
Joined: Sun Jun 06, 2021 7:16 am

Re: ogledit Where is it and can it be built?

Post by olduser » Mon Jun 07, 2021 7:49 am

DavidHart wrote:
Sun Jun 06, 2021 10:30 am
Hi,

The 'contrib/' section was removed in wx3, so the latest version that contained contrib/samples/ogl/ogledit is wx2.8.12.
I am using ubuntu 18 at the moment.
I presume you mean 18.04 (bionic). That doesn't supply wx2.8, but it's not hard to build it from a tarball (which you can get from https://www.wxwidgets.org/downloads/).

I successfully built that in a bionic virtualbox guest: in the dir of the extracted tarball do:

Code: Select all

export CFLAGS=-std=c99 CXXFLAGS=-std=c++98
(cd udb && ../configure --prefix=$(pwd) --enable-debug && make -j`nproc`)
However I can't get the contrib section to link:
"cannot find -lwx_gtk2d_deprecated-2.8"
(IIRC one reason for removing contrib/ was that nobody was bothering to maintain it.)

So, before I spend more time trying, could I ask why you feel you need ogledit? I've no idea what it is supposed to do, but perhaps there are more recent alternatives (which might even be better...).

Regards,

David

The Linux/ubuntu build process fell apart at some point.

wx_gtk2d_deprecated-2.8 is required by all of the contrib projects yet I don't see anywhere where it is in fact built.

grep ed the who project and found where it is required for linking but nowhere to build it.

olduser
Earned a small fee
Earned a small fee
Posts: 12
Joined: Sun Jun 06, 2021 7:16 am

Re: ogledit Where is it and can it be built?

Post by olduser » Mon Jun 07, 2021 7:52 am

PB wrote:
Sun Jun 06, 2021 7:02 pm
olduser wrote:
Sun Jun 06, 2021 6:11 pm
Then the code is fine as is.
It is not, at least with wxWidgets 3.1.6. I had to make a couple of changes both to the ogl files and the sample to be able to build it, including commenting out some #includes. But nothing difficult.
ogl-sample.png

But that is just building it and was preferring speed, so I may have missed something. I noticed that the sample does not save the file, it always has 0 size.

Making it actually work properly may not be easy or possible, the code seems to be really old.
It would be very valuable to get a hold of your work. It's possible that the save function never worked. It is not important to me. But to know which include files to eliminate is a big deal.

Post Reply