[CMake] Problem linking to shared library (inside project) after upgrade to cmake 2.6

Yogesh Marwaha yogeshm.007 at gmail.com
Mon Jul 14 01:09:12 EDT 2008


2008/7/14 Bill Hoffman <bill.hoffman at kitware.com>:
> OK, so this looks like some sort of moc issue.  Are you running moc on the
> header?  You might want to run nm on all the .o files and find out where the
> little "t" stuff is located.  Could it be that you have more than one file
> called the same thing and the headers are getting included wrong, or the
> .moc file is gettting over written?
>
I cant see this as a moc issue; what moc have to do with the
constructor of a class? I'm directly including moc files into my
source, and am generating moc files using qt4_automoc (please have a
look at complete listing of CMakeLists.txt files of my project in the
first mail of this thread)

Regarding duplicate names; no. Only "Gravity" was being duplicated, it
was the name of the project and also the executable (generated by app
branch), I've now changed that too.

One thing you may note is that if I generate library (GravityCore) as
static, instead of dynamic/shared, then the project compiles and links
correctly; I've not tried executing it though. Static library which is
generated is about 12.x MB while dynamic/shared generated is around
6.x MB.
Can you deduce something from that?

And regarding the t thing, I can only check this when I get back home
later today(actually night) + try to have some basic knowledge of nm +
do what you asked for. But I don't think I can do anything creative in
this regard ;)

Also I'll try with similar qt4/KDE4 based projects and see the results.

Thank you all for your interest in solving my problem. Hope we'll fix it soon :)

Regards,

Yogesh M


More information about the CMake mailing list