473,809 Members | 2,712 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bloodshed Dev. Compiler will only not show me my RUN execuable. Help!

Sorry I am new to C programming & this newsgroup. But I downloaded a C
compiler & when it runs the executable file it pops up the dos prompt & shows
my executed file but only for a nanosecond & then flips off. I cant see my
executed file. I can go to the MSDOS prompt & run it but thats a pain.
There's got to be some place to click where you can look at it until you press
a key or something. HElp
Nov 14 '05 #1
12 1921
MatthewMlane <ma**********@a ol.com> scribbled the following:
Sorry I am new to C programming & this newsgroup. But I downloaded a C
compiler & when it runs the executable file it pops up the dos prompt & shows
my executed file but only for a nanosecond & then flips off. I cant see my
executed file. I can go to the MSDOS prompt & run it but thats a pain.
There's got to be some place to click where you can look at it until you press
a key or something. HElp


Your compiler's options configuration couldn't really have much less to
do with the C language. If you want further help on that, please ask in
a Microsoft newsgroup, or consult the Bloodshed Dev. Compiler customer
support directly.
However there is an easy work-around, which is a reasonably portable ISO
C solution. Simply insert a call to getchar() as the final statement of
your program, and your program will sit around waiting for a character
to appear in stdin, which usually means that it will wait until you
press Return.

--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"I said 'play as you've never played before', not 'play as IF you've never
played before'!"
- Andy Capp
Nov 14 '05 #2
MatthewMlane wrote on 03/09/04 :
Sorry I am new to C programming & this newsgroup. But I downloaded a C
compiler & when it runs the executable file it pops up the dos prompt & shows
my executed file but only for a nanosecond & then flips off. I cant see my
executed file. I can go to the MSDOS prompt & run it but thats a pain.
There's got to be some place to click where you can look at it until you
press a key or something. HElp


Use the code generator. The minimum example has a

#include <stdlib.h>
<...>

system ("pause");

at the end of main() call that makes the trick.
If you have several exit() calls in your code, let main() ends with

return 0;

but add the following in the beginning of main() :

#include <stdlib.h>
<...>
atexit (on_exit);

with

static void on_exit (void)
{
system ("pause");
}

placed before.

--
Emmanuel
The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
The C-library: http://www.dinkumware.com/refxc.html

"C is a sharp tool"

Nov 14 '05 #3
MatthewMlane wrote:

Sorry I am new to C programming & this newsgroup. But I downloaded
a C compiler & when it runs the executable file it pops up the dos
prompt & shows my executed file but only for a nanosecond & then
flips off. I cant see my executed file. I can go to the MSDOS
prompt & run it but thats a pain. There's got to be some place to
click where you can look at it until you press a key or something.
HElp


This is off-topic for c.l.c, but in essence you are using an IDE,
not a compiler. The IDE runs the compiler. You should get used
to using the command line - just leave the so-called dos window
open at all times, and you can get back and forth with an ALT-tab
(under windoze). Then you can learn to use it for the actual
compilation later.

For further info try the learn-c-c++ group (or something like
that) or a group that deals with your actual system.

--
"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews

Nov 14 '05 #4
MatthewMlane wrote:

Sorry I am new to C programming & this newsgroup. But I downloaded a C
compiler & when it runs the executable file it pops up the dos prompt & shows
my executed file but only for a nanosecond & then flips off. I cant see my
executed file. I can go to the MSDOS prompt & run it but thats a pain.
There's got to be some place to click where you can look at it until you press
a key or something. HElp


Try this program:
#include <stdio.h>
int main (void)
{ puts ("Press the <enter> key to exit.");
getchar ();
return 0;
}

Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo no****@mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"There is no satisfactory substitute for excellence."
-- Dr. Arnold O. Beckman
Nov 14 '05 #5
Erik de Castro Lopo <no****@mega-nerd.com> wrote in message news:<41******* *******@mega-nerd.com>...
MatthewMlane wrote:

Sorry I am new to C programming & this newsgroup. But I downloaded a C
compiler & when it runs the executable file it pops up the dos prompt & shows
my executed file but only for a nanosecond & then flips off. I cant see my
executed file. I can go to the MSDOS prompt & run it but thats a pain.
There's got to be some place to click where you can look at it until you press
a key or something. HElp


Try this program:
#include <stdio.h>
int main (void)
{ puts ("Press the <enter> key to exit.");
getchar ();
return 0;
}

Erik


at least you replied eric. I understand this is a c.l.c but that's a
pretty n00bie question and it takes 1 line of code to show the guy
what to do. You guys need to chill a bit and stop being so esoteric
and snotty. *only words i could think of *
Nov 14 '05 #6
Thanks for your help guys. You helped out the ultimate noobie. I've tried the
GetCHar & the Pause & they both work fine.

Also another off topic maybe question? Is it worth the extra money to buy the
Microsoft C++ compiler? I might be able to get it for a discount.
Nov 14 '05 #7
MatthewMlane wrote on 04/09/04 :
Also another off topic maybe question? Is it worth the extra money to buy
the Microsoft C++ compiler? I might be able to get it for a discount.


VC++ 6 or above, yes. Forget the previous versions.

--
Emmanuel
The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
The C-library: http://www.dinkumware.com/refxc.html

"C is a sharp tool"

Nov 14 '05 #8
MatthewMlane wrote:
.... snip ...
Also another off topic maybe question? Is it worth the extra
money to buy the Microsoft C++ compiler? I might be able to get
it for a discount.


Probably not. Microsoft has announced that they will never make
it C99 compliant, they don't fix bugs, and you should eschew all
Microsoft software on principal. Whatever you get out of it will
only work on Microsoft OSs (and probably not even there after a
few years), while better systems can supply you cross-compilers
and whatnot.

Unless you have an absolute requirement for it, no.

--
Chuck F (cb********@yah oo.com) (cb********@wor ldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home .att.net> USE worldnet address!
Nov 14 '05 #9
CBFalconer wrote:
MatthewMlane wrote:

... snip ...
Also another off topic maybe question? Is it worth the extra
money to buy the Microsoft C++ compiler? I might be able to get
it for a discount.

Probably not. Microsoft has announced that they will never make
it C99 compliant,


Could you point me to an URL with an official statement to that effect?
they don't fix bugs, and you should eschew all
Microsoft software on principal. Whatever you get out of it will
only work on Microsoft OSs (and probably not even there after a
few years), while better systems can supply you cross-compilers
and whatnot.

Unless you have an absolute requirement for it, no.

--
Michel Bardiaux
Peaktime Belgium S.A. Bd. du Souverain, 191 B-1160 Bruxelles
Tel : +32 2 790.29.41

Nov 14 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4429
by: Developwebsites | last post by:
I have tried out these C++ compilers: Watcom 11.0c - simply does not work. now they bundled fortran with c++ but it just doesnt install on my pc. digi-mars DOS - good, fast, small. however, no IDE, no editor, etc. borland command line tools 5.5 - installed but gives errors on programs which compile fine in 4.52. WHY?
2
1553
by: PointNot | last post by:
I'm coding in Dev C++ by bloodshed my questions are.... I want to learn to create GUI windows interfaces, can I do it in here. I've never learned the visual aspect of C++ yet, and would like to learn, any good sites to help me out. THanks
0
1175
by: bob | last post by:
I'm using Bloodshed Dev-C++, and I'm getting ready to distribute a program I made with it. Does anyone know how to change the icon of the program? I'm not sure how resources work in Bloodshed, and the documentation on this seems nonexistent.
6
2344
by: PCHOME | last post by:
Hi! I am looking for a good free IDE C Compiler. Dose any have experience on using them? Which is better? Bloodshed C or Miracle C? Or anyother free IDE C Compiler you like to recomend? Thank you so much!
1
1294
by: ZaRMaS | last post by:
Hi all, i want to build an executable, wich take in parameter a path to another executable. My executable add a protection like a password with a window or an expiration time out. My executable build a new executable with new protections. This is my idea but i don't find on a network some tutorials or group to help me If anyome has done a similar projetc or can help me ...
3
6895
by: pauldepstein | last post by:
Just installed dev cpp on Windows XP. When I try to compile programs, however simple, I always get the message Linker error undefined reference to cpu_features_init. Could someone please help me rectify this problem. I apologise if this is slightly O.T. because it refers to a specific compiler. However, it's important to me to get an answer fairly quickly. A newsgroup on the specific topic of the bloodshed dev compiler would be...
9
27304
by: The End | last post by:
Hi when in stalling Dev-C++ on my computer (Windows Xp) i get an error on installation which does not allow me to compile i need some help to fix this problem so i can use the program. Ok the program can acctually be used but it can not compile this is because of an error happening in the installation procces this is what the error says: There doesn't seem to be a GNU make file path or in Dev-C++'s Bin path please make sure that you have GNU...
30
3827
by: Dave -Turner | last post by:
So I just downloaded Bloodshed devcpp, opened up the Hello example, compiled it, no problems ..... well, except one - the exe is 474,990 bytes! What's the secret to compiling small exes? Thanks
0
9601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10115
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9198
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3013
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.