Hi Stephen,

Thanks for your email! I actually am stuck with the same problem, and would really like to know a solution for that since it is quite critical point for the future of Stellarium to have the plug-ins working on windows..
The problem at compilation is quite strange because because we are compiling a dynamic library and therefore there should be no check at link time whether the references to the methods are present or not. This check is normally done a loading time, i.e. when the plugin is actually loaded by Stellarium.

I didn't spent too much time that problem, so there may be an obvious solution. A good hint is that a similar problem was solved on macOSX by adding the "-undefined dynamic_lookup" flag to the linker. This however doesn't work with MinGW...
Good luck and please let us know if you find a solution!

Fabien


On 8/30/07, Stephen Molloy <stephen@zamano.com> wrote:
Hi,

I'm not sure if this is the best place to ask, but I am attempting compile
the HelloStelModule from the extmodules directory and I am having problems
with linking. I have built the development version of Stellarium
successfully. I am considering developing a Stellarium plugin.

My C++ experience is mainly with Borland and MSVS, not with the command
line.

This is the error:

Linking CXX shared module libHelloStelModule.dll
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x6c):HelloStelModu
le.cpp: undefined reference to `TypeFace::~TypeFace()'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x8a):HelloStelModu
le.cpp: undefined reference to `vtable for StelModule'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0xae):HelloStelModu
le.cpp: undefined reference to `vtable for StelModule'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x12c):HelloStelMod
ule.cpp: undefined reference to `TypeFace::~TypeFace()'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x14a):HelloStelMod
ule.cpp: undefined reference to `vtable for StelModule'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x16e):HelloStelMod
ule.cpp: undefined reference to `vtable for StelModule'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x1ec):HelloStelMod
ule.cpp: undefined reference to `TypeFace::~TypeFace()'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x207):HelloStelMod
ule.cpp: undefined reference to `vtable for StelModule'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x23b):HelloStelMod
ule.cpp: undefined reference to `vtable for StelModule'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x423):HelloStelMod
ule.cpp: undefined reference to `StelApp::singleton'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x445):HelloStelMod
ule.cpp: undefined reference to `StelLocaleMgr::getSkyLanguage() const'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x44b):HelloStelMod
ule.cpp: undefined reference to `StelApp::singleton'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x476):HelloStelMod
ule.cpp : undefined reference to `StelFontMgr::getStandardFont(std::string
const&, double)'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x4c8):HelloStelMod
ule.cpp: undefined reference to `vtable for StelModule'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x653):HelloStelMod
ule.cpp: undefined reference to `StelApp::singleton'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x675):HelloStelMod
ule.cpp: undefined reference to `StelLocaleMgr::getSkyLanguage() const'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x67b):HelloStelMod
ule.cpp: undefined reference to `StelApp::singleton'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x6a6):HelloStelMod
ule.cpp: undefined reference to `StelFontMgr::getStandardFont(std::string
const&, double)'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x6f8):HelloStelMod
ule.cpp: undefined reference to `vtable for StelModule'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x7fd):HelloStelMod
ule.cpp: undefined reference to `glColor3f@12'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x84a):HelloStelMod
ule.cpp : undefined reference to `StelUtils::stringToWstring(std::string
const&)'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.text+0x8a5):HelloStelMod
ule.cpp: undefined reference to `Projector::drawText(SFont const*, float,
float, std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> > const&, float, float, float, bool) const'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj(.rdata$_ZTV15HelloStelMod
ule[vtable for HelloStelModule]+0x28):HelloStelModule.cpp: undefined
reference to `StelModule::getModuleVersion() const'
collect2: ld returned 1 exit status
make[2]: *** [src/libHelloStelModule.dll] Error 1
make[1]: *** [src/CMakeFiles/HelloStelModule.dir/all] Error 2
make: *** [all] Error 2

I presume I need libraries to link to, but I'm not sure how to build them or
get them on Windows.

The obj files are generated during the build.

Has anyone else built the modules in Windows?


Previous to this error I was getting this error (which I solved by making a
small change to the CMakeLists):
In file included from
c:/msys/1.0/home/Stephen/stellarium/src/stelutils/Translator.hpp:33,
                 from
c:/msys/1.0/home/Stephen/stellarium/src/StelLocaleMgr.hpp:24,
                 from
c:/msys/1.0/home/Stephen/extmodules/HelloStelModule/src/HelloStelModule.cpp:
22:
c:/msys/1.0/home/Stephen/stellarium/src/stelutils/gettext.h:28:22:
libintl.h: No such file or directory
In file included from
c:/msys/1.0/home/Stephen/stellarium/src/StelLocaleMgr.hpp:24,
                 from
c:/msys/1.0/home/Stephen/extmodules/HelloStelModule/src/HelloStelModule.cpp:
22:
c:/msys/1.0/home/Stephen/stellarium/src/stelutils/Translator.hpp: In member
function `std::string Translator::translateUTF8(const std::string&)':
c:/msys/1.0/home/Stephen/stellarium/src/stelutils/Translator.hpp:69: error:
`gettext' undeclared (first use this function)
c:/msys/1.0/home/Stephen/stellarium/src/stelutils/Translator.hpp:69: error:
(Each undeclared identifier is reported only once for each function it
appears in.)
c:/msys/1.0/home/Stephen/stellarium/src/stelutils/Translator.hpp: In member
function `QString Translator::qtranslate(const std::string&)':
c:/msys/1.0/home/Stephen/stellarium/src/stelutils/Translator.hpp:88: error:
`gettext' undeclared (first use this function)
make[2]: *** [src/CMakeFiles/HelloStelModule.dir/HelloStelModule.obj] Error
1
make[1]: *** [src/CMakeFiles/HelloStelModule.dir/all] Error 2
make: *** [all] Error 2

I solved this by adding an -I include directory which had the libintl.h.

Stephen




-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>   http://get.splunk.com/
_______________________________________________
Stellarium-pubdevel mailing list
Stellarium-pubdevel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel