Sign in to follow this  

Can't take it anymore. Why is developing such a pain?

This topic is 3735 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Allright, that's it! I haven't been so angry since...well, I don't know! I develop games with VisualStudio for almost 6 years now, and have always had problems. So far I somehow managed to bypass them, but not this time. First of all: All the controls I use in my dialogs look ugly (Win98 style). Why don't I get cool Vista controls like every other application? Secondly: Suddenly I can't run most of my own apps anymore. I always get messages like "MSVCP90D.DLL is missing, bla bla". But of course that's not true. I found multiple instances of this DLL on my computer. Thirdly: My apps never work on other computers than mine. There's always strange messages that say: "The application configuration is incorrect...." or something like that. Fourthly: I read about CLR-DLLS, Debug DLLs, Manifest files and other strange stuff everywhere on the internet. What's all this about? Why do I need this crap? Is it asked to much that I just want to compile my code into a single .exe file that will run on every PC? Ok, I admit that I'm having a big lack of knowledge here that makes my life so hard ;-) Is there some good literature that can teach me how to deal with the problems mentioned above? All my GameDev and C++ books don't handly stuff like this.....

Share this post


Link to post
Share on other sites
When you install Visual C++ you have the option to install MSDN. Do so. Most of your questions can be answered in there. For example, MSDN for .NET 2003 comes with an article called "Deployment Walkthroughs" which contains a bunch of walkthroughs on how to deploy applications to other computers. MSDN for .NET 2005 takes it a step further and has an entire tree of documents under "Development Tools and Languages/Visual Studio/Visual C++/Deployment", which incidentally contains an article called "Understanding Dependencies of a Visual C++ Application" that talks about the C runtime DLLs.

Share this post


Link to post
Share on other sites
Quote:
Original post by VanKurt
Is it asked to much that I just want to compile my code into a single .exe file that will run on every PC?

Yes, it's too much to ask. This isn't 1968.

If you're not willing to put in the work - or to understand the technologies, and the challenges they were designed to address - then quit. There are thousands of others ready and willing to take your place.

Share this post


Link to post
Share on other sites
Quote:
I just want to compile my code into a single .exe file that will run on every PC?


Ah, such a noble dream! Jokes aside, this is a lofty goal -- better to establish parameters for the most suitable system specs to run your game on. For example, if you make sure it works on XP SP2 and Vista, for users with ps 2.0 using Direct3D9 -- then great, that's a good number of people who can play your game. But you'll have to consider stuff like 'how much memory does it chew up' because that will limit target audience -- as well as what sort of CPU you expect people to have. Finally, if we could squish everything into one file, that might be kinda nice -- but it's avoided generally for a few reasons, and here are two I can think of from the top of my head:

1) if stuff is broken up into units, more than one person can work on them at the same time. Nicely modular.

2) if you ever have to patch your game and maybe overwrite files on a user's computer...be nice if they don't have to download 500mb of textures and sounds that aren't going to change...when it is only the (perhaps) 20mb main executable that has had code tweaks. This is not a huge issue for indy and coding for fun, but you can imagine why you'd want to avoid forcing people to download redundant stuff all over again...

Finally, that annoying message about incorrect application configs -- often has something to do with side-by-side assemblies. I won't explain those (others have done so already in other places much better than I could) so I will just linky to MSDN. The actual page on deployment will give you the full explanation of how you can deploy your applications and things to be careful of when you're doing so: Deploying VC++ applications

Anyways, hth!

edit: snap, beaten!
~Shiny

Share this post


Link to post
Share on other sites
Quote:
Original post by Oluseyi
Quote:
Original post by VanKurt
Is it asked to much that I just want to compile my code into a single .exe file that will run on every PC?

Yes, it's too much to ask. This isn't 1968.

If you're not willing to put in the work - or to understand the technologies, and the challenges they were designed to address - then quit. There are thousands of others ready and willing to take your place.


Why doesn't my machine accept 8 row punched card, and I need to give it one with 9 rows?

Why is there an extra hole every 6 ticks when it should be two extra holes every 5 ticks?

Why does it suddenly take 37 days to get my execution mailed back, when it only took 34 days with the previous system?

What do you mean your computer has only 512 bytes of memory? You've bought two warehouses to build the data center?

Different era, same problems.

Quote:
Thirdly: My apps never work on other computers than mine. There's always strange messages that say: "The application configuration is incorrect...." or something like that.


Put the string you put in quotes into google.

Quote:
Secondly: Suddenly I can't run most of my own apps anymore. I always get messages like "MSVCP90D.DLL is missing, bla bla". But of course that's not true. I found multiple instances of this DLL on my computer.


Put "DLL search path" into google.

Quote:
Fourthly: I read about CLR-DLLS, Debug DLLs, Manifest files and other strange stuff everywhere on the internet. What's all this about? Why do I need this crap?


Look up MVS help on the compiler settings.

Quote:
Is it asked to much that I just want to compile my code into a single .exe file that will run on every PC?


Yes. Of course, MS wanted to fix that, but they got called evil, and sued.

Share this post


Link to post
Share on other sites
In my experience, MSVC++ has a lot of problems. It's probably easiest to use a standard compiler (gcc), and forgo MFC etc. (You can write your own version of MFC with the functionality for a game in 30 minutes) This would solve your .DLL problem, because your only using those .DLLs you explicitly specify. I use Dev-C++ and gcc with Directx 9.0c and have absolutely no problems with portability or .DLLs.

Share this post


Link to post
Share on other sites
Quote:
Original post by gamer202
In my experience, MSVC++ has a lot of problems.


VS6 did. VS2005 is pretty commonly regarded as an excellent IDE / compiler.

There are hoops to jump for compiling a distributable .exe with the Express edition but it's all stuff that's clearly spelled out in the online FAQs.

-me

Share this post


Link to post
Share on other sites
Quote:

Is it asked to much that I just want to compile my code into a single .exe file that will run on every PC?

Personally, I find that the Eclipse IDE combined with GCC G++ allows me to use C++ Std Library-compliant code on just about any operating system I need. I presently use OSX, WinXP (trying Vista soon) and Linux (32 and 64 bit architectures). Linux 64 bit is my main development platform. IMHO, it is possible to write once and use on multiple platforms in C++, once you get the gist of it. You just have to stick with it and keep grinding. You'll get there.

To me, the biggest problem with C++ is that there are so many different ways to solve a problem, whereas finding the optimal way is an art combined with experience. That's another advantage in learning to use the Std Library early on, it helps you to think about problems in more optimal ways.

--random

Share this post


Link to post
Share on other sites
Quote:
Secondly: Suddenly I can't run most of my own apps anymore. I always get messages like "MSVCP90D.DLL is missing, bla bla". But of course that's not true. I found multiple instances of this DLL on my computer.

It isn't required to be SOMEWHERE, but in the path you told the linker at compile time ( or $WINDIR/system32 for windows xp if you didn't pass it )

Quote:

Thirdly: My apps never work on other computers than mine. There's always strange messages that say: "The application configuration is incorrect...." or something like that.

Let's try less agressive and architecture-specific optimization flags then

Quote:

Fourthly: I read about CLR-DLLS, Debug DLLs, Manifest files and other strange stuff everywhere on the internet. What's all this about? Why do I need this crap?

Debug DLLs have debug statements. How have you been developing software the last 6 years? Never debugged?

Quote:

Is it asked to much that I just want to compile my code into a single .exe file that will run on every PC?

gcc `cat project_files.txt` -o main. Other than that... java LOL?

Quote:

Ok, I admit that I'm having a big lack of knowledge here that makes my life so hard ;-)
Is there some good literature that can teach me how to deal with the problems mentioned above? All my GameDev and C++ books don't handly stuff like this.....

MSDN like others allready said.

Share this post


Link to post
Share on other sites
Thank's for sharing your thoughts with me! :-)

OK, at first I tried to solve the

"Suddenly I can't run most of my own apps anymore. I always get messages like "MSVCP90D.DLL is missing, bla bla". But of course that's not true. I found multiple instances of this DLL on my computer."

Problem. So I compiled my game in RELEASE mode, and set the Runtime-Library compiler option to "Multi-threaded DLL (/MD)". Then I tried to run it. The error is still the same.
Then I opened the exe with DependancyWalker, which immediately complained the two files MSVCP90D.DLL and MSVCR90D.DLL were missing.
What I don't understand: I have VS installed, so both libraries should be there (some other apps work fine!).
But more important: doesn't the D at the end mean these are debug DLLs? Why is my game linked to debug DLLs if I compile it in release mode?


So I need your help, almighty gurus! :-D

Share this post


Link to post
Share on other sites
Quote:
Original post by VanKurt
Then I opened the exe with DependancyWalker, which immediately complained the two files MSVCP90D.DLL and MSVCR90D.DLL were missing.


Copy both of those from wherever you found them to the C:\WINDOWS\SYSTEM32 folder. Then, any application should be able to find them.

Share this post


Link to post
Share on other sites
Quote:
Original post by VanKurt
Even if this worked - why does the game need those DLLs in the first place? I thought those were debug DLLs?

These are C/C++ runtime DLLs. The .exe you are running is probably a debug build, therefor the debug DLLs are used. If you were to run a release build the release DLLs would be needed (same filename without the D at the end IIRC).

I would suggest that you statically link to the C/C++ runtime. This way you don't need those DLLs at all and more importantly don't need distibute them with you application.

Project->Properties->C/C++->Code Generation->Runtime Library
Set this to "Multi-threaded Debug (/MTd)" for the debug config and to "Multi-threaded (/MT)" for the release config.

Share this post


Link to post
Share on other sites
Quote:
Original post by Oluseyi
Quote:
Original post by VanKurt
Is it asked to much that I just want to compile my code into a single .exe file that will run on every PC?

Yes, it's too much to ask. This isn't 1968.


Good, because PCs didn't exist back in 1968. We didn't even have portable electronic calculators until the mid to late 1970s and those were LED based and the size of an unabridged dictionary.

ADDENDUM: Unless you're talking about the Altair.

ADDENDUM: Not even the Altair 8800, because that didn't come out until 1974-75.

Share this post


Link to post
Share on other sites
Quote:
Original post by VanKurt
Is it asked to much that I just want to compile my code into a single .exe file that will run on every PC?


I've found Borland's Delphi to be a great tool that allows you to do this. I haven't used it since version 6, but if it still works the way it did then, you could easily compile most applications into a single exe and not have to worry about distributing run times, etc.

Share this post


Link to post
Share on other sites
Quote:
Original post by VanKurt
Is it asked to much that I just want to compile my code into a single .exe file that will run on every PC?

Nope, just use a write-once-run-everywhere language like Java, plus cross-platform libraries (or it won't be w-o-r-e... it probably won't quite be anyways, but we're getting there).

For those who think that programming being hard is a good thing, you have my condolences. Programming is all about preemptive laziness.

Share this post


Link to post
Share on other sites
"These are C/C++ runtime DLLs. The .exe you are running is probably a debug build, therefor the debug DLLs are used. If you were to run a release build the release DLLs would be needed (same filename without the D at the end IIRC)."

As I said, I did a release build. That's why I'm so confused these D-DLLs are needed ;-)

Share this post


Link to post
Share on other sites
Are you sure? You didn't mess with any of the project settings ever that might have accidentally changed things?

Remember "Debug" and "Release" are just the names of default configurations generated by VS. You can change the actual options -- for example, you can change the settings in the Release configuration to depend on debug DLLs. Go back and sanity-check all your settings.

Then make sure you're not depending on external libraries that themselves might have been compiled to use the debug DLLs, et cetera. As mentioned, depends.exe can help you identify this.

Share this post


Link to post
Share on other sites

This topic is 3735 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this