PlaneShift

Development => Development Deliberation => Topic started by: AryHann on February 16, 2005, 05:07:01 pm

Title: Cannot compile
Post by: AryHann on February 16, 2005, 05:07:01 pm
Hi,

I have been trying to compile the latest CVS version of PS, after I have been updating CS with the new cs-win libs and compiled it with the latest CVS Version.

I get a compiling error:

  vmAnimCallback *callback = new vmAnimCallback; in psengine.cpp

C:\\Development\\planeshift\\src\\client\\psengine.cpp(1304): error C2259: \'vmAnimCallback\' : cannot instantiate abstract class

That is what it has been changed for the repetition of the animation while crafting (right?)

Thanks for the help,
Ary
Title:
Post by: acraig on February 16, 2005, 05:15:14 pm
I believe you need to update your cal3d library. Changes where made about 14 hours ago for this fix in cal3d cvs. I\'m not sure if you built cal3d from cvs or used the winlibs package.  If you are using the winlibs package I believe there is a newer version available from Crystal Space that should have the required updates.  If the latest winlibs still don\'t work then let me know and I will ask around.
Title:
Post by: AryHann on February 16, 2005, 05:16:32 pm
Hi,

->>> after I have been updating CS with the new cs-win libs and compiled it with the latest CVS Version

I have already got the new winlibs package.

Ary
Title:
Post by: acraig on February 16, 2005, 05:25:15 pm
Ok. Can you check in:
\\CrystalSpaceLibs\\include\\cal3d\\animcallback.h and make sure its the same as: this (http://cvs.sourceforge.net/viewcvs.py/cal3d/cal3d/src/cal3d/animcallback.h?rev=1.2&view=auto)
Title:
Post by: AryHann on February 16, 2005, 05:32:10 pm
No, it is not.

In the winlibs package those are like this:

struct CalAnimationCallback
{
    virtual void AnimationUpdate(float anim_time,CalModel *model) = 0;
    virtual void AnimationComplete(CalModel *model) = 0;
};

Thanks to res2k, I have been solving the problem doing this in psengine.cpp

 // Not using this for now.
    void AnimationUpdate(float anim_time,CalModel *model)
    {
        //printf(\"Anim Update at time %.2f.\\n\",anim_time);
    }

    // This is used to keep animations repeating.
    void AnimationComplete(CalModel *model)
    {


Ary
PS:
but the update version is the one with the userdata thing or not?
the updated one is without
ok :-)
(if you use a class anyway, no need for userdata stuff...)
Title:
Post by: acraig on February 16, 2005, 05:48:23 pm
Ok. I will have to ask res2k and Vengeance about that.  I think the updated ones should have the userdata in it.
Title:
Post by: AryHann on February 18, 2005, 05:02:00 pm
Ok, with the new cs-win32 libs everything works.

I had to go back to when the animationupdate and animationcomplete where having void * Userdata though.

Thanks for the help,
Ary

PS: I would like to signal that pawseditor project file needs to be updated. (I have done it)
Title:
Post by: ronxena on February 19, 2005, 02:39:43 pm
I still get this message:

$ jam
...patience...
...found 1505 target(s)...
...updating 6 target(s)...
C++ ./out/msysx86/debug/src/client/psengine.o
In file included from src/client/psengine.cpp:121:
src/client/pscal3dcallback.h:24:32: cal3d/animcallback.h: No such file or directory
In file included from src/client/psengine.cpp:121:

From ./configure:
checking for libcal3d... no

---

I am using MINGW, have updated to newest CS-Win32-Libs...

I did not install Cal3D, since I use the cal3dlib.a and *.h from CS-Libs.

It seems planeshift is expecting a directory /cal3d/*.h but this directory is not existing... the directory is placed in C:\\work\\CrystalSpaceLibs\\include\\cal3d after installing the CS-Libs, but how do i tell planeshift to use C:\\work\\CrystalSpaceLibs\\include?

CS itself automatically finds the correct include-directory for Cal3D (no problem compiling newest CS with changed CAL3d-headers).

BTW: is it really necessary to include Cal3d in Planeshift? Why not encapsulate in CS where all the other Cal3d functions are located?
Title:
Post by: Merlin_777 on February 19, 2005, 05:34:18 pm
Quote
Originally posted by ronxena
I still get this message:

$ jam
...patience...
...found 1505 target(s)...
...updating 6 target(s)...
C++ ./out/msysx86/debug/src/client/psengine.o
In file included from src/client/psengine.cpp:121:
src/client/pscal3dcallback.h:24:32: cal3d/animcallback.h: No such file or directory
In file included from src/client/psengine.cpp:121:

From ./configure:
checking for libcal3d... no

---

I am using MINGW, have updated to newest CS-Win32-Libs...

I did not install Cal3D, since I use the cal3dlib.a and *.h from CS-Libs.

It seems planeshift is expecting a directory /cal3d/*.h but this directory is not existing... the directory is placed in C:\\work\\CrystalSpaceLibs\\include\\cal3d after installing the CS-Libs, but how do i tell planeshift to use C:\\work\\CrystalSpaceLibs\\include?

CS itself automatically finds the correct include-directory for Cal3D (no problem compiling newest CS with changed CAL3d-headers).

BTW: is it really necessary to include Cal3d in Planeshift? Why not encapsulate in CS where all the other Cal3d functions are located?


Hi,

I\'m also having trouble compiling the lastest cvs of planeshift.

Using Visual Studio .Net
Latest CVS of CS, Cel and Cal3d, plus latest cs winlibs

Had the problem you had above, so changed my vc include directories to search c:\\crystalspace\\crystalspacelibs\\include aswell.

Now I get the following:

------ Build started: Project: apppsclient, Configuration: Debug Win32 ------

Linking...
LINK : warning LNK4098: defaultlib \'MSVCRT\' conflicts with use of other libs; use /NODEFAULTLIB:library
psengine.obj : error LNK2019: unresolved external symbol \"public: __thiscall psCal3DCallbackLoader::psCal3DCallbackLoader(struct iObjectRegistry *)\" (??0psCal3DCallbackLoader@@QAE@PAUiObjectRegistry@@@Z) referenced in function \"public: __thiscall psEngine::psEngine(struct iObjectRegistry *)\" (??0psEngine@@QAE@PAUiObjectRegistry@@@Z)
psbuild\\debug\\temp\\apppsclient\\psclient.exe : fatal error LNK1120: 1 unresolved externals

Build log was saved at \"file://c:\\CrystalSpace\\planeshift\\mk\\visualc7.1\\psbuild\\debug\\apppsclient\\BuildLog.htm\"
apppsclient - 2 error(s), 1 warning(s)


Ideas?
Title:
Post by: ronxena on February 19, 2005, 07:21:23 pm
To fake the planeshift build on MINGW I simply copied the cal3d-include-directory to the system-include directory (c:/mingw/include), not the fine way - but that worked for me... I can compile the beast again.

@merlin777: strange, that error on linking. Looks like you also must specify the path to cal3d libraries...
Before last update planeshift was never linked/compiled directly against cal3d.
Title:
Post by: Merlin_777 on February 19, 2005, 10:25:51 pm
Quote
Originally posted by ronxena
To fake the planeshift build on MINGW I simply copied the cal3d-include-directory to the system-include directory (c:/mingw/include), not the fine way - but that worked for me... I can compile the beast again.

@merlin777: strange, that error on linking. Looks like you also must specify the path to cal3d libraries...
Before last update planeshift was never linked/compiled directly against cal3d.


I have. Tried using cal3d includes/libs from just the cswinlibs package, then from just the latest cal3d cvs build. Still the same error. Driving me nuts
Title:
Post by: AryHann on February 20, 2005, 12:04:00 pm
Quote
Originally posted by ronxena
I still get this message:

$ jam
...patience...
...found 1505 target(s)...
...updating 6 target(s)...
C++ ./out/msysx86/debug/src/client/psengine.o
In file included from src/client/psengine.cpp:121:
src/client/pscal3dcallback.h:24:32: cal3d/animcallback.h: No such file or directory
In file included from src/client/psengine.cpp:121:

From ./configure:
checking for libcal3d... no

---

I am using MINGW, have updated to newest CS-Win32-Libs...


I don\'t use MINGW, but I have been trying to look up at the compile guide that there is in the docs section of PS CVS.
Quote

I did not install Cal3D, since I use the cal3dlib.a and *.h from CS-Libs.

From what I can read from that file (http://cvs.sourceforge.net/viewcvs.py/planeshift/planeshift/docs/compiling-mingw32.txt?view=markup) you should have also installed Cal3D under development.. isn\'t it?

Ary

EDIT: I saw afterwards that you solved your problem...
Title:
Post by: AryHann on February 20, 2005, 12:11:34 pm
@Merlin_777. I use MSVC 7.1 and as you see above I have been able to compile perfectly with the latest cs-win32 libs.

Are you sure you haven\'t messed up with the placement of the libs and the includes?

I would suggest to check that the things are like this :
http://cvs.sourceforge.net/viewcvs.py/planeshift/planeshift/docs/compiling-visualc.txt?view=markup

And that the libs are installed correctly in the right position.

Ary
Title:
Post by: Merlin_777 on February 20, 2005, 12:21:48 pm
Quote
Originally posted by AryHann
@Merlin_777. I use MSVC 7.1 and as you see above I have been able to compile perfectly with the latest cs-win32 libs.

Are you sure you haven\'t messed up with the placement of the libs and the includes?

I would suggest to check that the things are like this :
http://cvs.sourceforge.net/viewcvs.py/planeshift/planeshift/docs/compiling-visualc.txt?view=markup

And that the libs are installed correctly in the right position.

Ary


That\'s exactly what I did. Only difference is I have all my cs related files in C:\\CrystalSpace instead of C:\\development (so c:\\crystalspace\\cs, c:\\crystalspace\\planeshift, etc), I assume C:\\development isn\'t hardcoded in somewhere?

If it\'s clearly just a problem with something I\'m doing, I think I\'ll reinstall the libs, and if that fails remove and rebuild the whole lot.
Title:
Post by: AryHann on February 20, 2005, 12:26:49 pm
No, the development thing is not hardcoded at all!

I am just afraid that the libs didn\'t uninstall correctly and that there is some .. confusion for them!

Ary
Title:
Post by: ronxena on February 20, 2005, 02:10:05 pm
Quote
Originally posted by AryHann
From what I can read from that file (http://cvs.sourceforge.net/viewcvs.py/planeshift/planeshift/docs/compiling-mingw32.txt?view=markup) you should have also installed Cal3D under development.. isn\'t it?

Ary

EDIT: I saw afterwards that you solved your problem...


Thx for checking anyhow - the MINGW-docs are very outdated... at least you also need to update binutils to get CS linked correctly without crashing.
Title:
Post by: AryHann on February 20, 2005, 02:14:03 pm
You are welcome, even if I was not helping at all ;-D
Btw, if you think they are out of date, you can update them and send them to acraig, for example.

Ary
Title:
Post by: Merlin_777 on February 20, 2005, 09:27:43 pm
Hi, just a quick bump in case anyone else has any ideas about the link errors I\'m getting. Followed the instructions in compiling-visualc.txt to the letter.

------ Build started: Project: appeedit, Configuration: Debug Win32 ------

Linking...
eeditapp.obj : error LNK2019: unresolved external symbol \"public: __thiscall psCal3DCallbackLoader::psCal3DCallbackLoader(struct iObjectRegistry *,class EEditApp *)\" (??0psCal3DCallbackLoader@@QAE@PAUiObjectRegistry@@PAVEEditApp@@@Z) referenced in function \"public: __thiscall EEditApp::EEditApp(struct iObjectRegistry *)\" (??0EEditApp@@QAE@PAUiObjectRegistry@@@Z)
eeditinputboxmanager.obj : error LNK2019: unresolved external symbol \"public: void __thiscall EEditSelectList::Select(class csString *,class EEditInputboxManager::iSelectList *,class csVector2 const &)\" (?Select@EEditSelectList@@QAEXPAVcsString@@PAViSelectList@EEditInputboxManager@@ABVcsVector2@@@Z) referenced in function \"public: void __thiscall EEditInputboxManager::SelectList(class csString *,class EEditInputboxManager::iSelectList *)\" (?SelectList@EEditInputboxManager@@QAEXPAVcsString@@PAViSelectList@1@@Z)
eeditinputboxmanager.obj : error LNK2019: unresolved external symbol \"public: __thiscall EEditSelectList::EEditSelectList(class PawsManager *)\" (??0EEditSelectList@@QAE@PAVPawsManager@@@Z) referenced in function \"public: virtual class pawsWidget * __thiscall EEditSelectListFactory::Create(void)\" (?Create@EEditSelectListFactory@@UAEPAVpawsWidget@@XZ)
psbuild\\appeedit\\eedit.exe : fatal error LNK1120: 3 unresolved externals

Build log was saved at \"file://c:\\CrystalSpace\\planeshift\\mk\\visualc7.1\\psbuild\\debug\\appeedit\\BuildLog.htm\"
appeedit - 4 error(s), 0 warning(s)


------ Build started: Project: apppsclient, Configuration: Debug Win32 ------

Linking...
psengine.obj : error LNK2019: unresolved external symbol \"public: __thiscall psCal3DCallbackLoader::psCal3DCallbackLoader(struct iObjectRegistry *)\" (??0psCal3DCallbackLoader@@QAE@PAUiObjectRegistry@@@Z) referenced in function \"public: __thiscall psEngine::psEngine(struct iObjectRegistry *)\" (??0psEngine@@QAE@PAUiObjectRegistry@@@Z)
psbuild\\debug\\temp\\apppsclient\\psclient.exe : fatal error LNK1120: 1 unresolved externals

Build log was saved at \"file://c:\\CrystalSpace\\planeshift\\mk\\visualc7.1\\psbuild\\debug\\apppsclient\\BuildLog.htm\"
apppsclient - 2 error(s), 0 warning(s)



------ Build started: Project: apppawsedit, Configuration: Debug Win32 ------

Linking...
pawseditorapp.obj : error LNK2019: unresolved external symbol \"public: __thiscall pePawsManager::pePawsManager(struct iObjectRegistry *,char const *)\" (??0pePawsManager@@QAE@PAUiObjectRegistry@@PBD@Z) referenced in function \"public: bool __thiscall PawsEditorApp::Init(void)\" (?Init@PawsEditorApp@@QAE_NXZ)
peMenu.obj : error LNK2019: unresolved external symbol \"public: void __thiscall pePawsManager::ReloadStyles(void)\" (?ReloadStyles@pePawsManager@@QAEXXZ) referenced in function \"public: virtual bool __thiscall peMenu::OnButtonPressed(int,int,class pawsWidget *)\" (?OnButtonPressed@peMenu@@UAE_NHHPAVpawsWidget@@@Z)
psbuild\\apppawsedit\\pawseditor.exe : fatal error LNK1120: 2 unresolved externals

Build log was saved at \"file://c:\\CrystalSpace\\planeshift\\mk\\visualc7.1\\psbuild\\debug\\apppawsedit\\BuildLog.htm\"
apppawsedit - 3 error(s), 0 warning(s)
Title:
Post by: AryHann on February 20, 2005, 10:01:45 pm
For the last one, the one concerning appawsedit, you must change a bit the files in the project, because they are not update.

Both header and source files should be fix, removing all the files with capital letters, and adding all the files in the directory of - if I remember right, because I go by memory since I don\'t have the code here - /src/tools/pawseditor

Ary
PS: for the others, they could have been problems coming with the latest update of this night, I haven\'t work since friday morning with PS code.
Title:
Post by: Merlin_777 on February 20, 2005, 11:04:49 pm
Quote
Originally posted by AryHann
For the last one, the one concerning appawsedit, you must change a bit the files in the project, because they are not update.

Both header and source files should be fix, removing all the files with capital letters, and adding all the files in the directory of - if I remember right, because I go by memory since I don\'t have the code here - /src/tools/pawseditor

Ary
PS: for the others, they could have been problems coming with the latest update of this night, I haven\'t work since friday morning with PS code.


Thanks Ary, that\'s fixed the apppawsedit errors at least :)
Title:
Post by: AryHann on February 21, 2005, 11:02:48 am
Ok, as I was suspecting the modifications that occurred from friday till this morning, made
apppsclient
appeedit
not compiling correctly

Using MSVC 7.1 I  get

appeedit error LNK2019: unresolved external symbol \"public: __thiscall EEditSelectList::EEditSelectList(class PawsManager *)\" (??0EEditSelectList@@QAE@PAVPawsManager@@@Z) referenced in function \"public: virtual class pawsWidget * __thiscall EEditSelectListFactory::Create(void)\" (?Create@EEditSelectListFactory@@UAEPAVpawsWidget@@XZ)
apppsclient error LNK2019: unresolved external symbol \"public: __thiscall psCal3DCallbackLoader::psCal3DCallbackLoader(struct iObjectRegistry *)\" (??0psCal3DCallbackLoader@@QAE@PAUiObjectRegistry@@@Z) referenced in function \"public: __thiscall psEngine::psEngine(struct iObjectRegistry *)\" (??0psEngine@@QAE@PAUiObjectRegistry@@@Z)
appeedit error LNK2019: unresolved external symbol \"public: __thiscall psCal3DCallbackLoader::psCal3DCallbackLoader(struct iObjectRegistry *,class EEditApp *)\" (??0psCal3DCallbackLoader@@QAE@PAUiObjectRegistry@@PAVEEditApp@@@Z) referenced in function \"public: __thiscall EEditApp::EEditApp(struct iObjectRegistry *)\" (??0EEditApp@@QAE@PAUiObjectRegistry@@@Z)
appeedit error LNK2019: unresolved external symbol \"public: void __thiscall EEditSelectList::Select(class csString *,class EEditInputboxManager::iSelectList *,class csVector2 const &)\" (?Select@EEditSelectList@@QAEXPAVcsString@@PAViSelectList@EEditInputboxManager@@ABVcsVector2@@@Z) referenced in function \"public: void __thiscall EEditInputboxManager::SelectList(class csString *,class EEditInputboxManager::iSelectList *)\" (?SelectList@EEditInputboxManager@@QAEXPAVcsString@@PAViSelectList@1@@Z)

What did I do for solving it?
It is matter of adding files to the projects, since the project files are not updated at all.

With appeedit, both in header and source files I add:
- src/eedit/eeditselectlist
- src/eedit/pscla3dcallback

With apppsclient, both in header and source files I add:
- src/client/pscal3dcallback



Ary
Title:
Post by: Merlin_777 on February 21, 2005, 11:38:43 am
Thanks again Ary :).
Title:
Post by: Ikarsik on February 24, 2005, 12:04:24 pm
was the original problem ever solved? if not then just check that you got sprcal3d.dll built in CS.

wait not original ronxenas one
Title:
Post by: AryHann on February 24, 2005, 12:15:16 pm
Yes, I think that the original problem (mine?) was solved ;-D

Ary