Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / How to make my programe into an exe file?

Author
Message
Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 18th Jul 2009 16:40
Hi, I want my programs to be launched from my desktop
How do i make it into an .exe file so i can launch it from my desktop and send it to my friends who don't have the Microsoft Visual studio?
Slayer93
20
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 18th Jul 2009 17:29
When you compile your project it automatically makes an exe, just look for it in the Debug or Release folder (depending on what you compiled it in).

Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 18th Jul 2009 18:02
Yea but i sent it to my friend ... i sent him the whole debug folder, including the images needed for the sprites and he couldn't run it, computer reported a missing file... i could run it tho.
What was the problem?
Slayer93
20
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 18th Jul 2009 18:07
What's missing?

You should also make sure the images are still correctly relative to the exe otherwise it can't find them.

Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 18th Jul 2009 18:52
Nothing is missing for me, but when i send the zip to my friend his computer sais a file is missing. Well anyway, what if i wanted to upload the program to the internet for other people to use. I can't just upload the debug folder, right?
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 18th Jul 2009 19:22
First of all you want to compile a program that you distribute in Release mode. Debug mode throws in loads of extra code so you can work your way through problems during development.

Second, from the Release folder you should only need to send the .exe file and any media/support files that go along with the program. But they have to be located relative to the folder the exe is being called from. When you're developing your program the media files are relative to the solutions folder. With a discreet executable the media files need to be in the same relative position.

Third, anyone running the program must have the proper version of Direct X either installed on their workstation or available as the redistributable DLL.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 18th Jul 2009 21:18
compile a program? Debug mode? (i get everything else )

ty
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 18th Jul 2009 21:40
When you press F7 you're compiling/building the program from its component parts into a single .exe. The default mode for your compile is Debug, which means that the compiler creates a lot of support files so that you have the ability to step through your program to find the source of problems. It allows for breakpoints so that you can stop a program at a certain point then work your way through it. There's a lot of bloat in a Debug compile, including external files to support the process. Debug mode will also tend to run slower than a release mode depending on a number of things.

Release mode is exact what it says. It's the mode to compile in when you're ready to release your program to someone else. It drops the debugging information and thus a lot of the bloat and may speed up the running program a bit. The .exe will be found in the Release folder, which parallels the Debug folder. You probably won't see it until you compile once in Release mode.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 18th Jul 2009 22:15
Woah... i never knew all that. Ok can you teach me how to compile in release mode? I already figured out how to use breakpoints... but I never use them since I only do smaller projects for now. So if i compile it in release mode.. it will put a different exe file in my debug folder or what? Most of all i want to know where that release mode exe file is so i can send it to somebody. Please explain it
like you're explaining it to a total noob. Cause i know nothing...

Ty!
Slayer93
20
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 19th Jul 2009 03:23
To compile in release mode find the dropdown box that says debug, on top near the Run button(little green arrow) and switch it to release, easy as that.

When you compile in release it will make a new folder called release next to your debug folder.

Brick Break
User Banned
Posted: 19th Jul 2009 06:25
Wait, woah, hold on here! There's a redistributable DirectX DLL? You mean if I just include that with my programs it'll work?

WINNER list:
Latch, Lee Bamber, TDK
Thanks for the help!
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 19th Jul 2009 07:01
It has to be the one you linked into your program, August 2007. When you install that into your system you not only have that particular version available to you, you also install the library necessary to link the routines to your program. That's why it should always work for you on your development machine. But if other people don't have it installed on their PCs they'll need to have the DLL either in the same directory as the executable or some other location where the system will automatically look for it.

I think it would be D3DX9_35.DLL .

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 19th Jul 2009 11:10
Thank you so much!!
Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 20th Jul 2009 12:52 Edited at: 20th Jul 2009 12:54
I'm back... thread not over
I have a problem when i try to debug in release mode. A few seconds after it starts debugging i get a warning message: "Debugging information for "program name.exe" cannot be found or does not match. Binary was not built with debug information.

Do you want to continue debugging?"

if i say yes, after a while I get an error report saying: "Unhandled exception at 0x0000012e in Kill cakic.exe: 0xC0000005: Access violation reading location 0x0000012e."

with options "break" and "continue" so here I have to terminate the program. If i say continue it comes up again, if i choose break i get this message:"No symbols are loaded for any call stack frame. The source code cannot be displayed." With options "ok" and "show disassembly"

Everything works fine when I use debug mode.

In another program i tried to debug in release mode, i got the first warning message but after that it worked fine.

What is the problem?

Thank you!
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 20th Jul 2009 12:58
Quote: "I have a problem when i try to debug in release mode."


Found the problem.

Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 20th Jul 2009 13:53
That error is caused by something in your code, please post it or you wont be able to get any help (not the debug in release mode thing lol, obviously, if you want to debug you use debug mode, to debug in release mode is only possible by setting your project's release mode up to be the same as debug mode anyway, so is ultimately pointless)

Generating debug information is an option that can be setup inside the project properties, however if you dont understand it you are best leaving it as is and running your programs in release mode.

If it ain't broke.... DONT FIX IT !!!
Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 21st Jul 2009 12:08
Oh my god... sorry i meant compile in release mode (excuse the n00b).

Here's the code:



In the program, i load a big picture of a guy named čakić on to the middle of the screen, on the bottom i put the player ship from the tgc Dark Invaders tutorial and make i shoot lasers towards the top of the screen. If they hit the left ot the right eye of the čakić sprite then hitl (hit left) or hitr (hit right) increases. And as those increase i add blood efects by putting new sprites on the screen. Thats abou it for now. The ray function is empty cause i don't know how to make it yet (i'll ask in another thread). Trying to make the čakić sprite shoot lasers from it's eyes.

Thnk you!
Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 27th Jul 2009 02:00
Anyone?
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 27th Jul 2009 06:01 Edited at: 27th Jul 2009 06:03
The declerations of your static variables are bak to front arent they ?



should be :


and the same for the other static variables that you are using.(I think, Ive never declared a static variable in that way or tried to so if it is correct just disregard me)

In functions like :



where you have lines like : "dbSpriteY(4)<=265+10&&blownr==false"

try putting the spaces into it like so :

"dbSpriteY(4)<=256+10 && blownr==false"

Im not sure if that is acutally needed, but it will make your code easier to read for both yourself and anybody else.

Best of luck

EDIT : the spacing on your if statements seems to be correct once I have pasted it into the code braces in my post so please disregard that if it is acutally correct, it must just be a glitch with the way it looks to me in your post

If it ain't broke.... DONT FIX IT !!!

Login to post a reply

Server time is: 2024-10-01 08:41:39
Your offset time is: 2024-10-01 08:41:39