By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,147 Members | 1,402 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,147 IT Pros & Developers. It's quick & easy.

Need some help compiling something

P: n/a
I used to program. However i'm finding that statment now means as much
as a 40 year old saying "I used to be cool".

I've got a program here, and the code for it, and i want to make a
custom alteration. Very minor at that.

Here's what the program does. It generates a pattern of random lights
on the screen, pauses for a few seconds, then does it again. If during
the pause the "S" key is pressed, it writes the screen contents to a
..bmp file.

All this code is already in place. All i want to do is make it so that
instead of pausing, it calls the sub for writing the bmp automatically,
then continues.

I can even make these modifications to the code myself, it's pretty
simple. The problem i'm having is compiling. It's been about 10 years
since i left school, and therefor about 10.5 years since i've actually
done anything like this.

If anyone is willing to help me get this to work, please reply. I thank
you in advance.

Jun 11 '06 #1
Share this Question
Share on Google+
9 Replies


P: n/a

ki*****@yahoo.com schreef:
If anyone is willing to help me get this to work, please reply. I thank
you in advance.


If I understand correctly you're asking how to compile a program? Don't
you think it's only fair you tell us _what_ compiler you are using (or
trying to use)?

Besides, this is an n.g. on the language 'c', not about specific
implementations, so you may get a better answer if you ask in a n.g.
that's specific for your OS/implementation.

Jun 11 '06 #2

P: n/a
It's not finished, but if you can't be bothered messing about
installing compilers you can use an online one called Compilr at
http://www.caller.me.uk/Compilr - just put the code in textbox and
click compile.

Jun 11 '06 #3

P: n/a
ki*****@yahoo.com wrote:
I used to program. However i'm finding that statment now means as much
as a 40 year old saying "I used to be cool".

I've got a program here, and the code for it, and i want to make a
custom alteration. Very minor at that.


You've not even specified what language the program is written with.
Since you're posting here, I'm assuming it's C.

If the failure to compile is due to standard C constructs or misuse of
the same then this group can help you, if you post your source along
with compilation details.

Otherwise, it would be better to post to a group specific to the
compiler you're using or the operating system for which you're
compiling. In anycase provide the source code and details of
compilation environment.

Jun 12 '06 #4

P: n/a
Thank you santosh, this is the reply i was hoping to get :)
1) your right in asuming it's a C program
2) Your right in asuming the failure to compile is a misuse of
something

Here is the file, I've got a few links for it, just incase one fails.

http://s1.upload.sc/request/09c260b5...530bdd6e/owner
http://www.filefactory.com/?8269f3

The file contains the source, a compiled version of that source, and a
prefs file.

So the source is pretty plainly laid out. Note, that's the original
version. It does not contain the alterations i want. I discarded them,
because i'm sure that's probably the issue. Like i said originally,
it's been 10 years since i used C++ in my Highschool class.

All i need is for "void screenshot" to be called at the end of the
routine that makes all the pretty images. This will create a looping
program that will create a TON of bmp's until I press ESC. (esc is
already programed as a break)

Thank you so much for your willingness to help.

Jun 12 '06 #5

P: n/a
In article <11**********************@c74g2000cwc.googlegroups .com>,
Kileran <ki*****@yahoo.com> wrote:
Here is the file, I've got a few links for it, just incase one fails. http://s1.upload.sc/request/09c260b5...530bdd6e/owner
That one doesn't work. There was a 60 second timeout on the link you
generated.
http://www.filefactory.com/?8269f3


That one is pretty slow... I'm not sure if it is working or not.
--
Programming is what happens while you're busy making other plans.
Jun 12 '06 #6

P: n/a
Kileran wrote:

Thank you santosh, this is the reply i was hoping to get :)
1) your right in asuming it's a C program
2) Your right in asuming the failure to compile is a misuse of
something

Here is the file, I've got a few links for it, just incase one fails.

http://s1.upload.sc/request/09c260b5...530bdd6e/owner
http://www.filefactory.com/?8269f3

The file contains the source, a compiled version of that source, and a
prefs file.


Include context. If you are using a google that has not
implemented automatic quoting, see my sig below. Without context
your post it meaningless to the vast majority, who are not using
the broken google interface to usenet.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
Jun 12 '06 #7

P: n/a
This one may work better. It's only a 9kb zip file, so slow shouldn't
matter

http://s1.upload.sc/request/8a5d5f0d...3b0f8eaddef46d

Jun 12 '06 #8

P: n/a
In article <11**********************@j55g2000cwa.googlegroups .com>,
Kileran <ki*****@yahoo.com> wrote:
This one may work better. It's only a 9kb zip file, so slow shouldn't
matter http://s1.upload.sc/request/8a5d5f0d...3b0f8eaddef46d


I had a bunch of trouble getting it to work, but eventually was
able to do the download.
--
Prototypes are supertypes of their clones. -- maplesoft
Jun 12 '06 #9

P: n/a
In article <11**********************@c74g2000cwc.googlegroups .com>,
Kileran <ki*****@yahoo.com> wrote:
:Thank you santosh, this is the reply i was hoping to get :)
:1) your right in asuming it's a C program
:2) Your right in asuming the failure to compile is a misuse of
:something
Here is the file, I've got a few links for it, just incase one fails.


Sorry, your program requires
<windows.h> and <ddraw.h>, neither of which are standard C.
The problem might be with those. Your program appears to use
Windows specific features: in particular you declare some things
with a CALLBACK attribute; for standard C that would have to be
#define'd into nothingness.

You also have these difficulties:
- <stdlib.h> must be included to define RAND_MAX malloc free exit
- <string.h> must be included to define memset
- you do not define min() or max() anywhere. Those are not defined
in any standard header, so you need ot define them yourself.
--
If you lie to the compiler, it will get its revenge. -- Henry Spencer
Jun 12 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.