How to compile PLSM2

Roth

28-02-2006 18:14:14

OK, so I'm trying to compile the PLSM2 (including the MapSplitter and the MapEditor). Where do I put the paginglandscape folder as taken from the ogreaddons CVS, so the compiler can find the files it needs without me having to change the include and lib settings for the projects?

Roth

28-02-2006 18:49:44

Stupid me... I figured that out for myself. But now I have another problem. The plugin itself compiles without any errors, however the Demo does this when trying to link:
Compiling...
PagingLandScape.cpp
Linking...
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup
..\bin\Debug/Demo_PagingLandScape2.exe : fatal error LNK1120: 1 unresolved externals

Then the MapSplitter does this:
MapUtil.obj : error LNK2019: unresolved external symbol "public: __thiscall Ogre::PagingLandScapeData2DManager::PagingLandScapeData2DManager(class Ogre::PagingLandScapeSceneManager *,class Ogre::PagingLandScapeOptions *)" (??0PagingLandScapeData2DManager@Ogre@@QAE@PAVPagingLandScapeSceneManager@1@PAVPagingLandScapeOptions@1@@Z) referenced in function "public: void __thiscall Ogre::MapUtil::LoadDataFromSource(void)" (?LoadDataFromSource@MapUtil@Ogre@@QAEXXZ)
..\bin\Debug/MapSplitterD.exe : fatal error LNK1120: 1 unresolved externals

And the MapEditor...
c:\Ogre\ogrenew\Samples\MapEditor\src\MapEditorListener.cpp(237) : error C2039: 'getDetailLevel' : is not a member of 'Ogre::Camera'
c:\Ogre\ogrenew\OgreMain\include\OgreCamera.h(76) : see declaration of 'Ogre::Camera'
c:\Ogre\ogrenew\Samples\MapEditor\src\MapEditorListener.cpp(237) : error C2065: 'SDL_SOLID' : undeclared identifier
c:\Ogre\ogrenew\Samples\MapEditor\src\MapEditorListener.cpp(239) : error C2039: 'setDetailLevel' : is not a member of 'Ogre::Camera'
c:\Ogre\ogrenew\OgreMain\include\OgreCamera.h(76) : see declaration of 'Ogre::Camera'
c:\Ogre\ogrenew\Samples\MapEditor\src\MapEditorListener.cpp(239) : error C2065: 'SDL_WIREFRAME' : undeclared identifier
c:\Ogre\ogrenew\Samples\MapEditor\src\MapEditorListener.cpp(243) : error C2039: 'setDetailLevel' : is not a member of 'Ogre::Camera'
c:\Ogre\ogrenew\OgreMain\include\OgreCamera.h(76) : see declaration of 'Ogre::Camera'
c:\Ogre\ogrenew\Samples\MapEditor\src\MapEditorListener.cpp(243) : error C3861: 'SDL_SOLID': identifier not found, even with argument-dependent lookup
MapEditor.cpp
d:\Libnoise\include\noise\noiseutils.h(620) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Libnoise\include\noise\noiseutils.h(1009) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
c:\Ogre\ogrenew\Samples\MapEditor\src\MapEditor.cpp(39) : error C2664: 'CEGUI::OgreCEGUIRenderer::OgreCEGUIRenderer(Ogre::RenderWindow *,Ogre::uint8,bool,CEGUI::uint,Ogre::SceneManager *)' : cannot convert parameter 5 from 'Ogre::SceneType' to 'Ogre::SceneManager *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
c:\Ogre\ogrenew\Samples\MapEditor\src\MapEditor.cpp(79) : error C2664: 'Ogre::Root::getSceneManager' : cannot convert parameter 1 from 'Ogre::SceneType' to 'const Ogre::String &'
Reason: cannot convert from 'Ogre::SceneType' to 'const Ogre::String'
No constructor could take the source type, or constructor overload resolution was ambiguous

... and I'm still waiting :)

I don't care much for the Demo, but I do need the MapSplitter and the MapEditor so can anyone please tell me what to do? Thanks.

tuan kuranes

28-02-2006 18:50:28

Read the wiki: http://www.ogre3d.org/wiki/index.php/Pa ... ne_Manager
If it's not complete enough, post here for pointing documentation lacks.

Roth

28-02-2006 19:41:33

That answers my first post, not the second...

tuan kuranes

28-02-2006 20:00:54

What do you use to build plsm2 ?
If vc8, i might have forgot to commit project files, if not what compiler it is ?

fixes :
- Change plsm2 demo project visual studio settings under Debug to _CONSOLE.

- Mapsplitter need PagingLandScapeData2DManager.cpp to be added to project files to be compiled.

MapEditor is not supposed to compile right now, see mapeditor long thread about latest sources, not sure if latest cvs compatible.

Roth

28-02-2006 20:12:52

I'm using VC7.1.

I'll try those fixes and see what happens.

And if MapEditor isn't supposed to compile, how do I get the binaries for the latest version?

tuan kuranes

28-02-2006 20:25:03

It's hidden in mapeditor thread, Falagard posted one, I think.

Falagard

02-03-2006 05:21:21

Hey Tuan, I just got latest out of CVS and had same problems. Your fixes weren't yet available in anon CVS I guess.

I added the data2dmanager to mapsplitter and got it to compile.

For the PLM Demo I had to change


#if !defined _DEBUG && OGRE_PLATFORM == OGRE_PLATFORM_WIN32
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )


to


#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )


Is there a reason for the #!defined _DEBUG?

jacmoe

02-03-2006 07:00:35

Maybe it means that in debug builds it is a console so that one can more easily watch the ogre.log.

But AllocConsole would be a much better choice.

tuan kuranes

02-03-2006 09:13:06

allocconsole alone doesn't work.
you have to write a whole thing like in http://www.ogre3d.org/phpBB2/viewtopic. ... 8535#48535.

Ogre log in console seems manadatory, as it should helps people using plsm2 seeing log errors.