Re: [osg-users] New LUA plugin fails to link

2014-04-30 Thread Raymond de Vries

Hi Robert,

Aha ok, I see. I thought that 3.2.1 was new enough to give it a try. I 
see the included sources now in the trunk... Obviously my trunk copy was 
not recent enough to notice it earlier.


I did a few tests and only from rev 14114 (From Stephan Huber, fix for 
building lua plugin from local source, to use the local sources), the 
lua plugin is configured properly (on windows) and shows up in visual 
studio. The result is the same, with the same link errors. So the issue 
has always been there on windows, I guess.


Raymond



On 4/29/2014 7:14 PM, Robert Osfield wrote:

Hi Raymond,

Lua itself is pretty widely used and it's *very* portable being Anscii
C.  The new OSG Lua plugin includes the source and builds Lua locally
so there is no need to go chasing external dependencies.

The errors that Paul has published aren't to do with Lua but with
osgDB template methods that VisualStudio isn't handling correctly.

Robert.

On 29 April 2014 17:55, Raymond de Vriesree...@xs4all.nl  wrote:

Hi,

Coincidence, or not, I was going to report the same :-)

On windows, lua is not a standard thing so I guess that it is not built often. 
Nor used?

I am trying to build the plugin with lua 
fromhttps://code.google.com/p/luaforwindows/  (5.1.4) with 32 bit visual studio 
2008 (vc9).

What option could be useful?

Btw where can I find an example how to use the plugin?

Cheers
Raymond



Sent from my iPad


On Apr 29, 2014, at 18:36, Robert Osfieldrobert.osfi...@gmail.com  wrote:

Hi Paul,

The lua plugin has been checked in as it is for a couple of months
now, I'm surprised others haven't come across issues.  This suggest
something either not many Windows are building the OSG and reporting
problems, or that there is something specific about the compiler or
build options you are using.

What compiler are you building with?  Are they any non default build
options you are using?  The Lua plugin doesn't have any specific GL
code in it so shouldn't be effect by GLCORE changes.  It might be
worth just trying a default build though to see if something odd
happens with GLCORE build.

As for multiple defines, these are template definitions provided by
include/osgDB/PropetyInterface that the compiler should be handling
just fine.  It could be that some extra option is required for it to
be a little more C++ compliant.

Robert.


On 29 April 2014 17:10, Paul Martzskewmat...@gmail.com  wrote:
Hi Robert -- There is a new plugin, LUA, which fails to link on Windows when
building current trunk. It looks like multiply defined symbols. I'm building
for GLCORE, but that's probably irrelevant. I'm using the default setting
for the LUA local source CMake variable.

Here's the output:

1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumchar(void)
(??$getTypeEnum@D@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumunsigned char(void)
(??$getTypeEnum@E@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumshort(void)
(??$getTypeEnum@F@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumunsigned short(void)
(??$getTypeEnum@G@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumint(void)
(??$getTypeEnum@H@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumunsigned int(void)
(??$getTypeEnum@I@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumfloat(void)
(??$getTypeEnum@M@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumdouble(void)
(??$getTypeEnum@N@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass osg::Image *(void)
(??$getTypeEnum@PEAVImage@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass osg::Object *(void)
(??$getTypeEnum@PEAVObject@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass osg::BoundingBoxImplclass osg::Vec3d

(void)


Re: [osg-users] New LUA plugin fails to link

2014-04-30 Thread Sebastian Messerschmidt

Hi Robert,

I fixed the problem. It is rather obvious, that the compiler/linker 
barks here.
The macro DECLARE_TYPE(A,B) in PropertyInterface will create explicit 
specialization of the getTypeEnum and GetTypeString function templates 
which will be seen multiple times by the linker in different compilation 
units.

Changing the macro to (note the inline specifier)

#define DECLARE_TYPE(A,B) \
template inline osgDB::BaseSerializer::Type getTypeEnumA() { 
return osgDB::BaseSerializer::RW_##B; } \

template inline const char* getTypeStringA() { return #B; }

will fix the problem.

I'll submit the whole file, so you can merge it.

Hi Raymond,

Lua itself is pretty widely used and it's *very* portable being Anscii
C.  The new OSG Lua plugin includes the source and builds Lua locally
so there is no need to go chasing external dependencies.

The errors that Paul has published aren't to do with Lua but with
osgDB template methods that VisualStudio isn't handling correctly.

Robert.

On 29 April 2014 17:55, Raymond de Vries ree...@xs4all.nl wrote:

Hi,

Coincidence, or not, I was going to report the same :-)

On windows, lua is not a standard thing so I guess that it is not built often. 
Nor used?

I am trying to build the plugin with lua from 
https://code.google.com/p/luaforwindows/ (5.1.4) with 32 bit visual studio 2008 
(vc9).

What option could be useful?

Btw where can I find an example how to use the plugin?

Cheers
Raymond



Sent from my iPad


On Apr 29, 2014, at 18:36, Robert Osfield robert.osfi...@gmail.com wrote:

Hi Paul,

The lua plugin has been checked in as it is for a couple of months
now, I'm surprised others haven't come across issues.  This suggest
something either not many Windows are building the OSG and reporting
problems, or that there is something specific about the compiler or
build options you are using.

What compiler are you building with?  Are they any non default build
options you are using?  The Lua plugin doesn't have any specific GL
code in it so shouldn't be effect by GLCORE changes.  It might be
worth just trying a default build though to see if something odd
happens with GLCORE build.

As for multiple defines, these are template definitions provided by
include/osgDB/PropetyInterface that the compiler should be handling
just fine.  It could be that some extra option is required for it to
be a little more C++ compliant.

Robert.


On 29 April 2014 17:10, Paul Martz skewmat...@gmail.com wrote:
Hi Robert -- There is a new plugin, LUA, which fails to link on Windows when
building current trunk. It looks like multiply defined symbols. I'm building
for GLCORE, but that's probably irrelevant. I'm using the default setting
for the LUA local source CMake variable.

Here's the output:

1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumchar(void)
(??$getTypeEnum@D@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumunsigned char(void)
(??$getTypeEnum@E@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumshort(void)
(??$getTypeEnum@F@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumunsigned short(void)
(??$getTypeEnum@G@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumint(void)
(??$getTypeEnum@H@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumunsigned int(void)
(??$getTypeEnum@I@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumfloat(void)
(??$getTypeEnum@M@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumdouble(void)
(??$getTypeEnum@N@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass osg::Image *(void)
(??$getTypeEnum@PEAVImage@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass osg::Object *(void)
(??$getTypeEnum@PEAVObject@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass 

Re: [osg-users] New LUA plugin fails to link

2014-04-30 Thread Robert Osfield
Hi All,

I've now merged Sebastian's fix.

Cheers,
Robert.

On 30 April 2014 10:10, Sebastian Messerschmidt
sebastian.messerschm...@gmx.de wrote:
 Hi Robert,

 I fixed the problem. It is rather obvious, that the compiler/linker barks
 here.
 The macro DECLARE_TYPE(A,B) in PropertyInterface will create explicit
 specialization of the getTypeEnum and GetTypeString function templates which
 will be seen multiple times by the linker in different compilation units.
 Changing the macro to (note the inline specifier)

 #define DECLARE_TYPE(A,B) \
 template inline osgDB::BaseSerializer::Type getTypeEnumA() { return
 osgDB::BaseSerializer::RW_##B; } \
 template inline const char* getTypeStringA() { return #B; }

 will fix the problem.

 I'll submit the whole file, so you can merge it.

 Hi Raymond,

 Lua itself is pretty widely used and it's *very* portable being Anscii
 C.  The new OSG Lua plugin includes the source and builds Lua locally
 so there is no need to go chasing external dependencies.

 The errors that Paul has published aren't to do with Lua but with
 osgDB template methods that VisualStudio isn't handling correctly.

 Robert.

 On 29 April 2014 17:55, Raymond de Vries ree...@xs4all.nl wrote:

 Hi,

 Coincidence, or not, I was going to report the same :-)

 On windows, lua is not a standard thing so I guess that it is not built
 often. Nor used?

 I am trying to build the plugin with lua from
 https://code.google.com/p/luaforwindows/ (5.1.4) with 32 bit visual studio
 2008 (vc9).

 What option could be useful?

 Btw where can I find an example how to use the plugin?

 Cheers
 Raymond



 Sent from my iPad

 On Apr 29, 2014, at 18:36, Robert Osfield robert.osfi...@gmail.com
 wrote:

 Hi Paul,

 The lua plugin has been checked in as it is for a couple of months
 now, I'm surprised others haven't come across issues.  This suggest
 something either not many Windows are building the OSG and reporting
 problems, or that there is something specific about the compiler or
 build options you are using.

 What compiler are you building with?  Are they any non default build
 options you are using?  The Lua plugin doesn't have any specific GL
 code in it so shouldn't be effect by GLCORE changes.  It might be
 worth just trying a default build though to see if something odd
 happens with GLCORE build.

 As for multiple defines, these are template definitions provided by
 include/osgDB/PropetyInterface that the compiler should be handling
 just fine.  It could be that some extra option is required for it to
 be a little more C++ compliant.

 Robert.

 On 29 April 2014 17:10, Paul Martz skewmat...@gmail.com wrote:
 Hi Robert -- There is a new plugin, LUA, which fails to link on Windows
 when
 building current trunk. It looks like multiply defined symbols. I'm
 building
 for GLCORE, but that's probably irrelevant. I'm using the default
 setting
 for the LUA local source CMake variable.

 Here's the output:

 1ReaderWriterLua.obj : error LNK2005: enum
 osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumchar(void)
 (??$getTypeEnum@D@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already
 defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum
 osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumunsigned char(void)
 (??$getTypeEnum@E@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already
 defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum
 osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumshort(void)
 (??$getTypeEnum@F@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already
 defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum
 osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumunsigned short(void)
 (??$getTypeEnum@G@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already
 defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum
 osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumint(void)
 (??$getTypeEnum@H@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already
 defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum
 osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumunsigned int(void)
 (??$getTypeEnum@I@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already
 defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum
 osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumfloat(void)
 (??$getTypeEnum@M@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already
 defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum
 osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumdouble(void)
 (??$getTypeEnum@N@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already
 defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum
 osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::Image *(void)
 (??$getTypeEnum@PEAVImage@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
 already defined in LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum
 osgDB::BaseSerializer::Type
 __cdecl 

[osg-users] New LUA plugin fails to link

2014-04-29 Thread Paul Martz
Hi Robert -- There is a new plugin, LUA, which fails to link on Windows
when building current trunk. It looks like multiply defined symbols. I'm
building for GLCORE, but that's probably irrelevant. I'm using the default
setting for the LUA local source CMake variable.

Here's the output:

1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumchar(void) (??$getTypeEnum@D@osgDB@
@YA?AW4Type@BaseSerializer@0@XZ) already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumunsigned char(void) (??$getTypeEnum@E@osgDB@
@YA?AW4Type@BaseSerializer@0@XZ) already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumshort(void) (??$getTypeEnum@F@osgDB@
@YA?AW4Type@BaseSerializer@0@XZ) already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumunsigned short(void) (??$getTypeEnum@G@osgDB@
@YA?AW4Type@BaseSerializer@0@XZ) already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumint(void) (??$getTypeEnum@H@osgDB@
@YA?AW4Type@BaseSerializer@0@XZ) already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumunsigned int(void) (??$getTypeEnum@I@osgDB@
@YA?AW4Type@BaseSerializer@0@XZ) already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumfloat(void) (??$getTypeEnum@M@osgDB@
@YA?AW4Type@BaseSerializer@0@XZ) already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumdouble(void) (??$getTypeEnum@N@osgDB@
@YA?AW4Type@BaseSerializer@0@XZ) already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass osg::Image *(void)
(??$getTypeEnum@PEAVImage@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass osg::Object *(void)
(??$getTypeEnum@PEAVObject@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass osg::BoundingBoxImplclass osg::Vec3d
(void) (??$getTypeEnum@V?$BoundingBoxImpl@VVec3d@osg@@@osg@@@osgDB@
@YA?AW4Type@BaseSerializer@0@XZ) already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass osg::BoundingBoxImplclass osg::Vec3f
(void) (??$getTypeEnum@V?$BoundingBoxImpl@VVec3f@osg@@@osg@@@osgDB@
@YA?AW4Type@BaseSerializer@0@XZ) already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass osg::BoundingSphereImplclass osg::Vec3d
(void) (??$getTypeEnum@V?$BoundingSphereImpl@VVec3d@osg@@@osg@@@osgDB@
@YA?AW4Type@BaseSerializer@0@XZ) already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass osg::BoundingSphereImplclass osg::Vec3f
(void) (??$getTypeEnum@V?$BoundingSphereImpl@VVec3f@osg@@@osg@@@osgDB@
@YA?AW4Type@BaseSerializer@0@XZ) already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass std::basic_stringchar,struct
std::char_traitschar,class std::allocatorchar  (void)
(??$getTypeEnum@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@
@std@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass osg::Matrixd(void)
(??$getTypeEnum@VMatrixd@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass osg::Matrixf(void)
(??$getTypeEnum@VMatrixf@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
already defined in LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass osg::Plane(void) (??$getTypeEnum@VPlane
@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass osg::Quat(void) (??$getTypeEnum@VQuat
@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
LuaScriptEngine.obj
1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
__cdecl osgDB::getTypeEnumclass osg::Vec2b(void) (??$getTypeEnum@VVec2b

Re: [osg-users] New LUA plugin fails to link

2014-04-29 Thread Robert Osfield
Hi Paul,

The lua plugin has been checked in as it is for a couple of months
now, I'm surprised others haven't come across issues.  This suggest
something either not many Windows are building the OSG and reporting
problems, or that there is something specific about the compiler or
build options you are using.

What compiler are you building with?  Are they any non default build
options you are using?  The Lua plugin doesn't have any specific GL
code in it so shouldn't be effect by GLCORE changes.  It might be
worth just trying a default build though to see if something odd
happens with GLCORE build.

As for multiple defines, these are template definitions provided by
include/osgDB/PropetyInterface that the compiler should be handling
just fine.  It could be that some extra option is required for it to
be a little more C++ compliant.

Robert.

On 29 April 2014 17:10, Paul Martz skewmat...@gmail.com wrote:
 Hi Robert -- There is a new plugin, LUA, which fails to link on Windows when
 building current trunk. It looks like multiply defined symbols. I'm building
 for GLCORE, but that's probably irrelevant. I'm using the default setting
 for the LUA local source CMake variable.

 Here's the output:

 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumchar(void)
 (??$getTypeEnum@D@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumunsigned char(void)
 (??$getTypeEnum@E@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumshort(void)
 (??$getTypeEnum@F@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumunsigned short(void)
 (??$getTypeEnum@G@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumint(void)
 (??$getTypeEnum@H@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumunsigned int(void)
 (??$getTypeEnum@I@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumfloat(void)
 (??$getTypeEnum@M@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumdouble(void)
 (??$getTypeEnum@N@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::Image *(void)
 (??$getTypeEnum@PEAVImage@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
 already defined in LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::Object *(void)
 (??$getTypeEnum@PEAVObject@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
 already defined in LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::BoundingBoxImplclass osg::Vec3d
(void)
 (??$getTypeEnum@V?$BoundingBoxImpl@VVec3d@osg@@@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
 already defined in LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::BoundingBoxImplclass osg::Vec3f
(void)
 (??$getTypeEnum@V?$BoundingBoxImpl@VVec3f@osg@@@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
 already defined in LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::BoundingSphereImplclass osg::Vec3d
(void)
 (??$getTypeEnum@V?$BoundingSphereImpl@VVec3d@osg@@@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
 already defined in LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::BoundingSphereImplclass osg::Vec3f
(void)
 (??$getTypeEnum@V?$BoundingSphereImpl@VVec3f@osg@@@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
 already defined in LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass std::basic_stringchar,struct
 std::char_traitschar,class std::allocatorchar  (void)
 (??$getTypeEnum@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
 already defined in LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::Matrixd(void)
 

Re: [osg-users] New LUA plugin fails to link

2014-04-29 Thread Raymond de Vries
Hi,

Coincidence, or not, I was going to report the same :-)

On windows, lua is not a standard thing so I guess that it is not built often. 
Nor used?

I am trying to build the plugin with lua from 
https://code.google.com/p/luaforwindows/ (5.1.4) with 32 bit visual studio 2008 
(vc9).

What option could be useful?

Btw where can I find an example how to use the plugin?

Cheers
Raymond



Sent from my iPad

 On Apr 29, 2014, at 18:36, Robert Osfield robert.osfi...@gmail.com wrote:
 
 Hi Paul,
 
 The lua plugin has been checked in as it is for a couple of months
 now, I'm surprised others haven't come across issues.  This suggest
 something either not many Windows are building the OSG and reporting
 problems, or that there is something specific about the compiler or
 build options you are using.
 
 What compiler are you building with?  Are they any non default build
 options you are using?  The Lua plugin doesn't have any specific GL
 code in it so shouldn't be effect by GLCORE changes.  It might be
 worth just trying a default build though to see if something odd
 happens with GLCORE build.
 
 As for multiple defines, these are template definitions provided by
 include/osgDB/PropetyInterface that the compiler should be handling
 just fine.  It could be that some extra option is required for it to
 be a little more C++ compliant.
 
 Robert.
 
 On 29 April 2014 17:10, Paul Martz skewmat...@gmail.com wrote:
 Hi Robert -- There is a new plugin, LUA, which fails to link on Windows when
 building current trunk. It looks like multiply defined symbols. I'm building
 for GLCORE, but that's probably irrelevant. I'm using the default setting
 for the LUA local source CMake variable.
 
 Here's the output:
 
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumchar(void)
 (??$getTypeEnum@D@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumunsigned char(void)
 (??$getTypeEnum@E@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumshort(void)
 (??$getTypeEnum@F@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumunsigned short(void)
 (??$getTypeEnum@G@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumint(void)
 (??$getTypeEnum@H@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumunsigned int(void)
 (??$getTypeEnum@I@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumfloat(void)
 (??$getTypeEnum@M@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumdouble(void)
 (??$getTypeEnum@N@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::Image *(void)
 (??$getTypeEnum@PEAVImage@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
 already defined in LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::Object *(void)
 (??$getTypeEnum@PEAVObject@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
 already defined in LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::BoundingBoxImplclass osg::Vec3d
 (void)
 (??$getTypeEnum@V?$BoundingBoxImpl@VVec3d@osg@@@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
 already defined in LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::BoundingBoxImplclass osg::Vec3f
 (void)
 (??$getTypeEnum@V?$BoundingBoxImpl@VVec3f@osg@@@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
 already defined in LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::BoundingSphereImplclass osg::Vec3d
 (void)
 (??$getTypeEnum@V?$BoundingSphereImpl@VVec3d@osg@@@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
 already defined in LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::BoundingSphereImplclass osg::Vec3f
 (void)
 

Re: [osg-users] New LUA plugin fails to link

2014-04-29 Thread Robert Osfield
Hi Raymond,

Lua itself is pretty widely used and it's *very* portable being Anscii
C.  The new OSG Lua plugin includes the source and builds Lua locally
so there is no need to go chasing external dependencies.

The errors that Paul has published aren't to do with Lua but with
osgDB template methods that VisualStudio isn't handling correctly.

Robert.

On 29 April 2014 17:55, Raymond de Vries ree...@xs4all.nl wrote:
 Hi,

 Coincidence, or not, I was going to report the same :-)

 On windows, lua is not a standard thing so I guess that it is not built 
 often. Nor used?

 I am trying to build the plugin with lua from 
 https://code.google.com/p/luaforwindows/ (5.1.4) with 32 bit visual studio 
 2008 (vc9).

 What option could be useful?

 Btw where can I find an example how to use the plugin?

 Cheers
 Raymond



 Sent from my iPad

 On Apr 29, 2014, at 18:36, Robert Osfield robert.osfi...@gmail.com wrote:

 Hi Paul,

 The lua plugin has been checked in as it is for a couple of months
 now, I'm surprised others haven't come across issues.  This suggest
 something either not many Windows are building the OSG and reporting
 problems, or that there is something specific about the compiler or
 build options you are using.

 What compiler are you building with?  Are they any non default build
 options you are using?  The Lua plugin doesn't have any specific GL
 code in it so shouldn't be effect by GLCORE changes.  It might be
 worth just trying a default build though to see if something odd
 happens with GLCORE build.

 As for multiple defines, these are template definitions provided by
 include/osgDB/PropetyInterface that the compiler should be handling
 just fine.  It could be that some extra option is required for it to
 be a little more C++ compliant.

 Robert.

 On 29 April 2014 17:10, Paul Martz skewmat...@gmail.com wrote:
 Hi Robert -- There is a new plugin, LUA, which fails to link on Windows when
 building current trunk. It looks like multiply defined symbols. I'm building
 for GLCORE, but that's probably irrelevant. I'm using the default setting
 for the LUA local source CMake variable.

 Here's the output:

 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumchar(void)
 (??$getTypeEnum@D@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumunsigned char(void)
 (??$getTypeEnum@E@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumshort(void)
 (??$getTypeEnum@F@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumunsigned short(void)
 (??$getTypeEnum@G@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumint(void)
 (??$getTypeEnum@H@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumunsigned int(void)
 (??$getTypeEnum@I@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumfloat(void)
 (??$getTypeEnum@M@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumdouble(void)
 (??$getTypeEnum@N@osgDB@@YA?AW4Type@BaseSerializer@0@XZ) already defined in
 LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::Image *(void)
 (??$getTypeEnum@PEAVImage@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
 already defined in LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::Object *(void)
 (??$getTypeEnum@PEAVObject@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
 already defined in LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::BoundingBoxImplclass osg::Vec3d
 (void)
 (??$getTypeEnum@V?$BoundingBoxImpl@VVec3d@osg@@@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
 already defined in LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass osg::BoundingBoxImplclass osg::Vec3f
 (void)
 (??$getTypeEnum@V?$BoundingBoxImpl@VVec3f@osg@@@osg@@@osgDB@@YA?AW4Type@BaseSerializer@0@XZ)
 already defined in LuaScriptEngine.obj
 1ReaderWriterLua.obj : error LNK2005: enum osgDB::BaseSerializer::Type
 __cdecl osgDB::getTypeEnumclass