[prev in list] [next in list] [prev in thread] [next in thread]
List: cmake
Subject: [CMake] c++ and static initalizations
From: Aleix Pol <aleixpol () kde ! org>
Date: 2009-01-24 15:00:45
Message-ID: 757d9a550901240700x15f63c94n95b88eae2cc6b61a () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
hi list,
I'm having a little problem involving c++ static initializations using
static libraries libraries. The problem is that if I link this code to the
executable as a static library the code is never run, but if it is a SHARED
library it is, but I need it to be static (if possible).
The code looks like this:
struct AClass {
static Object* registration() {...}
static int Aregistered=something("A", AClass::registration);
};
Any hint on what should I do so that it is called as i expect?
Thanks,
aleix
[Attachment #5 (text/html)]
hi list,<br>I'm having a little problem involving c++ static initializations \
using static libraries libraries. The problem is that if I link this code to the \
executable as a static library the code is never run, but if it is a SHARED library \
it is, but I need it to be static (if possible).<br> <br>The code looks like \
this:<br>struct AClass {<br> static Object* registration() \
{...}<br> static int Aregistered=something("A", \
AClass::registration);<br>};<br><br>Any hint on what should I do so that it is called \
as i expect?<br> <br>Thanks,<br>aleix<br>
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic