|
Make sure you're not trying to run the debug version of the program on the other program. Use the release version.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
|
I assume you mean you have tried the release version.
What was the error you got?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
leenmie wrote: When I run it on other computer, error like above too
The problem you’re experiencing is a dependency issue.
If you’re running W2k then you can open the exe with dependency walker to figure out which dlls you need to include with the exe (distribute).
If the computer is a Windows XP system, there is a new paradigm for dealing with DLLs. It’s called SXS (side by side) DLL support. In other words it allows the target computer to run multiple versions of the same DLL. This was done to eliminate DLL hell issues.
What this means to you is, your app will now need an installer to add the new DLLs to the system.
Redistributing Visual C++ Files[^]
http://msdn2.microsoft.com/en-us/library/ms235285.aspx[^]
http://blogs.msdn.com/nikolad/archive/2005/09/02/460368.aspx[^]
-- modified at 2:23 Monday 13th February, 2006
|
|
|
|
|
|
I am a beginer with VC++. I write a class in VC++ but I don't know where is the program started (as main() in C language). Can you help me. Thank you.
|
|
|
|
|
main() -> console
_tmain() -> UNICODE ? wmain : main
WinMain()-> win32 Application
wmain() -> UNICODE main()
|
|
|
|
|
I think you should learn more about C++. If you write a win32 app., it's WinMain(). Good luck.
|
|
|
|
|
Hi Nguyen
How r you?
Well you want to code a win32 app. I remember how difficult it was in the beginning to understand everything win32 offers. it was way back to 1 year that i started out my win32 journey with a simple tutorial at http://www.softlookup.com/tutorial/vc++/vcu08fi.asp[^]
well here is a prototype of winmain
<br />
int WINAPI WinMain(HINSTANCE d1, HINSTANCE d2, LPSTR d3, int d4)<br />
<br />
{<br />
code.....<br />
return 0;<br />
}
۞It is on our failures that we base a new and different and better success.
|
|
|
|
|
I guarantee that you have no idea yet! But I also guarantee that you are trying to head in the right direction. Unless you think MFC is pure C++, in which case you need to study both.
INTP
Every thing is relative...
|
|
|
|
|
hi Shaw
I know MFC is simply a wrapper for WIN32 API. if i want to code win32 app. i have to learn pure win32 coding without any choice.
۞It is on our failures that we base a new and different and better success.
|
|
|
|
|
The main function (routine/method/what ever...) is the entery point in both C and C++. It is when we need to run it in an eniroment like Windows, Lenux, or Apple (Macintosh) that we have problems.
Until you understand the basics, stick to console programes. That is programes that require a main() routine.
INTP
Every thing is relative...
|
|
|
|
|
Nguyen Thi Thanh wrote: Can you help me. Thank you.
this section of codeproject is full of beginner tutorial.. i believe it will help... just follow this link
http://www.codeproject.com/cpp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
ex.
z:\windows\explorer.exe
|
|
|
|
|
hi "HOW"
well to me path is whole location of a file
eg. z:\windows\explorer.exe
Directory is a folder and we store files in folder.
eg. windows is a folder
filename is the name of a file.
eg. explorer.exe is a binary file
To access a file we must have complete file path
good luck!
۞It is on our failures that we base a new and different and better success.
|
|
|
|
|
tx, LivingThoughts
z:\windows\explorer.exe == path?
z:\windows == path?
z:\windows == ?
directory == folder ?
z:\windows == directory ?
z:\windows == folder ?
|
|
|
|
|
HOW WHAT wrote: z:\windows\explorer.exe
Let me break every thing to simplify every thing for you
z: = PATH and Drive Name
Z:\Windows :- Path and Directory
Z:\Windows\explorer.exe :- path and Filename
Path can be any thing.. but it depends on what you are calling
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hello everyone!
Alright... Remember the questions about binary files I've been asking lately? Well, thanks to you, my program worked!
I converted the program to C (not C++), no problem... I added a file header at the beginning of file, no problem... but if I try to compile the program with the Digital Mars compiler, with the -mtd option (DOS .COM file), and I make a file with that program, the file comes out 10 bytes less than the Windows version! Therefore, the programs can't open each other's files! Anyone know of a solution? Thanks!
PS: In case you need the code to help me out, here it is: (233 lines)
http://sulfurmidis.com/peopledb.htm[^]
Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
-- modified at 18:21 Sunday 12th February, 2006
|
|
|
|
|
Have you compared the 2 output files? If it's only 10 bytes, you should be able to find the differences easily
|
|
|
|
|
Well... based on the error messages I get, the headers are messed up... Why isn't there a native DOS version of GCC?! (One that doesn't need a cwdpmi server or whatever it's called...)
Anyways... I'll see what I'll do. Thanks!
Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
|
|
|
|
|
int s are generally 16-bits in DOS, but 32-bits in Windows. If you want 32-bit, use a long . If you want 16-bits, use a short - these are meant to be guaranteed between different compilers.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
|
|
The C++ standard states that a long is 4 bytes and a short is 2 bytes. An int is defined by the size of the standard machine word for the architecture you're compiling for - 32 bits for Windows and 16-bits for DOS (unless you're using a 32-bit DOS extender such as DOS4GW).
Note that the size of a byte is not defined (other than to say it must be at least 8 bits), so a short may not actually be 16 bits, although I've never seen a situation where it is different.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|