Hi guys:

The corrections to wxWidgets were mainly wxString related (from what I recall).  Unfortunately, I didn't keep my partially patched version.  The documentation for wxString includes some sample code that looks awfully familiar:

http://www.wxwidgets.org/wiki/index.php/WxString

I think I had to wrap all of the const char * vgui parameters into wxString constructors whenever they were used.  I'm a little hazy on which string format I ended up passing to the constructor.  wxConvUTF8 might be correct (used in the wxWidgets documentation).  If not, a quick search of the wx forums should point you in the right direction. 

And yes, the bundled version of wxWidgets included with 10.4 is quite old.  I think I installed the latest version when I attempted to get VGUI running. 

Cheers,

Peter

On 05/01/2008, at 12:36 AM, Matt Leotta wrote:

Toby,

  Thanks for the update.  I should have mentioned earlier that I had
similar problems with OpenGL.  I originally added "Headers" to the end
of the OpenGL include path thinking that this was a CMake error.
However, after some searching, I now believe (correct me if I am
wrong) that the Apple way of including OpenGL is "#include
<OpenGL/gl.h>".  This does work with the path found by CMake so I've
just committed this change to vgui in CVS.  There is still the issue
that some people may want to build with the X11 version of OpenGL
rather than the Apple framework.  It would be better if there was some
option for the CMake module that lets the user select which one to
use.  We'll have to contact the CMake team about that.

  I made a brief stab at correcting wxWidgets, but I didn't get very
far.  I've never used wxWidgets on any platform so I didn't really
know what I was doing.  I think the version of wxWidgets I had
pre-installed was too old.

  Thank you for reporting those errors with qt4, I hadn't notice that
before.  I'll try to fix them soon.  I want to reiterate that I have
been using qt4 for months now, and most of it should work.  Let me
know if you find any other bugs.

--Matt


On Jan 3, 2008 6:42 PM, Tobias Wood <twood@doc.ic.ac.uk> wrote:
Hi guys,
Happy New Year! Sorry for the delay in replying, the holidays distracted
me somewhat, but now they are over I thought I would give a quick update
on my situation. My experience is now very similar to Peter's. I was
having trouble getting vgui to compile at all, so I disabled it and
removed that part of my program so I could get some work done over
Christmas (The vgui bit is just to display a stack of images that are then
written to files anyway so it's not vital). I've just tried recompiling
vxl with vgui and I have the following observations:
1) ccmake has trouble locating the OpenGL include directory on OS X. I
think the 'correct' set of headers to point to on OS X are in
OpenGL.framework/Headers, HOWEVER this then requires vgui_gl.h, vgui_glu.h
and vgui_glut.h to be modified. The OpenGL framework does not keep the
headers in a GL/ subdirectory, they are just in Headers/, so I removed the
GL/ prefix from within the APPLE ifdefs. I have also tried linking against
the X11 OpenGL headers, which do have a GL/ subdirectory, but this caused
other problems with headers. This was before Christmas so I can't remember
what now, plus I don't think you can't assume the X11 directories always
exist as they are optional install components.
2) I now have the problem with wxWidgets described by Peter, namely gcc is
unhappy with some string conversions. If Peter can tell me what changes he
made, I will verify that they fix the problem.
3) vgui with qt4 seems to have compiled successfully, however not all the
test programs run successfully (vgui_test_popup crashes with a bus error
and vgui_test_timer complains about post_timer(float,int) not being
implemented. However, this at least seems to be a step in the right
direction.
My next move will be to reinstate the vgui code in my application and try
that.
Thanks for all the help, it's much appreciated,
Toby

On Tue, 18 Dec 2007 14:39:58 -0000, Matt Leotta <matt.leotta@gmail.com>
wrote:


Peter,

  I'll take a look at wxWidgets on OS X.  I haven't tried to compile
that yet.  If I can make a few changes to get it to work with vgui on
OS X I will.

  I'm interested in your approach to using QuickTime with VXL.  I'm
new to Apple specific programming.  If you could provide me with some
sample code showing how you use QuickTime to load video frames into
vil images I might be able to incorporate that into VXL.  Specifically
I'm thinking about writing Quicktime video streams for vidl2.

  I'm still trying to debug the FFMPEG issues that people are having.
It works fine for me with my version from subversion in August
(SVN-r9914).  I'm waiting to test the current subversion code until
they fix the bug related to MMX that causes the code to break on OS X.

  Also, on the vgui side, it should be possible to create a direct
Cocoa interface for vgui instead of relying on Qt or wxWidgets for
translation.  However, I don't know anything about Cocoa or OS X gui
development, so that will probably have to wait.  If anyone knows of
any good tutorials on the subject let me know and I'll take a look
when I get a chance.

  I agree with Amitha that it would be helpful to get a nightly
dashboard build running on OS X.  If there is anyone out there with a
Mac that they can leave running over night, we welcome you to donate
those unused cpu cycles to help us test VXL on OS X.  Or if you want
to donate a Mac to me, I'd be happy to run the dashboard build myself
;)

Thanks,
Matt

On Dec 17, 2007 5:51 PM, Peter Carr <peter.carr@anu.edu.au> wrote:

In addition to GLUT, OS X includes wxWidgets -- at least 10.4 does, I'm
not
sure about earlier versions.  Moreover, the FindwxWidgets.cmake file
included in VXL seems to work correctly on OS X.  However, the last
time I
tried to compile VXL with VGUI enabled, the wxWidgets implementation
needed
a lot of patching to satisfy the gcc variant on OS X (most changes
involved
unicode strings).  Finally, there were bugs in earlier versions of
CMake for
getting VGUI-based applications to run properly (either from the command
line or double clicking in the finder).  I don't know whether these have
been fixed in the latest release or not.

That being said, I use VXL on OS X by compiling the core and contributed
libraries via 'cmake' and 'make' with the terminal, and disabling VGUI
and
FFMPEG.  I believe there are one or two warnings from gcc, but for the
most
part, everything compiles and links cleanly.  I use XCode, Interface
Builder
and QuickTime as substitutes for VGUI and FFMPEG.  In general, it's
fairly
easy to wrap CVPixelBuffers into vil_image_views, as long as you are
happy
with interleaved byte format.  Using packed formats like vil_rgb and
vil_rgba will usually require copying the data from the CVPixelBuffer.

Hope that helps,

Peter




On 14/12/2007, at 9:35 AM, Amitha Perera wrote:

Tobias,

As far as I know, none of the "regular" developers have a MacOS system
to debug on, so it's difficult to help.  (Who knows, maybe someone will
chime in now.)

What gui toolkit is used on the Mac?  glut?  gtk?  Something else?

Amitha.



Tobias Wood wrote:
Hi everyone,
I'm a fairly new (~3 months) user of VxL. At work I am developing on
Windows and MS Visual Studio, but over the last couple of days I have
been
setting up VxL on my Mac Mini so I can work from home. I had a couple of
issues whilst compiling VxL (Trying to find the OpenGL libraries on
Tiger
was fun!), and to get my project to link properly I had to turn off
ZeroLink in XCode, but now I can actually compile and run VxL code.
However, part of my project uses an image deck to display some images.
When my code actually gets to the vgui section, the following error
message is sent continually to the console until the vgui window is
closed:
vgui_test_events[319] Exception raised during posting of notification.
Ignored.  exception: *** -[NSCFString
replaceCharactersInRange:withString:]: Range or index out of bounds
This behaviour is also replicated in the test programs in
vxl/bin/core/vgui/tests/ (Hence the vgui_test_events part at the start
of
that pasted line). This is not a fatal error, but it is annoying! The
exception gets raised several times a second and quickly fills up the
console window.
Does anyone have any idea how to stop this error happening? Is it
something to do with how I have compiled VxL? Any help is much
appreciated, this is a bit beyond my level of experience.
Thanks,
Toby

System info:
Intel Mac Mini 1.66 Core Duo
2 Gigs RAM
VxL 1.9.0
XCode 2.4.1
i686-apple-darwin8-gcc-4.0.1

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
_______________________________________________
Vxl-users mailing list




-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
_______________________________________________
Vxl-users mailing list


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
_______________________________________________
Vxl-users mailing list





--

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


--
Peter Carr
PhD Candidate
Research School of Information Science and Engineering
Australian National University

Embedded Systems
National ICT Australia
7 London Circuit
Canberra, ACT   2601
Phone: +61-02-6267-6244