OHM Gravity Controller MFD

jangofett287

Heat shield 'tester'
Joined
Oct 14, 2010
Messages
1,150
Reaction score
13
Points
53
:hmm:, being able to get rid of any force we like, :hmm:.

Do MFDs have to be compiled using the visual c++ 2008 libraries or can I use the 2010 version?

---------- Post added at 05:00 PM ---------- Previous post was at 04:01 PM ----------

OK, that went badly.
I present my Build log:
Code:
1>------ Build started: Project: GodMFD, Configuration: Debug Win32 ------
1>     Creating library C:\Users\Thomas Casson\Documents\Visual Studio 2010\Projects\GodMFD\Debug\GodMFD.lib and object C:\Users\Thomas Casson\Documents\Visual Studio 2010\Projects\GodMFD\Debug\GodMFD.exp
1>GodMFD.obj : error LNK2019: unresolved external symbol "void __cdecl dummy(void)" (?dummy@@YAXXZ) referenced in function "void __cdecl calldummy(void)" (?calldummy@@YAXXZ)
1>GodMFD.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl oapiRegisterMFDMode(struct MFDMODESPECEX &)" (__imp_?oapiRegisterMFDMode@@YAHAAUMFDMODESPECEX@@@Z) referenced in function _InitModule
1>GodMFD.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) bool __cdecl oapiUnregisterMFDMode(int)" (__imp_?oapiUnregisterMFDMode@@YA_NH@Z) referenced in function _ExitModule
1>GodMFD.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall MFD2::~MFD2(void)" (__imp_??1MFD2@@UAE@XZ) referenced in function __unwindfunclet$??0GodMFD@@QAE@KKPAVVESSEL@@@Z$0
1>GodMFD.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class oapi::Font * __cdecl oapiCreateFont(int,bool,char const *,enum FontStyle,int)" (__imp_?oapiCreateFont@@YAPAVFont@oapi@@H_NPBDW4FontStyle@@H@Z) referenced in function "public: __thiscall GodMFD::GodMFD(unsigned long,unsigned long,class VESSEL *)" (??0GodMFD@@QAE@KKPAVVESSEL@@@Z)
1>GodMFD.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MFD2::MFD2(unsigned long,unsigned long,class VESSEL *)" (__imp_??0MFD2@@QAE@KKPAVVESSEL@@@Z) referenced in function "public: __thiscall GodMFD::GodMFD(unsigned long,unsigned long,class VESSEL *)" (??0GodMFD@@QAE@KKPAVVESSEL@@@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall MFD2::Update(struct HDC__ *)" (?Update@MFD2@@UAEXPAUHDC__@@@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall MFD::ConsumeKeyBuffered(unsigned long)" (?ConsumeKeyBuffered@MFD@@UAE_NK@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall MFD::ConsumeKeyImmediate(char *)" (?ConsumeKeyImmediate@MFD@@UAE_NPAD@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall MFD::ConsumeButton(int,int)" (?ConsumeButton@MFD@@UAE_NHH@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall MFD::WriteStatus(void *)const " (?WriteStatus@MFD@@UBEXPAX@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall MFD::ReadStatus(void *)" (?ReadStatus@MFD@@UAEXPAX@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall MFD::StoreStatus(void)const " (?StoreStatus@MFD@@UBEXXZ)
1>GodMFD.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall MFD::RecallStatus(void)" (?RecallStatus@MFD@@UAEXXZ)
1>GodMFD.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl oapiReleaseFont(class oapi::Font *)" (__imp_?oapiReleaseFont@@YAXPAVFont@oapi@@@Z) referenced in function "public: virtual __thiscall GodMFD::~GodMFD(void)" (??1GodMFD@@UAE@XZ)
1>GodMFD.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall MFD2::Title(class oapi::Sketchpad *,char const *)const " (__imp_?Title@MFD2@@QBEXPAVSketchpad@oapi@@PBD@Z) referenced in function "public: virtual bool __thiscall GodMFD::Update(class oapi::Sketchpad *)" (?Update@GodMFD@@UAE_NPAVSketchpad@oapi@@@Z)
1>C:\Users\Thomas Casson\Documents\Visual Studio 2010\Projects\GodMFD\Debug\GodMFD.dll : fatal error LNK1120: 16 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Any Ideas? The code doesn't do anything yet. All I've done is copy the MFD template and go through the header and source changing all occurences of MFDTemplate to GodMFD. If I can get over this and starts coding I'll start a proper dev thread.
 

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
Any Ideas? The code doesn't do anything yet. All I've done is copy the MFD template and go through the header and source changing all occurences of MFDTemplate to GodMFD. If I can get over this and starts coding I'll start a proper dev thread.
Have you used a converted sample project for it?

If so, all you need is to change the path to Orbiter in Property Manager (if you can't find it you need to enable Expert Settings first in Tools -> Settings), in either Debug or Release configuration, "Orbiter plugin -> orbiter_vs2005 -> orbiterroot" properties, user macros, OrbiterDir macro (should point to Orbiter root directory).

If you don't use converted project then add path to Orbitersdk/Lib to additional library paths in Linker, and orbiter.lib and orbitersdk.lib to additional dependencies.
 

jangofett287

Heat shield 'tester'
Joined
Oct 14, 2010
Messages
1,150
Reaction score
13
Points
53
Right. I've done some digging. I'm using Microsoft Visual C++ 2010. The OrbiterAPI.h file says I may need to modify some values to get it to work. Any ideas?

btw: new log file:
Code:
1>------ Build started: Project: GodMFD, Configuration: Release Win32 ------
1>     Creating library C:\Users\Thomas Casson\Documents\Visual Studio 2010\Projects\GodMFD\Release\GodMFD.lib and object C:\Users\Thomas Casson\Documents\Visual Studio 2010\Projects\GodMFD\Release\GodMFD.exp
1>GodMFD.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl oapiReleaseFont(class oapi::Font *)" (__imp_?oapiReleaseFont@@YAXPAVFont@oapi@@@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class oapi::Font * __cdecl oapiCreateFont(int,bool,char const *,enum FontStyle,int)" (__imp_?oapiCreateFont@@YAPAVFont@oapi@@H_NPBDW4FontStyle@@H@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) int __cdecl oapiRegisterMFDMode(struct MFDMODESPECEX &)" (__imp_?oapiRegisterMFDMode@@YAHAAUMFDMODESPECEX@@@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) bool __cdecl oapiUnregisterMFDMode(int)" (__imp_?oapiUnregisterMFDMode@@YA_NH@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall MFD2::Title(class oapi::Sketchpad *,char const *)const " (__imp_?Title@MFD2@@QBEXPAVSketchpad@oapi@@PBD@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "void __cdecl dummy(void)" (?dummy@@YAXXZ)
1>GodMFD.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall MFD2::Update(struct HDC__ *)" (__imp_?Update@MFD2@@UAEXPAUHDC__@@@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall MFD2::~MFD2(void)" (__imp_??1MFD2@@UAE@XZ)
1>GodMFD.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall MFD2::MFD2(unsigned long,unsigned long,class VESSEL *)" (__imp_??0MFD2@@QAE@KKPAVVESSEL@@@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall MFD::RecallStatus(void)" (__imp_?RecallStatus@MFD@@UAEXXZ)
1>GodMFD.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall MFD::StoreStatus(void)const " (__imp_?StoreStatus@MFD@@UBEXXZ)
1>GodMFD.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall MFD::ReadStatus(void *)" (__imp_?ReadStatus@MFD@@UAEXPAX@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall MFD::WriteStatus(void *)const " (__imp_?WriteStatus@MFD@@UBEXPAX@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __thiscall MFD::ConsumeButton(int,int)" (__imp_?ConsumeButton@MFD@@UAE_NHH@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __thiscall MFD::ConsumeKeyImmediate(char *)" (__imp_?ConsumeKeyImmediate@MFD@@UAE_NPAD@Z)
1>GodMFD.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __thiscall MFD::ConsumeKeyBuffered(unsigned long)" (__imp_?ConsumeKeyBuffered@MFD@@UAE_NK@Z)
1>C:\Users\Thomas Casson\Documents\Visual Studio 2010\Projects\GodMFD\Release\GodMFD.dll : fatal error LNK1120: 16 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
Right. I've done some digging. I'm using Microsoft Visual C++ 2010. The OrbiterAPI.h file says I may need to modify some values to get it to work. Any ideas?
I'm successfully compiling Orbiter projects with VC++ 2010 without making any changes to OrbiterSDK header files.

btw: new log file
The contents of log are the same as before.
 

jangofett287

Heat shield 'tester'
Joined
Oct 14, 2010
Messages
1,150
Reaction score
13
Points
53
I've tryed everything I can think of. If I think of something else I will attempt to do what I set out to do, but for now I must say that I have done all I can, thank you orb for your help.
 

wizard1073

New member
Joined
Mar 19, 2011
Messages
5
Reaction score
0
Points
0
re: Visual C++ 2010

@jangofett287: I started using VC++ 2010 Express Edition and ran into the same problems. I had no problems using VC++ 2008 EE. I am trying to get my script-based MFDs into DLL modules, and had to choose the second route. Unfortunately, the scripts are sufficiently different from VC++ that I have a tall learning curve.

@Izack: Nice reference! I didn't think anyone was crazy enough to do advocate such a thing.

@Keatah: The README for each MFD describes how similar the results are, but goes into a little detail on the tradeoffs. The Higgs Field Controller does not affect orbital paths. The Gravity Controller does. The GCdoes not alter the effectiveness of your engines, whereas the HFC does.

---------- Post added at 03:30 AM ---------- Previous post was at 03:04 AM ----------

It is a testament to the design of Orbiter that it can accomodate both science and science fiction. Perhaps nulling gravity is a bit much for the science side of the house, but science usually catches up to science fiction over time.

I like to think that we get to test futuristic ideas more clearly within Orbiter than within the pages of a sci-fi novel, and with more realism than a sci-fi movie usually adheres.

Orbiter is filled with science and science fiction. (Just look at our Delta Gliders!) I certainly intend to use it for both, and not always at the same time.

I salute both the realists and the dreamers. Together, we attain the future.
 
Last edited:
Top