The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: [OT] How do I compile c++ source to a windows exe



Hi Harry

Many, many thanks - worked like a dream. I will sleep tonight!

Cheers

Jonathan

On 2/17/07, Harry Broomhall <haeb@xxxxxxx> wrote:
>
>   On Fri, 16 Feb 2007 21:31:39 +0000, you wrote:
>
> >Hi all (otherwise know as the fountains of all knowledge!)
> >
> >I am a long time lurker and occasional UKHA conference visitor
(2004 - I
> had
> >the gadget friendly wife)
> >and would not post this but have now wasted hours tring to do
something
> that
> >should be simple.
> >
> >I need to compile a program from the C++ source at
> >http://people.cs.uchicago.edu/~pff/segment<http://people.cs.uchicago.edu/%7Epff/segment>
> <http://people.cs.uchicago.edu/%7Epff/segment>
> >to run in a command window on windows XP
> >
> >Can someone please point me to a very simple 'How To' as I have no
> >experience of doing this.
> >
>
> I assume from your question that you don't have a C++ compiler at
> the moment?
>
> I've had a look at the URL and downloded and compiled this
> program. Whether it will work or not I'm not competent to say.
>
> The problem with this code is that it was written on a Unix box
> with little thought for portability! :-(
>
> So - to get this to compile:
>
> 1) Assuming you have no compiler go to www.bloodshed.net and download
> the Dev-C++ IDE and compiler. Version 5 is fine, even though it is
> Beta. The actual version is 4.9.9.2 at the moment. This compiler is
> free.
>
> 2) Install Dev-C++
>
> 3) Unpack the 'segment' zip into a sub-dir of the Dev-C++ directory.
>
> 4) Edit the file segment-image.h at lines 33, 34 and 35 to use the
> function rand() instead of random(). (random() is usualy included in
> Unix distributions, but isn't in the C standard. rand() *is* in the
> standard. It's a historical thing)
>
> 5) Open a CMD box and change directory to where the segment files have
> been unpacked.
>
> 6) Add the path <dev-c++>\bin to the PATH environment variable.
>
> 7) Type 'make'. There shouldn't be any errors and you are done.
>
> Note that the Microsoft compiler will not compile this without a lot
> of messing about.
>
> Regards,
> Harry.
>
>
>


[Non-text portions of this message have been removed]




UKHA_D Main Index | UKHA_D Thread Index | UKHA_D Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.