I have been trying, without success, to compile the HelloStell module as a start to developing a plug-in module of my own. I kept getting "undefined reference" errors when building...
I hoped that Stephen's suggestions and Fabien's changes to the SVN would get this working, but unfortunately, they don't - at least on my system. I'm sure it's just a setup problem here, but I'm at a loss to see where. I have just downloaded the complete SVN set into a clean folder structure to ensure no older files are lurking around to give problems.
I am using the MSYS setup as described on the Wiki, and I can compile and build the "new" Stellarium (which uses the libstelMain.dll) using the instructions there. This runs OK (once I replaced the QT 4.2.3 DLLs from the 0.9.0 install with the newer 4.3.1 versions!)
When I first built the HelloStel module, I get the error:
Linking CXX shared module libHelloStelModule.dll
c:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lstelMain
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
Note that there is no stelMain.a library in any of the paths after building Stellarium itself.
I did find libstelMain.dll.a which I assume is a library. So I modified the build.make file to use that instead of stelMain.a
Then when I built I got the errors:
Linking CXX shared module libHelloStelModule.dll
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj:HelloStelModule.cpp:(.text+0x18): undefined reference to `vtable for StelModule'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj:HelloStelModule.cpp:(.text+0x28): undefined reference to `vtable for StelModule'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj:HelloStelModule.cpp:(.text+0x38): undefined reference to `vtable for StelModule'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj:HelloStelModule.cpp:(.text+0x249): undefined reference to `StelApp::singleton'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj:HelloStelModule.cpp:(.text+0x262): undefined reference to `StelModuleMgr::getModule(std::string const&)'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj:HelloStelModule.cpp:(.text+0x3e3): undefined reference to `StelApp::singleton'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj:HelloStelModule.cpp:(.text+0x405): undefined reference to `StelLocaleMgr::getSkyLanguage() const'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj:HelloStelModule.cpp:(.text+0x40b): undefined reference to `StelApp::singleton'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj:HelloStelModule.cpp:(.text+0x436): undefined reference to `StelFontMgr::getStandardFont(std::string const&, double)'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj:HelloStelModule.cpp:(.text+0x488): undefined reference to `vtable for StelModule'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj:HelloStelModule.cpp:(.text+0x613): undefined reference to `StelApp::singleton'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj:HelloStelModule.cpp:(.text+0x635): undefined reference to `StelLocaleMgr::getSkyLanguage() const'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj:HelloStelModule.cpp:(.text+0x63b): undefined reference to `StelApp::singleton'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj:HelloStelModule.cpp:(.text+0x666): undefined reference to `StelFontMgr::getStandardFont(std::string const&, double)'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj:HelloStelModule.cpp:(.text+0x6b8): undefined reference to `vtable for StelModule'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj:HelloStelModule.cpp:(.text+0x80a): undefined reference to `StelUtils::stringToWstring(std::string const&)'
CMakeFiles/HelloStelModule.dir/HelloStelModule.obj:HelloStelModule.cpp:(.text+0x865): 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:HelloStelModule.cpp:(.rdata$_ZTV15HelloStelModule[vtable for HelloStelModule]+0x28): 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
- which was where I was in the first place!
So, I'm stuck. If any of you (Stephen especially, since he has solved this, I hope) have any suggestions, I'm desperate to hear them. I suspect it may be to do with my file/folder structure compared to yours, so if you can tell me how you have all the source / destinations organised, that may help!
Thanks in advance,

Steve Ingamells