See site in english Voir le site en francais
Website skin:
home  download  forum  link  contact

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Author Topic: Ummu SDK example not compiling  (Read 13271 times)

0 Members and 1 Guest are viewing this topic.

Offline Artlav

  • Jr. Member
  • **
  • Posts: 81
  • Karma: 0
18 August 2007, 17:15:40
Greetings.

Iam trying to use Ummu SDK in a vessel i develop, but ive runned into problems right from the start.

I was trying to compile the shuttlepb example included with the SDK, and found out that it was not compiling.
A quick inspection shows that the example appears not to meant to work at all, since there was no declarations of ummu libs,
etc in the project file.

So, ive added UMmuExample.cpp and UMmuSDK.lib to the project file and added
#include <stdio.h>
#include <math.h>
into ShuttlePB.h.
After that it compiled, but still refuses to link.

The error log is below.
Is there any other configuration needed to be done, or have i missed something?

Thank you for helping.


--------------------Configuration: ShuttlePB - Win32 Debug--------------------
Linking...
xilink6: executing 'C:\PROGRA~1\MICROS~1\VC98\Bin\link.exe'
   Creating library Debug/ShuttlePB.lib and object Debug/ShuttlePB.exp
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:library
UMmuSDK.lib(UMmuSDK.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
UMmuSDK.lib(universal_mmu.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)"
(??_V@YAXPAX@Z)
UMmuSDK.lib(UMmuSDK.obj) : error LNK2001: unresolved external symbol __ftol2_sse
UMmuSDK.lib(universal_mmu.obj) : error LNK2001: unresolved external symbol __ftol2_sse
UMmuSDK.lib(universal_mmu.obj) : error LNK2001: unresolved external symbol _sprintf_s
UMmuSDK.lib(universal_mmu.obj) : error LNK2001: unresolved external symbol _strcpy_s
Debug/ShuttlePB.dll : fatal error LNK1120: 4 unresolved externals
Error executing xilink6.exe.

ShuttlePB.dll - 7 error(s), 2 warning(s)



Offline Orbiter Fan

  • Full Member
  • ***
  • Posts: 162
  • Karma: 0
Reply #1 - 18 August 2007, 20:41:10
I believe that the UMUU was compiled with the 2005 Edition of Visual C++ and you're using the 98 version. Hopefully
Dan can confirm this.


Offline woo482

  • Sr. Member
  • ****
  • Posts: 266
  • Karma: 0
Reply #2 - 18 August 2007, 21:14:04
Is this for that big one you are makeing?


Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #3 - 18 August 2007, 22:00:53
See doc of Ummu on the second page there is the solution (get latest libs in brief)

Dan


Offline Artlav

  • Jr. Member
  • **
  • Posts: 81
  • Karma: 0
Reply #4 - 19 August 2007, 18:35:45
Yes, the only solution according to the manual is to move to VC 8, which i did now.

Actually, i was interested if it was possible somehow to use it with VC 6, but it's irrelevant for now.

Sorry for the trouble.


Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #5 - 19 August 2007, 20:23:18
I think you need at least the latest platform SDK libs (microsoft platform SDK servers 2003 R1 or R2)

Dan


Offline Tommy

  • Jr. Member
  • **
  • Posts: 32
  • Karma: 0
Reply #6 - 01 November 2007, 06:06:25
I can tell you that VC++ Express 2003 (VC 7 I think) won't compile UMMu even with PSDK Server 2003 R1. Not sure
about R2, but my attempts it seems that UMMu uses libraries that come with VC  >= 2005 , and aren't in the PSDK.
Since MS distributes those libraries as .obj, they don't seem to be compatible with the compiler version in VC 2003.

Unfortunately, VC 2005 keeps giving me tons of errors (even after following the tutorial on the Wiki). Most of those
errors have to do with the libraries included with VC 2005, so I suspect VC simply isn't installing correctly on my PC.
I'm not surprised. I had to, um, "bend" the installer somewhat since my PC doesn't like SP1, and the installer wants
SP2.



Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #7 - 01 November 2007, 06:09:13
Can you show the ton of error... ?

Dan


Offline Tommy

  • Jr. Member
  • **
  • Posts: 32
  • Karma: 0
Reply #8 - 04 November 2007, 00:53:32
Post that for you by wednesday night.  As I said, I suspect an install error since I had to get creative on getting it
installed, and don't have the XP Service Packs.


BTW, I'm almost done annotating the flight recordings for a scenario I made. It's primarily a DG-IV scenario, but since it also depends on Kulch's TX, Delta Tug, and SRC Spaceport I thought I'd ask before uploading it here.



Post Edited ( 11-04-07 00:57 )


Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
Reply #9 - 25 April 2008, 17:12:58
I am having problems  also. I get this:
------ Build started: Project: ShuttlePB, Configuration: Release Win32 ------
Compiling...
UMmuExample.cpp
ShuttlePB.cpp
Generating Code...
Linking...
   Creating library .\..\..\..\Modules/ShuttlePB.lib and object .\..\..\..\Modules/ShuttlePB.exp
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
Embedding manifest...
Build log was saved at "file://c:\orbiter\Orbitersdk\samples\NEWUMMU\Release\BuildLog.htm"
ShuttlePB - 0 error(s), 1 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========


Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
Reply #10 - 25 April 2008, 17:43:38
I still get this warning even though it compiled.  I copied to the module folder and ran the demo scenario but no change


Offline no matter

  • Legend
  • ******
  • Posts: 2826
  • Karma: 1
Reply #11 - 25 April 2008, 17:53:22
Check that you are compiling under /MT, exclude msvcrt.lib & msvcirt.lib and VC++ should compile without warnings.

Property pages:





------------

no matter.

Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
Reply #12 - 25 April 2008, 18:04:09
I have SDK (Windows Server 2003 SP1 Platform SDK and VC++ 2005 Express Edition


Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
Reply #13 - 25 April 2008, 18:40:29
I get this now:
Creating library .\..\..\..\Modules/ShuttlePB.lib and object .\..\..\..\Modules/ShuttlePB.exp
UMmuExample.obj : warning LNK4217: locally defined symbol _sprintf imported in function "public: virtual void __thiscall
ShuttlePB::clbkPostStep(double,double,double)" (?clbkPostStep@ShuttlePB@@UAEXNNN@Z)
Embedding manifest...


Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
Reply #14 - 25 April 2008, 19:14:01
Thanks.  I got it to compile with no errors.  But I copied the .dll from the release folder and put it in the module folder
and run the eva demo but don't see any changes.


Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
Reply #15 - 25 April 2008, 19:29:39
I just changed the names and number of airlocks.  Don't see any changes though.  MAybe it is in the scenario


Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
Reply #16 - 25 April 2008, 19:53:43
Ok, I changed where the eva guy came out and it did change.  So I wonder why my crew names didn't change


Offline no matter

  • Legend
  • ******
  • Posts: 2826
  • Karma: 1
Reply #17 - 26 April 2008, 15:09:43
The names in the code are used only when you generate a new ShuttlePB using the scenario editor.
If you load it with a scenario, the vessel uses the names that are written in the scenario file.

So to use the names you have in the code, you have to write correct names in the .scn file or spawn a new ShuttlePB with the scenario editor.



Message modifié ( 26-04-2008 15:16 )

------------

no matter.

Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
Reply #18 - 26 April 2008, 19:30:39
Ok thanks.   I am adding this to my vessel ML.  I think I added all the info from the example.  It compiled fine.  But not
sure how to load crew.

When I run the scenario I add crew but see nothing when I press S.
BEGIN_SHIPS
ML:ML
  STATUS Landed Moon
  POS -33.4856747 41.0833973
  HEADING 228.06
  PRPLEVEL 0:1.000
  NAVFREQ 0 0
  XPDR 0
  UMMUCREW Capt-Peter_Falcon-41-65-74
  UMMUCREW Eng-Fanny_Gorgeous-27-67-55
  UMMUCREW Doc-George_HealGood-64-70-45
  UMMUCREW -Albert_Jr_Falcon-15-70-45


Offline no matter

  • Legend
  • ******
  • Posts: 2826
  • Karma: 1
Reply #19 - 26 April 2008, 21:31:31
(I assume you followed exactly the UMMU SDK example and therefore a debug message should display ship and crew
infos when you press S. Correct me if you did something else.)

Crew is loaded correctly in your scenario, that should work fine.
If nothing comes when you press S, check if you did not forget to include S key event in your clbkConsumeBufferedKey
or if your debug messages (check SendFocusScreenMessage() / cOurMessage) are correctly set.
You should not use debug message as explained in API_Reference.pdf.

Try an EVA to verify that crew is loaded, check if a debug message is returned when you have pressed E.
If the EVA starts well but no message returned, have a look to SendFocusScreenMessage() and cOurMessage
in your code and compare it with the SDK example, something must be missing.


------------

no matter.

Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
Reply #20 - 26 April 2008, 22:27:19
Quote
no matter wrote:
(I assume you followed exactly the UMMU SDK example and therefore a debug message should display ship and crew
infos when you press S. Correct me if you did something else.)

Crew is loaded correctly in your scenario, that should work fine.
If nothing comes when you press S, check if you did not forget to include S key event in your clbkConsumeBufferedKey
or if your debug messages (check SendFocusScreenMessage() / cOurMessage) are correctly set.
You should not use debug message as explained in API_Reference.pdf.

Try an EVA to verify that crew is loaded, check if a debug message is returned when you have pressed E.
If the EVA starts well but no message returned, have a look to SendFocusScreenMessage() and cOurMessage
in your code and compare it with the SDK example, something must be missing.


I get no Screen message at all.  I am sure I copied and pasted correctly.  I copied the sections and purt them in my existing
sections.
Would you might looking at my code?
  I am going to check again.


Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
Reply #21 - 27 April 2008, 00:11:40
I redid the code and now I get this  error on screen:
Misc error with UMMU See http://orbiter.dansteph.com to install it again

I have reinstalled and the same error


Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
Reply #22 - 27 April 2008, 12:44:33
This is what I am doing/did:
Open my vessel that I want to add UMMU to.
Copied and pasted the example information into my vessels.  Changed ShuttlePB to my vessel name.  compiled.

the other thing I noticed is using the Ummu example .cpp changing ShuttlePB to my vessel.  But I ran into this:
UMmuExample.obj : error LNK2005: "public: virtual void __thiscall ML::clbkPostStep(double,double,double)"
(?clbkPostStep@ML@@UAEXNNN@Z) already defined in ML.obj
UMmuExample.obj : error LNK2005: "public: virtual int __thiscall ML::clbkConsumeBufferedKey(unsigned long,bool,char *)"
(?clbkConsumeBufferedKey@ML@@UAEHK_NPAD@Z) already defined in ML.obj
UMmuExample.obj : error LNK2005: "public: virtual void __thiscall ML::clbkVisualCreated(void *,int)"
(?clbkVisualCreated@ML@@UAEXPAXH@Z) already defined in ML.obj
   Creating library .\..\..\..\Modules/ShuttlePB.lib and object .\..\..\..\Modules/ShuttlePB.exp


So I not sure what to do.


Offline francisdrake

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Reply #23 - 01 May 2008, 10:25:04
Hi, I have installed the VC++ 2008 Express Edition and the 2008 Platform SDK.
After a little adjustments my CEV code compiles (and links),
but the provided UMMU-sample does not link.
I think I set up the directories as required, but getting linker errors like listed below.

Can somebody confirm if the library provided with the UMMU SDK works with VC++ 2008, or not?

Thanks!


**** Output error listing *****

1>------ Build started: Project: ShuttlePB, Configuration: Release Win32 ------
1>Linking...
1>   Creating library .\..\..\..\Modules/ShuttlePB.lib and object .\..\..\..\Modules/ShuttlePB.exp
1>UMmuSDK.lib(UMmuSDK.obj) : error LNK2001: unresolved external symbol "public: virtual char * __thiscall
LaunchpadItem::Name(void)" (?Name@LaunchpadItem@@UAEPADXZ)
1>UMmuSDK.lib(universal_mmu.obj) : error LNK2001: unresolved external symbol "public: virtual char * __thiscall
LaunchpadItem::Name(void)" (?Name@LaunchpadItem@@UAEPADXZ)
1>UMmuSDK.lib(UMmuSDK.obj) : error LNK2001: unresolved external symbol "public: virtual char * __thiscall
LaunchpadItem::Description(void)" (?Description@LaunchpadItem@@UAEPADXZ)
......
1>.\release/UMmuShuttlePB.dll : fatal error LNK1120: 6 unresolved externals
1>Build log was saved
at "file://c:\Spiele\Orbiter\Orbitersdk\samples\UMmu_ShuttlePB_Example\Release\BuildLog.htm"
1>ShuttlePB - 13 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #24 - 01 May 2008, 19:43:39
Quote
francisdrake a écrit:
Can somebody confirm if the library provided with the UMMU SDK works with VC++ 2008, or not?

Yes, for what I see it's more an Orbiter library problem, you use the old Orbiter SDK or something like that.
("LaunchpadItem" was introduced in Orbiter2006)

Hope it help ?

Dan