Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Compiling and distributing C programs

Reply
Thread Tools

Compiling and distributing C programs

 
 
Malcolm McLean
Guest
Posts: n/a
 
      06-23-2013
Here's the situation.

I'm using Windows. My desktop machine is Vista, my notebook runs XP.

I had a free compiler called tcc (tiny C compiler) which was small and
minimal, but did most of what I wanted without fuss, which was to write
portable commandline utilities. The anti virus broke it and started
labelling the executables it produced. I had a nice paid for Visual
Studio 6.0, but the personal version (cost about 60 quid) not the
professional. Microsoft deliberately broke it.

Microsoft sell paid for C compilers, but they are too expensive for
hobby use. They offer Visual Studio Express. So I downloaded it. It's
a horrible thing and you have to fight it just to compile "hello world".
But it does the trick, as long as you only want to compile standard C
with a few Windows API calls.

Now I wanted to write a snake game. Just a bit of fun. So I had to fight
it to put in the few amateur graphics - you have to edit the so-called
resource script by hand. However it won't link the PlaySound() function.
I can't get the beeps in. Now if a freebie hobby compiler isn't suitable
for "snake", what is it intended for?

Also I can't distribute the executables easily. Everyone bans them because
of the virus threat.

Now the Vista machine is getting long in the tooth. I thinking of replacing
it by Windows 8. But I feel so badly bitten by Microsoft, that I really
feel twice shy. But the reality is that most PCs still run Windows.

I want to be able to write little programs like "snake", with graphics and
sound, and distribute them to people who want to play them. I don't have
vast sums to spend. What's the best way of achieving that end?
 
Reply With Quote
 
 
 
 
James Kuyper
Guest
Posts: n/a
 
      06-23-2013
On 06/23/2013 06:57 AM, Malcolm McLean wrote:
> Here's the situation.
>
> I'm using Windows. My desktop machine is Vista, my notebook runs XP.
>
> I had a free compiler called tcc (tiny C compiler) which was small and
> minimal, but did most of what I wanted without fuss, which was to write
> portable commandline utilities. The anti virus broke it and started
> labelling the executables it produced. ...


I presume your anti-virus software labeled them as infected? If so, can
you be certain it was wrong? If a virus were infecting your compiler,
your linker, and possibly any one of several other possible pieces of
software, production of infected executables would be a plausible
consequence.

> ... I had a nice paid for Visual
> Studio 6.0, but the personal version (cost about 60 quid) not the
> professional. Microsoft deliberately broke it.


You're using "paid for" as an adjectival phrase here. I couldn't
possibly cite the relevant grammar rule, but based upon a half-century
of voracious reading in English, I'm pretty sure that should be written
as "paid-for". I found it very confusing without the dash.

> Microsoft sell paid for C compilers, but they are too expensive for
> hobby use. They offer Visual Studio Express. So I downloaded it. It's
> a horrible thing and you have to fight it just to compile "hello world".
> But it does the trick, as long as you only want to compile standard C
> with a few Windows API calls.
>
> Now I wanted to write a snake game. Just a bit of fun. So I had to fight
> it to put in the few amateur graphics - you have to edit the so-called
> resource script by hand. However it won't link the PlaySound() function.
> I can't get the beeps in. Now if a freebie hobby compiler isn't suitable
> for "snake", what is it intended for?
>
> Also I can't distribute the executables easily. Everyone bans them because
> of the virus threat.
>
> Now the Vista machine is getting long in the tooth. I thinking of replacing
> it by Windows 8. But I feel so badly bitten by Microsoft, that I really
> feel twice shy. But the reality is that most PCs still run Windows.
>
> I want to be able to write little programs like "snake", with graphics and
> sound, and distribute them to people who want to play them. I don't have
> vast sums to spend. What's the best way of achieving that end?


If you were looking specifically for a Microsoft solution, I couldn't
answer any of your questions. However, if that's what you were looking
for, you would have posted it to a MicroSoft-oriented forum (right?). I
know that you can get all the tools you need to build a snake-like game
for Linux, absolutely free. It's not my area of expertise, so I couldn't
give you an detailed advice about how to do it, but snake-like games are
commonplace in the Linux world. Download one of the projects from
<http://sourceforge.net/directory/games/os:linux/?q=snake> to find out
how they do it.

--
James Kuyper
 
Reply With Quote
 
 
 
 
JohnF
Guest
Posts: n/a
 
      06-23-2013
Malcolm McLean <(E-Mail Removed)> wrote:
> Here's the situation.
> I'm using Windows. My desktop machine is Vista, my notebook runs XP.
> I had a free compiler called tcc (tiny C compiler)


Not sure about graphics support, but I use both
http://www.mingw.org/
and
http://www.delorie.com/djgpp/
to distribute win executables without problem.
And, btw, people seem to still request executables,
despite virus possibilities.
--
John Forkosh ( mailto: http://www.velocityreviews.com/forums/(E-Mail Removed) where j=john and f=forkosh )
 
Reply With Quote
 
Nobody
Guest
Posts: n/a
 
      06-23-2013
On Sun, 23 Jun 2013 03:57:42 -0700, Malcolm McLean wrote:

> However it won't link the PlaySound() function.


You need to link in winmm.lib.

> I want to be able to write little programs like "snake", with graphics and
> sound, and distribute them to people who want to play them. I don't have
> vast sums to spend. What's the best way of achieving that end?


Either MinGW (gcc for Windows) or Visual Studio Express.

There are plenty of advantages to using VS (e.g. the debugger), but any
program of that size has a significant learning curve. Actually, whatever
program you use, programming for a modern OS has a significant learning
curve.

Personally, I use MinGW if I'm writing a cross-platform program, and VS if
it's going to be Windows-only (apart from anything else, it's easier to
find pre-compiled libraries for VS).


 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      06-23-2013
Malcolm McLean wrote:
> Here's the situation.
>
> I'm using Windows. My desktop machine is Vista, my notebook runs XP.
>
> I had a free compiler called tcc (tiny C compiler) which was small and
> minimal, but did most of what I wanted without fuss, which was to write
> portable commandline utilities. The anti virus broke it and started
> labelling the executables it produced. I had a nice paid for Visual
> Studio 6.0, but the personal version (cost about 60 quid) not the
> professional. Microsoft deliberately broke it.


Just avoid windows and move to a more developer friendly, anti-virus
free, platform.

--
Ian Collins
 
Reply With Quote
 
BartC
Guest
Posts: n/a
 
      06-23-2013


"Ian Collins" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Malcolm McLean wrote:
>> Here's the situation.
>>
>> I'm using Windows. My desktop machine is Vista, my notebook runs XP.
>>
>> I had a free compiler called tcc (tiny C compiler) which was small and
>> minimal, but did most of what I wanted without fuss, which was to write
>> portable commandline utilities. The anti virus broke it and started
>> labelling the executables it produced. I had a nice paid for Visual
>> Studio 6.0, but the personal version (cost about 60 quid) not the
>> professional. Microsoft deliberately broke it.

>
> Just avoid windows and move to a more developer friendly, anti-virus free,
> platform.


Sure. Then you just have to persuade thousands of customers to do the same!

--
Bartc

 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      06-23-2013
BartC wrote:
>
>
> "Ian Collins" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Malcolm McLean wrote:
>>> Here's the situation.
>>>
>>> I'm using Windows. My desktop machine is Vista, my notebook runs XP.
>>>
>>> I had a free compiler called tcc (tiny C compiler) which was small and
>>> minimal, but did most of what I wanted without fuss, which was to write
>>> portable commandline utilities. The anti virus broke it and started
>>> labelling the executables it produced. I had a nice paid for Visual
>>> Studio 6.0, but the personal version (cost about 60 quid) not the
>>> professional. Microsoft deliberately broke it.

>>
>> Just avoid windows and move to a more developer friendly, anti-virus free,
>> platform.

>
> Sure. Then you just have to persuade thousands of customers to do the same!


If I were developing a simple game (of for the time!) I would be be
writing it on Linux for Android, or Mac for IOS. if my kids and their
mates are typical, that's were the audience and potential market is
these days.

--
Ian Collins
 
Reply With Quote
 
James Kuyper
Guest
Posts: n/a
 
      06-24-2013
On 06/23/2013 06:35 PM, BartC wrote:
>
>
> "Ian Collins" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Malcolm McLean wrote:
>>> Here's the situation.
>>>
>>> I'm using Windows. My desktop machine is Vista, my notebook runs XP.
>>>
>>> I had a free compiler called tcc (tiny C compiler) which was small and
>>> minimal, but did most of what I wanted without fuss, which was to write
>>> portable commandline utilities. The anti virus broke it and started
>>> labelling the executables it produced. I had a nice paid for Visual
>>> Studio 6.0, but the personal version (cost about 60 quid) not the
>>> professional. Microsoft deliberately broke it.

>>
>> Just avoid windows and move to a more developer friendly, anti-virus free,
>> platform.

>
> Sure. Then you just have to persuade thousands of customers to do the same!


No, that part's already been done. The number of people using
non-windows platforms is measured at least in the millions. Whether it's
measured in 10's of millions, or hundreds, I'm not sure, but the last
time that the number of users of operating systems other than windows
was measured in mere thousands was probably before windows itself was
created.
--
James Kuyper
 
Reply With Quote
 
Lynn McGuire
Guest
Posts: n/a
 
      06-24-2013
On 6/23/2013 5:57 AM, Malcolm McLean wrote:
> Here's the situation.
>
> I'm using Windows. My desktop machine is Vista, my notebook runs XP.
>
> I had a free compiler called tcc (tiny C compiler) which was small and
> minimal, but did most of what I wanted without fuss, which was to write
> portable commandline utilities. The anti virus broke it and started
> labelling the executables it produced. I had a nice paid for Visual
> Studio 6.0, but the personal version (cost about 60 quid) not the
> professional. Microsoft deliberately broke it.
>
> Microsoft sell paid for C compilers, but they are too expensive for
> hobby use. They offer Visual Studio Express. So I downloaded it. It's
> a horrible thing and you have to fight it just to compile "hello world".
> But it does the trick, as long as you only want to compile standard C
> with a few Windows API calls.
>
> Now I wanted to write a snake game. Just a bit of fun. So I had to fight
> it to put in the few amateur graphics - you have to edit the so-called
> resource script by hand. However it won't link the PlaySound() function.
> I can't get the beeps in. Now if a freebie hobby compiler isn't suitable
> for "snake", what is it intended for?
>
> Also I can't distribute the executables easily. Everyone bans them because
> of the virus threat.
>
> Now the Vista machine is getting long in the tooth. I thinking of replacing
> it by Windows 8. But I feel so badly bitten by Microsoft, that I really
> feel twice shy. But the reality is that most PCs still run Windows.
>
> I want to be able to write little programs like "snake", with graphics and
> sound, and distribute them to people who want to play them. I don't have
> vast sums to spend. What's the best way of achieving that end?


www.openwatcom.org has a nice C and C++ compiler
with a fairly primitive IDE.

Lynn


 
Reply With Quote
 
Malcolm McLean
Guest
Posts: n/a
 
      06-24-2013
On Monday, June 24, 2013 1:36:55 AM UTC+1, James Kuyper wrote:
> On 06/23/2013 06:35 PM, BartC wrote:
>
> >

>
> >

>
> > "Ian Collins" <(E-Mail Removed)> wrote in message

>
> > news:(E-Mail Removed)...

>
> >> Malcolm McLean wrote:

>
> >>> Here's the situation.

>
> >>>
> >>> I'm using Windows. My desktop machine is Vista, my notebook runs XP.
> >>>

>
> >>> I had a free compiler called tcc (tiny C compiler) which was small and
> >>> minimal, but did most of what I wanted without fuss, which was to write
> >>> portable commandline utilities. The anti virus broke it and started
> >>> labelling the executables it produced. I had a nice paid for Visual
> >>> Studio 6.0, but the personal version (cost about 60 quid) not the
> >>> professional. Microsoft deliberately broke it.

>
> >>

>
> >> Just avoid windows and move to a more developer friendly, anti-virus free,
> >> platform.

>
> >

>
> > Sure. Then you just have to persuade thousands of customers to do the same!

>
>
>
> No, that part's already been done. The number of people using
> non-windows platforms is measured at least in the millions. Whether it's
> measured in 10's of millions, or hundreds, I'm not sure, but the last
> time that the number of users of operating systems other than windows
> was measured in mere thousands was probably before windows itself was
> created.
>


I downloaded an Android dev kit. I did get "hello world" running on it. But I've only 2GB of memory, and someone told me it needs 16. Certainly it ran far too slowly to be usable.
But I'm replacing the Vista machine, so a 16GB job isn't out of the question.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Distributing programs Jason Python 6 10-04-2005 05:33 PM
Distributing Python programs NEWS Python 5 01-29-2004 09:28 AM
Re: distributing programs on server Brendan Duffy ASP .Net 0 07-25-2003 01:05 AM
Re: distributing programs on server Merlin ASP .Net 0 07-10-2003 11:20 PM
Re: distributing programs on server Merlin ASP .Net 0 07-10-2003 11:01 PM



Advertisments