C++ Question VC++ problem

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.
 
You should not be compiling MFC. At least, i don't think so...
 
It asks for when I try to compile the shuttleA
 
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).
 
Another question, how do you get the compiler to save the property changes ?
 
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.
 
I ttried save all, it does not save the changes. I have to add all the property changes every time I open it.
 
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]
 
Any explanation to the above problem?
 
This stupid compiler!
:compbash2:

Wish the thing would just work!
 
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.
 
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?
 
No your right, just checking
 
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?
 
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 :)
 
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. :(
 
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
 
Nope. It is already on Multi-threaded DLL (/MD).
 
Back
Top