C++ Question VC++ problem

Bj

Addon Developer
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,886
Reaction score
11
Points
0
Location
USA-WA
Website
www.orbiter-forum.com
I added that path to additional library directories and OLDNAMES.lib to addition Dependancies. I got this, even when I changed OLDNAMES.lib to oldnames.lib:
Code:
[SIZE=1]
ShuttlePB.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
ShuttlePB.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`scalar deleting destructor'(unsigned int)" (??_GLaunchpadItem@@UAEPAXI@Z)
ShuttlePB.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`vector deleting destructor'(unsigned int)" (??_ELaunchpadItem@@UAEPAXI@Z)
ShuttlePB.obj : error LNK2019: unresolved external symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *))" (??_M@YGXPAXIHP6EX0@Z@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`vector deleting destructor'(unsigned int)" (??_ELaunchpadItem@@UAEPAXI@Z)
ShuttlePB.obj : error LNK2001: unresolved external symbol __fltused
ShuttlePB.obj : error LNK2001: unresolved external symbol __purecall
ShuttlePB.obj : error LNK2019: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) referenced in function _ovcInit
LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12
.......Modules/ShuttlePB.dll : fatal error LNK1120: 8 unresolved externals
[/SIZE]

Nope. It is already on Multi-threaded DLL (/MD).

The above is still your error, yes? --and did you change any code whatsoever in ShuttlePB?
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Yes, the same error.

However, I did change part of the code because I was told a certain aerodynamics property was wrong, I may have made a mistake there.
Could you post a Shuttle PB source that you know works, here, so I can see if that works with my compiler?
 

Bj

Addon Developer
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,886
Reaction score
11
Points
0
Location
USA-WA
Website
www.orbiter-forum.com
Yes, the same error.

However, I did change part of the code because I was told a certain aerodynamics property was wrong, I may have made a mistake there.
Could you post a Shuttle PB source that you know works, here, so I can see if that works with my compiler?

Yep

Note, rename it to ShuttlePB.cpp (cant upload a .cpp)

Perhaps you could enter what you changed so we could see whats going on?
 

Attachments

  • Copy of ShuttlePB.txt
    8.3 KB · Views: 7

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Tried that, got this:
Code:
------ Build started: Project: ShuttlePB, Configuration: Release Win32 ------
Compiling...
ShuttlePB.cpp
c:orbiterorbitersdksamplesshuttlepbshuttlepb.cpp(45) : warning C4715: 'LiftCoeff' : not all control paths return a value
Linking...
Creating library .......Modules/ShuttlePB.lib and object .......Modules/ShuttlePB.exp
ShuttlePB.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
ShuttlePB.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`scalar deleting destructor'(unsigned int)" (??_GLaunchpadItem@@UAEPAXI@Z)
ShuttlePB.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`vector deleting destructor'(unsigned int)" (??_ELaunchpadItem@@UAEPAXI@Z)
ShuttlePB.obj : error LNK2019: unresolved external symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *))" (??_M@YGXPAXIHP6EX0@Z@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`vector deleting destructor'(unsigned int)" (??_ELaunchpadItem@@UAEPAXI@Z)
ShuttlePB.obj : error LNK2001: unresolved external symbol __fltused
ShuttlePB.obj : error LNK2001: unresolved external symbol __purecall
ShuttlePB.obj : error LNK2019: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) referenced in function _ovcInit
LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12
Orbitersdk.lib(Orbitersdk.obj) : error LNK2019: unresolved external symbol __imp__GetProcAddress@8 referenced in function _DllMain@12
.......Modules/ShuttlePB.dll : fatal error LNK1120: 9 unresolved externals
Build log was saved at "file://c:OrbiterOrbitersdksamplesShuttlePBReleaseBuildLog.htm"
ShuttlePB - 10 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Explanations?
 

Bj

Addon Developer
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,886
Reaction score
11
Points
0
Location
USA-WA
Website
www.orbiter-forum.com
Tried that, got this:
Code:
------ Build started: Project: ShuttlePB, Configuration: Release Win32 ------
Compiling...
ShuttlePB.cpp
c:orbiterorbitersdksamplesshuttlepbshuttlepb.cpp(45) : warning C4715: 'LiftCoeff' : not all control paths return a value
Linking...
Creating library .......Modules/ShuttlePB.lib and object .......Modules/ShuttlePB.exp
ShuttlePB.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
ShuttlePB.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`scalar deleting destructor'(unsigned int)" (??_GLaunchpadItem@@UAEPAXI@Z)
ShuttlePB.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`vector deleting destructor'(unsigned int)" (??_ELaunchpadItem@@UAEPAXI@Z)
ShuttlePB.obj : error LNK2019: unresolved external symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *))" (??_M@YGXPAXIHP6EX0@Z@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`vector deleting destructor'(unsigned int)" (??_ELaunchpadItem@@UAEPAXI@Z)
ShuttlePB.obj : error LNK2001: unresolved external symbol __fltused
ShuttlePB.obj : error LNK2001: unresolved external symbol __purecall
ShuttlePB.obj : error LNK2019: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) referenced in function _ovcInit
LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12
Orbitersdk.lib(Orbitersdk.obj) : error LNK2019: unresolved external symbol __imp__GetProcAddress@8 referenced in function _DllMain@12
.......Modules/ShuttlePB.dll : fatal error LNK1120: 9 unresolved externals
Build log was saved at "file://c:OrbiterOrbitersdksamplesShuttlePBReleaseBuildLog.htm"
ShuttlePB - 10 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Explanations?

Yes I think I saw that on my first compile, so check to make sure that you linked all libraries and dependency properly in the project.

also can you attach your DSW so I can follow along?
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Yes I think I saw that on my first compile, so check to make sure that you linked all libraries and dependency properly in the project.

Oh brother, I thought I did that already.
I'll have to try tomorrow, feeling tired now and wouldn't want to make a mistake.
 

Bj

Addon Developer
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,886
Reaction score
11
Points
0
Location
USA-WA
Website
www.orbiter-forum.com
Did that. Then is said something about MSVCRT.lib, so I added that to the ignore list. Then it did the same for OLDNAMES.lib. I told it to ignore this.
Then it says:
Code:
[SIZE=1]
Linking...
Creating library .......Modules/ShuttlePB.lib and object .......Modules/ShuttlePB.exp
ShuttlePB.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
ShuttlePB.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`scalar deleting destructor'(unsigned int)" (??_GLaunchpadItem@@UAEPAXI@Z)
ShuttlePB.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`vector deleting destructor'(unsigned int)" (??_ELaunchpadItem@@UAEPAXI@Z)
ShuttlePB.obj : error LNK2019: unresolved external symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *))" (??_M@YGXPAXIHP6EX0@Z@Z) referenced in function "public: virtual void * __thiscall LaunchpadItem::`vector deleting destructor'(unsigned int)" (??_ELaunchpadItem@@UAEPAXI@Z)
ShuttlePB.obj : error LNK2001: unresolved external symbol __fltused
ShuttlePB.obj : error LNK2001: unresolved external symbol __purecall
ShuttlePB.obj : error LNK2019: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) referenced in function _ovcInit
LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12
.......Modules/ShuttlePB.dll : fatal error LNK1120: 8 unresolved externals
[/SIZE]

Hang on, I saw this 20 some odd posts ago,

you shouldn't have to ignore oldnames.lib
oldnames.lib should be in (example)

C:\Program Files\Microsoft Visual Studio 9.0\VC\lib
as you have it

but did you also remove the link from additional dependency s?
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
But I seems to already have oldnames.lib :huh:

Maybe a directory is set wrong...


-----Post Added-----


I think I may have isolated the problem. I think I have set some of these wrong.
Executable files:
Code:
$(VCInstallDir)bin
$(ProgramFiles)Microsoft Platform SDKBin
$(VSInstallDir)Common7Toolsbin
$(VSInstallDir)Common7tools
$(VSInstallDir)Common7ide
$(ProgramFiles)HTML Help Workshop
$(FrameworkSDKDir)bin
$(FrameworkDir)$(FrameworkVersion)
$(VSInstallDir)
$(PATH)

Include files:
Code:
$(VCInstallDir)include
$(ProgramFiles)Microsoft Platform SDKinclude
$(FrameworkSDKDir)include

Lib files:
Code:
$(ProgramFiles)Microsoft Platform SDKlib

Could someone paste their fields, that they know work, here?

P.S: I know this may sound like an idiot question, but how exactly do I register?
 

escapetomsfate

OBSP Developer
Addon Developer
Joined
Jun 21, 2008
Messages
282
Reaction score
0
Points
0
Location
GB
Hey T.Neo. I'm having the exact same problem as you have (OLDNAMES.LIB) I've no idea how you fix it, I will post if I find out how.

I know how to register though - Go to Help Menu, Register Product, and fill in the form :)
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Hey T.Neo. I'm having the exact same problem as you have (OLDNAMES.LIB) I've no idea how you fix it, I will post if I find out how.

I know how to register though - Go to Help Menu, Register Product, and fill in the form :)

Hmm, the OLDNAMES.lib problem was fixed for me when I told the compiler to ignore it... maybe that is what is causing the current problem, but I am betting that it is those stupid directories.
 

escapetomsfate

OBSP Developer
Addon Developer
Joined
Jun 21, 2008
Messages
282
Reaction score
0
Points
0
Location
GB
Yeah, mine might be "buggered up" because I tried t remove the orbiter one without knowing which one it was. Is there any way to repair it?

Btw - It might have something to do with folder permissions, according to google.
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Yeah, mine might be "buggered up" because I tried t remove the orbiter one without knowing which one it was. Is there any way to repair it?

The directories?

I'm waiting for someone to post their's here so I can fix it.
 

escapetomsfate

OBSP Developer
Addon Developer
Joined
Jun 21, 2008
Messages
282
Reaction score
0
Points
0
Location
GB
Ok, I'm gonna try it on the vista partition, see if there's a difference. I will post the directories of a clean install for ya :D
 

escapetomsfate

OBSP Developer
Addon Developer
Joined
Jun 21, 2008
Messages
282
Reaction score
0
Points
0
Location
GB
This is going to sound retarded, but how do I copy the directories? did you copy each individually? I have it all ready for you though.
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
This is going to sound retarded, but how do I copy the directories? did you copy each individually? I have it all ready for you though.

You'll have to copy each one individually. Tedious, I know.
Other then that, remember to put them all under their respective catagories (executable files, etc), otherwise it'll get pretty confusing.
 

Rathelm

New member
Joined
Feb 2, 2009
Messages
43
Reaction score
0
Points
0
I think I've installed the correct SDK. Now I get this:

Code:
[SIZE=1].ShuttlePB.cpp(43) : error C2065: 'i' : undeclared identifier[/SIZE]

How does the forum consider you an addon developer yet you have no understanding of programming?
 

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,282
Reaction score
17
Points
0
Location
Florida
How does the forum consider you an addon developer yet you have no understanding of programming?

You can develop add-ons for Orbiter without having to write C++ modules. You can make surface bases, planetary systems, planetary textures, scenarios, modifications to existing planets, vessels using spacecraftx.dll, creating standard vessels by cfg file definitions. Go read the included documentation within the Orbiter SDK.
 

Rathelm

New member
Joined
Feb 2, 2009
Messages
43
Reaction score
0
Points
0
You can develop add-ons for Orbiter without having to write C++ modules. You can make surface bases, planetary systems, planetary textures, scenarios, modifications to existing planets, vessels using spacecraftx.dll, creating standard vessels by cfg file definitions. Go read the included documentation within the Orbiter SDK.

I guess that makes sense. It just threw me off since the first thing that came to mind was coder.
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
How does the forum consider you an addon developer yet you have no understanding of programming?

I wouldn't say the I have no understanding of programming, maybe a very simple understanding, enough to make a simple vessel.
What is frustrating me here is not that I don't understand, it is that the compiler doesn't work.

And, I do have an account at OH:
http://orbithangar.com/searchauth.php?search=t.neo
 
Top