VS2005

Do you have to make the setting for each solution? Still don't know why the compiled dll isn't functioning
 
You are being rather vague here. What is your DLL? Is it a vessel? If so does it have:
a j2200.cfg file in the Config folder?
a mesh in the Meshes folder?
an entry in the scenario file you are running?

If you open the scenario editor is it listed as an available vessel type when you click "new"?
 
yes, it is a vessel. and yes to the rest. I think I got it right but now am running into errors. It is almost like the H file is not seen.
.\mobile3c.cpp(13) : error C2146: syntax error : missing ';' before identifier 'MainExternalMeshVisual' .\mobile3c.cpp(13) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int .\mobile3c.cpp(13) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int .\mobile3c.cpp(14) : error C2653: 'MOBILE3C' : is not a class or namespace name .\mobile3c.cpp(17) : error C2065: 'JohnSoundID' : undeclared identifier .\mobile3c.cpp(17) : error C3861: 'ConnectToOrbiterSoundDLL3': identifier not found .\mobile3c.cpp(17) : error C3861: 'GetHandle': identifier not found .\mobile3c.cpp(18) : error C2065: 'ENG' : undeclared identifier .\mobile3c.cpp(18) : error C2065: 'BOTHVIEW_FADED_FAR' : undeclared identifier .\mobile3c.cpp(18) : error C3861: 'RequestLoadVesselWave3': identifier not found .\mobile3c.cpp(19) : error C2065: 'START' : undeclared identifier .\mobile3c.cpp(19) : error C3861: 'RequestLoadVesselWave3': identifier not found .\mobile3c.cpp(20) : error C2065: 'CANNON' : undeclared identifier .\mobile3c.cpp(20) : error C3861: 'RequestLoadVesselWave3': identifier not found .\mobile3c.cpp(21) : error C2065: 'PLAYMAINTHRUST' : undeclared identifier .\mobile3c.cpp(21) : error C2065: 'FALSE' : undeclared identifier .\mobile3c.cpp(21) : error C3861: 'SoundOptionOnOff3': identifier not found .\mobile3c.cpp(23) : error C2065: 'PLAYHOVERTHRUST' : undeclared identifier .\mobile3c.cpp(23) : error C3861: 'SoundOptionOnOff3': identifier not found .\mobile3c.cpp(24) : error C2065: 'PLAYATTITUDETHRUST' : undeclared identifier .\mobile3c.cpp(24) : error C3861: 'SoundOptionOnOff3': identifier not found .\mobile3c.cpp(26) : error C2065: 'PLAYCOUNTDOWNWHENTAKEOFF' : undeclared identifier .\mobile3c.cpp(26) : error C3861: 'SoundOptionOnOff3': identifier not found .\mobile3c.cpp(28) : error C2065: 'PLAYCABINAIRCONDITIONING' : undeclared identifier .\mobile3c.cpp(28) : error C3861: 'SoundOptionOnOff3': identifier not found .\mobile3c.cpp(30) : error C2065: 'PLAYCABINRANDOMAMBIANCE' : undeclared identifier .\mobile3c.cpp(30) : error C3861: 'SoundOptionOnOff3': identifier not found .\mobile3c.cpp(32) : error C2065: 'PLAYRADIOATC' : undeclared identifier .\mobile3c.cpp(32) : error C3861: 'SoundOptionOnOff3': identifier not found .\mobile3c.cpp(34) : error C2065: 'DISPLAYTIMER' : undeclared identifier .\mobile3c.cpp(34) : error C3861: 'SoundOptionOnOff3': identifier not found .\mobile3c.cpp(36) : error C2653: 'MOBILE3C' : is not a class or namespace name

Code:
#define STRICT
#define ORBITER_MODULE
#define ENG                 1    
#define START                 2    
#define STOP                 3
#define CANNON                 4        
#include "orbitersdk.h"
#include "mobile3c.h"
#include "OrbiterSoundSDK3.h"
#include "stdafx.h"

VISHANDLE MainExternalMeshVisual = 0;
void MOBILE3C::clbkPostCreation (void)

{
JohnSoundID=ConnectToOrbiterSoundDLL3(GetHandle());
RequestLoadVesselWave3(JohnSoundID,ENG,"Sound\\Vessel\\Mobile\\Mobile-go.wav",BOTHVIEW_FADED_FAR);
RequestLoadVesselWave3(JohnSoundID,START,"Sound\\Vessel\\Mobile\\Mobile-start.wav",BOTHVIEW_FADED_FAR);
RequestLoadVesselWave3(JohnSoundID,CANNON,"Sound\\Vessel\\Mobile\\cannon.wav",BOTHVIEW_FADED_FAR);
SoundOptionOnOff3(JohnSoundID,PLAYMAINTHRUST,FALSE);

f_testpagem_c67167d.jpg





You are being rather vague here. What is your DLL? Is it a vessel? If so does it have:
a j2200.cfg file in the Config folder?
a mesh in the Meshes folder?
an entry in the scenario file you are running?

If you open the scenario editor is it listed as an available vessel type when you click "new"?
 
Ok I ran the UMMU cpp and get this error:
Compiling...
UMmuExample.cpp
c:\orbiter\doc\ummu_sdk\ummu_shuttlepb_example\ShuttlePB.h(19) : fatal error C1083: Cannot open include file: '..\..\include\orbitersdk.h': No such file or directory
ShuttlePB.cpp
c:\orbiter\doc\ummu_sdk\ummu_shuttlepb_example\ShuttlePb.h(19) : fatal error C1083: Cannot open include file: '..\..\include\orbitersdk.h': No such file or directory
Generating Code...
 
Instead of directly helping you, let's help you to help yourself: What does "cannot open include file" mean to you?
 
It means that it does not exist or it can not be found. It is there so I guess it can't find it. I checked the linking directories they are set as this:
C:\Program Files\Microsoft Platform SDK\lib
C:\orbiter\Orbitersdk\lib
 
Where are the include files in?
 
under c++
general additional Include Directories
C:\Program Files\Microsoft Platform SDK\Include C:\Orbiter\Orbitersdk\include
 
If you use relative paths in a CPP or header file, on which location (working directory) are they based on?
 
How can you turn that guess into knowledge?

*ELIZA mode on*
 
Make a theory, which can be fallible: For example assume, that the addressing is relative to the location of the CPP file currently processed.
 
Since it can't find the file. it maybe It maybe looking in the wrong place. I checked a can not find file is in this directory:
C:\orbiter\Orbitersdk\include
 
My theory is I have the directory set wrong. I added the path and it found orbitersdk.h but now this:
UMmuExample.cpp c:\orbiter\orbitersdk\include\OrbiterAPI.h(18) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
 
I think I got the lib ain the right spot I just need to redo the code to work. Don't know what this is about:

Compiling...
mobile2.cpp
.\mobile2.cpp(828) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
I don't see this on anyone's cpp
 
A useful tool to help with missing libraries and unresolved dependencies is the dependency walker (depends.exe). It has basically the same functionality as ldd and nm in linux (only more bloated, in typical windows style). It tells you the interdependencies between libraries and executables, and the symbols exported and imported by each. Makes finding problems a lot easier.

depends.exe comes with VS2005, but I am not sure if it is included in the free version.

Edit: of course this only helps once you have managed to compile your library. If you can't even compile because of missing libraries or header files, the compiler should tell you what is missing, so it shouldn't be too much of a mystery.
 
okay. I now get this:c:\orbiter\orbitersdk\include\OrbiterAPI.h(18) : fatal error C1083: Cannot open include file: 'windows.h'

I am just trying to compile the Ummu example
 
I fixed that include so it found the windows.h. but now I get this
Compiling...
UMmuExample.cpp
ShuttlePB.cpp
Generating Code...
Linking...
LINK : fatal error LNK1181: cannot open input file '..\..\lib\Orbiter.lib'
 
I think I have the path good. here is some more info. It looks like the path is good:
Creating temporary file "c:\orbiter\Doc\UMmu_SDK\UMmu_ShuttlePB_Example\Release\RSP00000431763248.rsp" with contents
[
/O2 /Ob1 /I "C:\orbiter\Orbitersdk\include" /I "C:\Program Files\Microsoft Platform SDK\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_VC80_UPGRADE=0x0600" /D "_WINDLL" /GF /FD /EHsc /MT /GS- /Gy /Fp".\Release/ShuttlePB.pch" /Fo".\Release/" /Fd".\Release/" /W3 /c /TP .\UMmuExample.cpp

.\ShuttlePB.cpp
]
Creating command line "cl.exe @c:\orbiter\Doc\UMmu_SDK\UMmu_ShuttlePB_Example\Release\RSP00000431763248.rsp /nologo /errorReport:prompt"
Creating temporary file "c:\orbiter\Doc\UMmu_SDK\UMmu_ShuttlePB_Example\Release\RSP00000531763248.rsp" with contents
[
/OUT:".\release/UMmuShuttlePB.dll" /INCREMENTAL:NO /LIBPATH:"C:\Program Files\Microsoft Platform SDK\Lib" /LIBPATH:"C:\orbiter\Orbitersdk\lib" /DLL /MANIFEST /MANIFESTFILE:".\Release\UMmuShuttlePB.dll.intermediate.manifest" /NODEFAULTLIB:"msvcrt.lib" /SUBSYSTEM:WINDOWS /IMPLIB:".\..\..\..\Modules/ShuttlePB.lib" /MACHINE:X86 kernel32.lib user32.lib gdi32.lib kernel32.lib

"..\..\lib\Orbiter.lib"

"..\..\lib\Orbitersdk.lib"

".\UMmuSDK.lib"

".\Release\ShuttlePB.obj"

".\Release\UMmuExample.obj"
]
Creating command line "link.exe @c:\orbiter\Doc\UMmu_SDK\UMmu_ShuttlePB_Example\Release\RSP00000531763248.rsp /NOLOGO /ERRORREPORT:PROMPT"
 
Back
Top