|
Thnak you prasad.
I am using vc++ 6.0 . Can u plz say how to create setup .
Thanks in advance.
|
|
|
|
|
|
Thank you prasad, it's very much useful for me.
|
|
|
|
|
tejaswini.g wrote: I took the exe file and placed in another system in which there is no visual studio software.when I tried to run the exe file I got the error saying that there is no MFC42D.DLL , c:\WINNT\system32;..........
This means your exe is dependent on these modules. You exe will need these dlls to run. So you will have to ship the corresponding dlls with your exe.
You can use dependency walker to find out what all dlls your exe is dependent on.
|
|
|
|
|
Thank you.
Sorry ,I don't know how to use dependency walker.
Can u say how to use dependency walker.
|
|
|
|
|
tejaswini.g wrote: Sorry ,I don't know how to use dependency walker.
Can u say how to use dependency walker.
Goto Start->Run
Type "depends" without quotes. This will open dependency walker. Now open your exe and see the listing of dlls on which your exe is dependent.
Or
Right click on your exe and select "View dependencies". You will see this if you have dependency walker installed.
|
|
|
|
|
Thanks alot.
I got it.
Thanks all of you once again.
|
|
|
|
|
|
the other guys already answered. but i see one important thing though.
don't distribute a program compiled in debug mode ! compile in release mode to deliver it...
then, for each DLL missing, find them on your computer and provide them with your exe.
|
|
|
|
|
-Go to your project
-Press ALT+ f7
-In General tab from Microsoft foundation classes Select "Use MFC in Static Library" then compile your prj again
|
|
|
|
|
the best way to have huge exes...
|
|
|
|
|
Not necessarily true:
MFC DLL contains all the MFC code, while linking the static LIB will cause only the required OBJ module to be included in the EXE.
In general the sum of the "small" exe and the DLL exceed the one of the "long" exe.
Then, it depends on how many MFC classes are directly or indirectly used and how many MFC depending exe-s are supposed to be on the target system.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
tejaswini.g wrote: How can I rectify this problem and run the exe file.
Compile in release mode. You cannot redistribute the debug version of the DLLs.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I've small piece of code,My query is , why line in bold not work ?
int main(int argc, char* argv[])
{
char *pp=new char[2];
char c='I';
char *str="test";
strcpy(pp,"dynamic");
pp[0]=c;
cout<<pp<<endl;
str[0]=c;
delete []pp;
return 0;
}
-- modified at 6:56 Tuesday 12th September, 2006
|
|
|
|
|
Because you do not know where the compiler placed the string "test".
What you did with that one was telling the compiler to give you the adress of "test". That means, the compiler has to find a location to place "test" in. And that might, following the C++-Standard, be anywhere, even locations that are not writeable from inside the code.
You should not make any assumptions on where the compiler places this. You need to assign memory to the char*, then copy "test" into the char*, in order for this to work.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
Ok.Thanks.
I was in assumption that,
char* str="test";
cout<<str[0]<<endl;
is possible , then reverse is also possible.
Thanks.
|
|
|
|
|
Because *str is a pointer to a string constant "test", and not an array of characters.
The pointer *str can be made to point to a different location, but the contents of a string constant cannot be changed (the ANSI C Standard actually says trying to modify the contents of string constant is undefined - ie. sometimes it might work, other times it may not - so you should never be writing code like this)
Writing the following would work because str would be an array of characters. The contents of the array could be changed, but str will always refer to the same storage.
chat str[] = "test";
str[0] = c;
|
|
|
|
|
|
prasad_som wrote: char *str="test";
prasad_som wrote: I've small piece of code,My query is , why line in bold not work ?
Because compiler places these type of strings in read only memory area.
|
|
|
|
|
|
prasad_som wrote: char *pp=new char[2];
...
strcpy(pp,"dynamic");
Slightly off topic ... the above code will corrupt memory. pp is a pointer to a character array that has allocated space for 2 characters. "dynamic" is longer than 2, so copying it into pp will overwrite memory you don't control.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
thanks, for correcting me. I overlooked it, to say my point.
|
|
|
|
|
If is someone who can help me with an example ( a program that works )?
Bravoone
|
|
|
|
|
NO !
reposting will never help you here. and consider reading what i previously answered to you in your last post (here[^])
|
|
|
|
|
Relax toxcct he asks and it seems that we answers not enough,but i dont know why he asks repeated same questions without any try
|
|
|
|