Re: [osg-users] Borland/Codegear C++ Builder

2009-12-14 Thread Ralph Kern
Wouter Boelen schrieb:
 Hi,
 
 I just got the dubious honour of becoming the poor sap who has to test the 
 viability of using OSG in an existing project. Trouble is, it's been written 
 in Borland C++ builder (and uses VCL,...). And the OSG source isn't fully 
 compatible with its quirks. To make matters worse, Borland uses a different 
 binary format than Visual Studio (which we use on newer projects).
 
 Anyway, I guessed the first step would be to build the entire OSG library 
 with C++ Builder 2007 (generated a makefile for the 2.9.5 source). For the 
 past couple of hours I've been correcting minor build errors, but this one 
 seems to demand some more knowledge of the source:
 

I guess you are working under Windows. So I would leave the OSG source
alone be compiled using Visual Studio. Prepare some simple interface
DLL's under VS (no classes, just simple functions with plain old C data
types) which you can call from your Borland projects.

regards Ralph

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Borland/Codegear C++ Builder

2009-12-14 Thread Simon Hammett
2009/12/14 Wouter Boelen li...@wboelen.be

 Hi,

 I just got the dubious honour of becoming the poor sap who has to test the
 viability of using OSG in an existing project. Trouble is, it's been written
 in Borland C++ builder (and uses VCL,...). And the OSG source isn't fully
 compatible with its quirks. To make matters worse, Borland uses a different
 binary format than Visual Studio (which we use on newer projects).

 Anyway, I guessed the first step would be to build the entire OSG library
 with C++ Builder 2007 (generated a makefile for the 2.9.5 source). For the
 past couple of hours I've been correcting minor build errors, but this one
 seems to demand some more knowledge of the source:


Ugh.

Code:

 Error E2451
 C:\Source\Libraries\OpenSceneGraph-2.9.5_BORLAND\src\osg\GraphicsContext.cpp
 624: Undefined symbol 'iterator
 ' in function GraphicsContext::remove(Operation *)


Try adding:
typedef std::list osg::ref_ptrOperation ::iterator iterator;

to the public part of 'class OperationQueue' in

C:\Development\OpenSceneGraph-2.8.2\include\osg\OperationThread

Looking at the code I'm surprised it compiles in any other compiler.
Borland is correct; there is no OperationQueue::iterator as far as I can
tell.

-- 
http://www.ssTk.co.uk
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Borland/Codegear C++ Builder

2009-12-14 Thread Tim Moore
On 12/14/2009 09:37 AM, Simon Hammett wrote:
 2009/12/14 Wouter Boelen li...@wboelen.be mailto:li...@wboelen.be
 
 Hi,
 
 I just got the dubious honour of becoming the poor sap who has to
 test the viability of using OSG in an existing project. Trouble is,
 it's been written in Borland C++ builder (and uses VCL,...). And the
 OSG source isn't fully compatible with its quirks. To make matters
 worse, Borland uses a different binary format than Visual Studio
 (which we use on newer projects).
 
 Anyway, I guessed the first step would be to build the entire OSG
 library with C++ Builder 2007 (generated a makefile for the 2.9.5
 source). For the past couple of hours I've been correcting minor
 build errors, but this one seems to demand some more knowledge of
 the source:
 
 
 Ugh.
 
 Code:
 
 Error E2451
 
 C:\Source\Libraries\OpenSceneGraph-2.9.5_BORLAND\src\osg\GraphicsContext.cpp
 624: Undefined symbol 'iterator
 ' in function GraphicsContext::remove(Operation *)
 
 
 Try adding:
 typedef std::list osg::ref_ptrOperation ::iterator iterator;
 
 to the public part of 'class OperationQueue' in
 
 C:\Development\OpenSceneGraph-2.8.2\include\osg\OperationThread
Unfortunately, that's not the OperationQueue used in GraphicsContext.
In include/GraphicsContext, in the definition of GraphicsContext,
there's 
typedef std::list ref_ptrOperation  OperationQueue;
 
 Looking at the code I'm surprised it compiles in any other compiler.
 Borland is correct; there is no OperationQueue::iterator as far as I can
 tell.

Whether or not this is good style, Borland is finding the wrong OperationQueue
(I think).

Tim
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Borland/Codegear C++ Builder

2009-12-14 Thread Wouter Boelen
Yep, that seems to be it. I'm going to replace OperationQueue with  
std::list ref_ptrOperation   as a temporary fix.

Thanks :)

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=21398#21398





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Borland/Codegear C++ Builder

2009-12-14 Thread Robert Osfield
Hi Wouter,

On Mon, Dec 14, 2009 at 9:07 AM, Wouter Boelen li...@wboelen.be wrote:
 Yep, that seems to be it. I'm going to replace OperationQueue with  
 std::list ref_ptrOperation   as a temporary fix.

The code in the OSG is technically correct, as the OperationQueue
typedef is within the GraphicsContext scope, so this does look like a
Borland scoping bug.

However, have a class and typedef named the same thing, even in
slightly different scope is not elegant, and is pretty easy to fix.
Try just renaming the GraphicsContext typedef from OperationQueue to
GraphicsOperationQueue.  I'm making this change in my own check out of
svn/trunk right now and once I get a clean build will check this
change in.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Borland/Codegear C++ Builder

2009-12-14 Thread Wouter Boelen
I can safely confirm that Borland's scoping is a little off sometimes.

Anyway, the C-based wrapper approach is probably the easiest; no more source 
code mangling ;)

Cheers,
Wouter

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=21419#21419





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Borland/Codegear C++ Builder

2009-12-14 Thread Robert Osfield
Hi Wouter,

On Mon, Dec 14, 2009 at 12:42 PM, Wouter Boelen li...@wboelen.be wrote:
 I can safely confirm that Borland's scoping is a little off sometimes.

I've now got my typedef rename compiled.  Did it work for you?  Is it
worth checking in the change?

 Anyway, the C-based wrapper approach is probably the easiest; no more source 
 code mangling ;)

How far did you get with building the OSG?   If the required changes
are not too intrusive then I'd like to get them checked into svn/trunk
so yourself and others don't have to jump through hoops to get things
compiled under Borland compilers.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Borland/Codegear C++ Builder

2009-12-14 Thread Wouter Boelen
Simply renaming the typedef works.

The trouble with the Borland compiler is in many, tiny differences with other 
compilers, that are individually easily rectified. According to the generated 
makefile I got about 15% of the lib to compile so far :) 

Still, compilation involves a lot of hoop-jumping, so I've decided to go with 
the just make a DLL with visual studio-approach. The hoops might be small, 
but there's a lot of them and I don't have infinite time :(
If I or anyone else gets around to thouroughly testing Borland, the patches 
will of course make it upstream.



Cheers,
Wouter

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=21431#21431





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org