Help a MSVC newbie... please
by Tim "Zear" Hammock · in Technical Issues · 02/01/2002 (4:15 pm) · 4 replies
OK. I've used MSVC for a while now, but I've only modified existing files. In other C++ environments I've done more, so it isn't my rusty C++ that is killing me here -- it's adding a file to the d@mn project!
I have a .cc and .h file for the class in question (new gui component for Torque). I need to add it to the Torque Lib Files project. I added it using Project|Add to project|Files... from the menu. It shows up under the gui folder in the Lib Files project. So far so good. Except...
When I compile, the files are ignored entirely. I have even done a full rebuild. Naturally, it borks at the link because of the references in Canvas.cc (IMPLEMENT_CONOBJECT, blah-de-blah).
What voodoo do I need? I just know it's gonna be something stupid... I dare someone to give me a reason to kick myself over this.
I have a .cc and .h file for the class in question (new gui component for Torque). I need to add it to the Torque Lib Files project. I added it using Project|Add to project|Files... from the menu. It shows up under the gui folder in the Lib Files project. So far so good. Except...
When I compile, the files are ignored entirely. I have even done a full rebuild. Naturally, it borks at the link because of the references in Canvas.cc (IMPLEMENT_CONOBJECT, blah-de-blah).
What voodoo do I need? I just know it's gonna be something stupid... I dare someone to give me a reason to kick myself over this.
#2
or if you are like me and lazy
Click Here to get to the same place AT NoESCape
02/02/2002 (12:06 pm)
http://www.planetquake.com/noescape/torque/Adding files to the Torque SDK.htmor if you are like me and lazy
Click Here to get to the same place AT NoESCape
#3
I had exactly the same thing. To be honest though, I dont know what fixed it. I'd cut the code and copied it into another file when I couldnt get it working. I'd tried clean rebuilds and all.
It just started working.
Dunno what to say, but I feel your pain.
Phil.
02/02/2002 (12:16 pm)
Tim,I had exactly the same thing. To be honest though, I dont know what fixed it. I'd cut the code and copied it into another file when I couldnt get it working. I'd tried clean rebuilds and all.
It just started working.
Dunno what to say, but I feel your pain.
Phil.
#4
Ok if your using visual C++ 6.0 or earlier, you should know that it does not by default recognise .cc files as being c++ files. If you therefore write a file and add it to a project as a .cc it will always be ignored.
To get around this problem, you need to edit the registry and change certain settings to add the .cc extention. Once this is done, the .cc file will compile with your project as normal.
I'll hunt around forthe exact settings and post them.....
Create a new key under HKEY_CLASSES_ROOT with the name '.cc' and value data 'cppfile'. This will associate the .cc extension with VisualStudio, so that the proper icon is shown on the desktop and a double click on the file will launch VS.
Next Goto 'HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\'.
Under 'Build System\Components\Platforms', select the key 'Win32 (x86)\Tools\32-Bit C/C++ Compiler for 80x86'
Double click on 'Input_Spec' appearing on the right pane and add ';*.cc' to the list of extensions.
The following is for proper text coloring only: Select the key '(Text) Editor\Tabs\Language Settings\C/C++'. Double click on 'FileExtensions' in the right pane. Add ';cc' to the Value Data field.
that should do it!
Penhalion
02/22/2002 (1:04 am)
Hi AllOk if your using visual C++ 6.0 or earlier, you should know that it does not by default recognise .cc files as being c++ files. If you therefore write a file and add it to a project as a .cc it will always be ignored.
To get around this problem, you need to edit the registry and change certain settings to add the .cc extention. Once this is done, the .cc file will compile with your project as normal.
I'll hunt around forthe exact settings and post them.....
Create a new key under HKEY_CLASSES_ROOT with the name '.cc' and value data 'cppfile'. This will associate the .cc extension with VisualStudio, so that the proper icon is shown on the desktop and a double click on the file will launch VS.
Next Goto 'HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\'.
Under 'Build System\Components\Platforms', select the key 'Win32 (x86)\Tools\32-Bit C/C++ Compiler for 80x86'
Double click on 'Input_Spec' appearing on the right pane and add ';*.cc' to the list of extensions.
The following is for proper text coloring only: Select the key '(Text) Editor\Tabs\Language Settings\C/C++'. Double click on 'FileExtensions' in the right pane. Add ';cc' to the Value Data field.
that should do it!
Penhalion
Torque Owner Tim "Zear" Hammock