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.

DarkBASIC Discussion / Compiliation to Exec doesn't work

Author
Message
oneillj
17
Years of Service
User Offline
Joined: 5th Nov 2008
Location:
Posted: 6th Nov 2008 01:53
I have a student who compiled his program to an exec using Build Final from the DB editor. It compiles with no errors but when he tries to run it, there is no response. When the icon is clicked, the mouse turns to an hour glass for a few seconds and then nothing. Tried it in Dark Edit and still no response.

Jim
BN2 Productions
22
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 6th Nov 2008 09:07
Direct x version problem?


Other than that I would say try compiling it on a different computer. See if the problem occurs again.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
oneillj
17
Years of Service
User Offline
Joined: 5th Nov 2008
Location:
Posted: 7th Nov 2008 12:40
I did try it on a nother machine but I got the same problem. The other kids programs compile and run fine.

Jim
steve paul thomas
17
Years of Service
User Offline
Joined: 4th Nov 2008
Location: United Kingdom
Posted: 28th Nov 2008 08:12 Edited at: 28th Nov 2008 08:15
Wow, this is a weird problem. Sorry for a late posting.

Did his program run OK from the editor?

Have you proof-read his program? Perhaps he has done something that doesn't cause a compile time error, but a run-time error. I'm still quite noob to DBC, so cannot think of any way to cause one, but its probably possible to.

When you right-click the exe's icon and choose "Properties" is the file size at around 1,823,205 bytes or more? I think the minimum exe size produced by DB is 1.73MB because your exe contains the entire DB features,even if you don't use them. Anyway, if the exe's file size is zero or a really small amount then your file might be broken. If it is too small then I would delete the file and try Build Final again.

Other than, I wouldn't know what else to suggest. I'm surprised that none of the experienced people here have had any ideas on this one though
Quirkyjim
17
Years of Service
User Offline
Joined: 18th Oct 2008
Location: At my computer
Posted: 28th Nov 2008 15:13
Pretty much the same as Steve, I'd go and run your program through the compiler first. I know I have come across many problems before where when you compile it, you don't get an error, but when you run it, you do.

Also, check to make sure that you get all the media in the same folder as the program (if there is any). If you have to load media at the beginning and it's not there, DB will just exit.

Good luck!

~QJ
oneillj
17
Years of Service
User Offline
Joined: 5th Nov 2008
Location:
Posted: 29th Nov 2008 00:57
Thanks to both of you for replying. The file size is arouond 98MB so, "somthing" got created. The program runs fine in the IDE. I already checked to see if there were any missing files. I'll check to see if he's loading something that shouldn't be (like a png that he loaded and still ran in the IDE - go figure !?!) or if he's loading something late in the program.

Thanks.
Jim

Jim
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 29th Nov 2008 21:04 Edited at: 29th Nov 2008 21:07
BE CAREFUL! When using build final, it incorporates EVERYTHING in the directory that main program is in into the final. If you have other docs or files that are not part of the project, they will get compiled into the final executable. The most your exe should swell to is roughly 1.7mb + the size of your media. If you don't have 97mb of media in your project and the exe is that big, it is full of stuff you don't want it to be full of.

It's better to not use build final in my opinion but use build EXE; and distribute the media with the exe. If you are trying to hide the media, it's better to find ways to compact and encrypt it so your program can decipher/extract it. There is a compression DLL that comes with DBC that can be used to this end; and there is copyright law...

Enjoy your day.
steve paul thomas
17
Years of Service
User Offline
Joined: 4th Nov 2008
Location: United Kingdom
Posted: 29th Nov 2008 21:37
Latch said:
Quote: "If you have other docs or files that are not part of the project, they will get compiled into the final executable."


I only thought it would package up the .exe with the media you explicitly load in the program. Thanks for sharing that with us, Latch.

@oneillj
Good luck with the program
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 29th Nov 2008 21:55 Edited at: 29th Nov 2008 21:58
Let me just be more clear. Build Final will compile all compatible files into the exe. Media, text files, dba code, directories and any compatible code... It won't compile dlls or exes (I think). Try it out. If you have a directory that's filled with a bunch of random media code snippets and subdirectories containing the same, if you build a final in that directory, it will suck in everything it can that's compatible. The compilation process doesn't search through your program to see what you identified to load or not to load. If it's in it's directory, it's fair game.

Enjoy your day.
steve paul thomas
17
Years of Service
User Offline
Joined: 4th Nov 2008
Location: United Kingdom
Posted: 29th Nov 2008 22:26 Edited at: 29th Nov 2008 22:27
Definitely something to make a mental note of. Guess we should all think carefully about where we keep our project notes and other assorted junk.
oneillj
17
Years of Service
User Offline
Joined: 5th Nov 2008
Location:
Posted: 29th Nov 2008 23:30
I had all the kids separate out the files they were pulling in and the program to another folder. All of the execs ran except for his. At first he didn't have a file he was supposed to be pulling in but I copied it into the new folder. As a final try, I just compiled it from the original figuring it would run anyway.

Jim

Login to post a reply

Server time is: 2026-07-05 11:51:48
Your offset time is: 2026-07-05 11:51:48