Skip to main content
gamedev.net
🔒 Locked

VC++ 6.0 error

Started by ironfroggy Jan 13, 2002 at 5:44 AM 10 replies 850+ views
Original Post
ironfroggy
ironfroggy
When I try to run VC, i get two dialogs: C:\Program Files\Microsoft Visual Studio\Common\MSDev98\MSDEV.EXE A device attached to the system is not functioning. and, Error Starting Program The DEVSHL.DLL file is linked to missing export MFC42DLL:6467 It''s a new computer and a nearly fresh install of VC, so if its wrecked such that I need to reinstall, that''s not a big problem. I would just like to know what the problem is. // God.c void main() { WORLD Earth; LIFE People = Earth.CreateLife(HUMAN); GiveHope(&People); delete Earth; EvilCackle(); }
(http://www.ironfroggy.com/)(http://www.ironfroggy.com/pinch)
weasalmongler
weasalmongler
It looks like you are missing or have an older version of some DLL file (from the look of it MFC42.DLL). This is a complete guess but I have had similar problems before. A reinstall may fix it, but I''m not sure. Sorry that''s all I know.
ironfroggy
ironfroggy
weird thing is, it worked fine earlier.

// God.c
void main() {
WORLD Earth;
LIFE People = Earth.CreateLife(HUMAN);
GiveHope(&People);
delete Earth;
EvilCackle();
}
(http://www.ironfroggy.com/)(http://www.ironfroggy.com/pinch)
ironfroggy
ironfroggy
because WORLD is a macro expanding to *HabitablePlanet

// God.c
void main() {
WORLD Earth;
LIFE People = Earth.CreateLife(HUMAN);
GiveHope(&People);
delete Earth;
EvilCackle();
}
(http://www.ironfroggy.com/)(http://www.ironfroggy.com/pinch)
ironfroggy
ironfroggy
#define WORLD *World

// God.c
void main() {
WORLD Earth;
LIFE People = Earth.CreateLife(HUMAN);
GiveHope(&People);
delete Earth;
EvilCackle();
}
(http://www.ironfroggy.com/)(http://www.ironfroggy.com/pinch)
BaShildy
BaShildy
Cute variable names can lead to very nasty bugs. The purpose of variable names is to make the code more readable. Come up with a convention, use it, and make sure to comment whenever needbe.

- Kevin "BaShildy" King
Game Programmer: DigiPen
www.mpogd.com
Kevin "BaShildy" KingGame Programmer: DigiPenwww.mpogd.com
Oluseyi
Oluseyi
quote:
Original post by ironfroggy
//because WORLD is a macro expanding to *HabitablePlanet
#define WORLD *World

Which would change the ensuing code to:
*World Earth;
...

Which is still illegal syntax (you probably wanted World *, not *World). Even so, you''d still need to instantiate the pointer, or you''d have an access violation (attempting to access member data of a non-existent data structure).

Of course, it''s just a .sig. But if you''re gonna defend it, do it right:
// God.c
World *Earth = new HabitablePlanet(); // HabitablePlanet is a superclass of World
Life *People = Earth->CreateLife(HUMAN); // operator-> instead of operator. because Earth is a pointer
GiveHope(People); // already a pointer; no need for address-of
delete Earth;
EvilCackle();

It still leaves the question as to whether CreateLife returns a handle/pointer to member/dependent data of Earth (ie, can people survive without a world to live on)?

Sometimes it''s fun to be trivial.

[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!
Kylotan
Kylotan
*shakes head, sighs, leaves for saner threads*
Tok
Tok
quote:
Original post by Kylotan
*shakes head, sighs, leaves for saner threads*


ROTFLMFAO
oh... god... some things you stumble in on whilst lurking...


---email--- Tok ----surf----
~The Feature Creep of the Family~
--------------------------~The Feature Creep of the Family~
greg4567
greg4567
ironfroggy-

i also got those 2 errors when i tried to run Visual C++.

to fix it, edit the shortcut to visual c++ on the start menu(right click it and select properties). click on the shortcut tab, and click on the find target button. change the "start in" directory to the directory the find target button takes you to.

this should fix the problem.

-Greg

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.