This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[SOLVED] Bug: Global functions in Eigen/src/Geometry/Scaling.h

Tags: None
(comma "," separated)
dimula73
Registered Member
Posts
4
Karma
0
I think there is a bug. Krita desn't want to link with latest (svn) version of Eigen, because there are multiple definitions of `Scaling(float s)` and `Scaling(double s)` global functions in different object files.

It happened after revision r917841:
Big change in DiagonalMatrix and Geometry/Scaling:
[///skipped///]
* add the Scaling global function to simplify the creation
of scaling objects

UniformScaling Scaling(float s) { return UniformScaling(s); }
UniformScaling Scaling(double s) { return UniformScaling(s); }


They implemented in headers, headers included in different objects=> so the same function is implemented in different objects => we get redifinition of symbol when linking.

I don't know how to fix it better using C++, but i guess they should be wrapped in some class or removed at all from headers.

Last edited by bjacob on Sat Jan 31, 2009 1:41 pm, edited 1 time in total.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
thanks for the report.
we have to make them inline and/or static but I cannot commit now (I don't have my pub key with me)

dimula73 wrote:I think there is a bug. Krita desn't want to link with latest (svn) version of Eigen, because there are multiple definitions of `Scaling(float s)` and `Scaling(double s)` global functions in different object files.

It happened after revision r917841:
Big change in DiagonalMatrix and Geometry/Scaling:
[///skipped///]
* add the Scaling global function to simplify the creation
of scaling objects

UniformScaling Scaling(float s) { return UniformScaling(s); }
UniformScaling Scaling(double s) { return UniformScaling(s); }


They implemented in headers, headers included in different objects=> so the same function is implemented in different objects => we get redifinition of symbol when linking.

I don't know how to fix it better using C++, but i guess they should be wrapped in some class or removed at all from headers.
User avatar
bjacob
Registered Member
Posts
658
Karma
3
should be fixed now (r918898)
Can you retry?

Last edited by bjacob on Fri Jan 30, 2009 11:04 pm, edited 1 time in total.


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!
dimula73
Registered Member
Posts
4
Karma
0
bjacob wrote:should be fixed now (r918898)
Can you retry?


Yes, it's fixed. Thanks :)


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell