C++ Question VC++ problem

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,907
Reaction score
205
Points
138
Location
Cape
I get

fatal error RC1015: cannot open include file 'afxres.h'

I added the MFC folder from the one in 2003 toolkit and added the include file in the properties.
 

Hielor

Defender of Truth
Donator
Beta Tester
Joined
May 30, 2008
Messages
5,580
Reaction score
2
Points
0
You should not be compiling MFC. At least, i don't think so...
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,907
Reaction score
205
Points
138
Location
Cape
It asks for when I try to compile the shuttleA
 

tblaxland

O-F Administrator
Administrator
Addon Developer
Webmaster
Joined
Jan 1, 2008
Messages
7,320
Reaction score
25
Points
113
Location
Sydney, Australia
You should not be compiling MFC. At least, i don't think so...
It asks for when I try to compile the shuttleA
It is in the resource script (ShuttleA.rc) and has probably been put there automatically, even tthough you aren't using MFC. You should be safe to open the script (in Notepad) and replace the two instances of afxres.h with winres.h (works for me).
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,907
Reaction score
205
Points
138
Location
Cape
Another question, how do you get the compiler to save the property changes ?
 

tblaxland

O-F Administrator
Administrator
Addon Developer
Webmaster
Joined
Jan 1, 2008
Messages
7,320
Reaction score
25
Points
113
Location
Sydney, Australia
Another question, how do you get the compiler to save the property changes ?
AFAIK, there is no option to save just the project properties. File|Save All (or Save All on the toolbar) will save everything in your project including the project properties. Also, if you have changed any project properties but not yet saved them by pressing Save All, VC++ should ask you if you want to save them before exiting.
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,907
Reaction score
205
Points
138
Location
Cape
I ttried save all, it does not save the changes. I have to add all the property changes every time I open it.
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Try adding that path to "Additional Library Directories" and OLDNAMES.lib to "Additional Dependencies"

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]
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Any explanation to the above problem?
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
This stupid compiler!
:compbash2:

Wish the thing would just work!
 

tl8

Addon Developer
Addon Developer
Tutorial Publisher
Joined
Oct 16, 2007
Messages
3,645
Reaction score
25
Points
88
Location
Gold Coast QLD
Any explanation to the above problem?

Hi T.Neo

I have had similar problems in setting up my complier

Have you de-activated some of the dependencies?

A quick google search should help.
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Have you de-activated some of the dependencies?

What do you mean by deactivating dependancies?

I've put several .lib files into the "ignore specific library" section, though.

In short, what do I have to google?
 

tl8

Addon Developer
Addon Developer
Tutorial Publisher
Joined
Oct 16, 2007
Messages
3,645
Reaction score
25
Points
88
Location
Gold Coast QLD
No your right, just checking
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
I still cannot get this to work.
Does anyone have any suggestions?

P.S: It also gives me a nag screen saying I have X days left to register to ensure uninteruppted use of this software. How do I fix this?
 

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
P.S: It also gives me a nag screen saying I have X days left to register to ensure uninteruppted use of this software. How do I fix this?

Register ;)

If its Microsoft Visual C++ 2005/08 express, then its free :)
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Register ;)

If its Microsoft Visual C++ 2005/08 express, then its free :)


That still doesn't fix the fact that I can't compile anything. :(
 

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
That still doesn't fix the fact that I can't compile anything. :(


I tried compiling shuttlePB and got this error, (assuming you have all the dependency s properly linked

Code:
1>------ Build started: Project: ShuttlePB, Configuration: Debug Win32 ------
1>Compiling...
1>ShuttlePB.cpp
1>c:program filesorbiter060929_base_oldorbitersdksamplesshuttlepbshuttlepb.cpp(47) : warning C4715: 'LiftCoeff' : not all control paths return a value
1>Linking...
1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>   Creating library .Debug/ShuttlePB.lib and object .Debug/ShuttlePB.exp
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>.Debug/ShuttlePB.dll : fatal error LNK1169: one or more multiply defined symbols found
Not sure if that's what you have but this is how you fix it (for the above error at least)

Go to the ShuttlePB project properties page
go to Code Generation tab like;
Configuration Properties -> C/C++ -> CodeGeneration

then go to the RUNTIME LIBRARY and switch it from whatever you have
(I had it Multi-threaded debug(/Mtd)) to Multi-threaded DLL (/MD)

Click apply and save, and that should fix it
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Nope. It is already on Multi-threaded DLL (/MD).
 
Top