Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 31st, 2006, 7:19 PM   #1
TwilightProgrammers
Newbie
 
Join Date: May 2006
Posts: 5
Rep Power: 0 TwilightProgrammers is an unknown quantity at this point
programming outside the compiler

i was wondering how to make the program out of the compiler, so you wouldn't need the compiler to run it.
thanks for you help,


Also if you could answer this question too, How do you use c++ out of the Compiler with windows, some people tell me i should try to make a port scanner but i really don't know what to do to get out of the compiler, i know you need to use a for loop to do it, but i really don't know the windows part, so thanks i guess.
TwilightProgrammers is offline   Reply With Quote
Old May 31st, 2006, 7:52 PM   #2
jayme
Professional Programmer
 
jayme's Avatar
 
Join Date: Nov 2005
Location: Canada
Posts: 495
Rep Power: 0 jayme is an unknown quantity at this point
Send a message via MSN to jayme
It doesn't sound like you have a clue what a compiler is for. A compiler compiles(obviously) your code into an exe format file. You don't need a compiler to run a program, you need a compiler to compile. It's that simple.

As for your second question, I really don't know what you mean.

Conclusion: Read a bit about compilers, how they work, etc. If you don't know how to program in C++, then go learn before trying to make a port scanner. Maybe I'm wrong, but with these kinds of questions, it doesn't sound like you've ever compiled a program before, restricting your abilities to program port scanners.
__________________

Quote:
Originally Posted by Mohamed Jihad
Durka durka!
Due to incorrect calculations during the middle ages, our calendar actually begins a few years after Jesus' birth. Thus the real 6/6/6 happened a few years back. The world already ended and you missed it.

Download Code::Blocks now!
jayme is offline   Reply With Quote
Old May 31st, 2006, 7:59 PM   #3
TwilightProgrammers
Newbie
 
Join Date: May 2006
Posts: 5
Rep Power: 0 TwilightProgrammers is an unknown quantity at this point
hmm, i use my borland turbo c++ v. 4.5 and i run programs. Lol and i just figured out how to run the program out of it.(please excuse my noobishness)

For the second part now, i was wondering how i get my Compiled program in a Windows Format...
thanks...
TwilightProgrammers is offline   Reply With Quote
Old May 31st, 2006, 9:41 PM   #4
coder0xff
Unverified User
 
coder0xff's Avatar
 
Join Date: Mar 2006
Posts: 18
Rep Power: 0 coder0xff is on a distinguished road
I have never used borland compilers, but I can tell you this. You will need a compiler that can build win32 PE (portable executable) files. You don't have to purchase anything (but you can if you want). You can search google for "Win32 compiler" and should get plenty of results. You will also need to get header files that declare/define all the stuff you will need for windows. MinGW is an example. You will then need to make your compiler link to the necessary library that windows provides, such as user32.dll. This is the free (and legal) way to do it. You can also use borland (one of the versions that supports windows PE ofcourse), or a microsoft product (ie. Visual Studio, which you can currently get a free version of Visual C++ Express). There are many different ways you can make a windows application (and I am just talking C++ right now), too. There is first, plain win32 programming. But higher level options exist like MFC, .net (both from micro$oft), etc. Hope that helps
coder0xff is offline   Reply With Quote
Old May 31st, 2006, 9:41 PM   #5
Prm753
Professional Programmer
 
Prm753's Avatar
 
Join Date: Oct 2005
Location: United States
Posts: 447
Rep Power: 4 Prm753 is on a distinguished road
Send a message via AIM to Prm753 Send a message via MSN to Prm753
Please, please stick with learning how to make console programs before you even think of trying to learn Windows programming.
__________________
The world's first athletic computer geek!
The home of PrProgramsStudios
How not to post a question: <-- Please don't reply
Prm753 is offline   Reply With Quote
Old May 31st, 2006, 10:33 PM   #6
msk420
Programmer
 
msk420's Avatar
 
Join Date: May 2006
Posts: 85
Rep Power: 3 msk420 is on a distinguished road
Newb...
__________________
Code Forums
msk420 is offline   Reply With Quote
Old Jun 1st, 2006, 5:36 AM   #7
TwilightProgrammers
Newbie
 
Join Date: May 2006
Posts: 5
Rep Power: 0 TwilightProgrammers is an unknown quantity at this point
thank you coder0xff for you help, and prm753, i just wanted to know how to do it, i really don't want to make gamming codes.
TwilightProgrammers is offline   Reply With Quote
Old Jun 1st, 2006, 6:03 AM   #8
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Generally speaking, a "Hello, World" program teaches you nothing about how programs work (and very little about programming). In C/C++, the source file that you write is subjected to at least three different processes. All preprocessor directives (statements beginning with #) are expanded by the preprocessor. The result of this, plus what you wrote, becomes the material submitted to the compiler. The compiler emits a certain amount of object code which is (usually) incomplete, but forms the nucleus of the program, which usually then needs to be combined with code written by others (library code). "Cout" is not just a word, it's a ton of code YOU didn't write. The linker then takes over and patches all these pieces together with the appropriate addresses. Sometimes (on some systems) this can result in directly executable code. On most machines you encounter in your early days, it results in code that can be placed somewhere in memory by the executive, polished off with actual addresses, and executed. Memory mapping from virtual to physical addresses may play a part, depending upon the system and the OS. All this still leaves a lot up to the coder, who should make at least a cursory study of how things work, as well as learning the syntax of the language and the methodology of programming. All this requires an investment on the part of the would-be programmer. The ability is not gained via osmosis.

Not all languages are compiled. Some are interpreted on the fly and others have an intermediate step involving so-called 'byte code'. Do a certain amount of homework and consider carefully what you want to ask. The results will be much more effective.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jun 1st, 2006, 6:25 PM   #9
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5 bl00dninja is on a distinguished road
from your initial question, i would have said "write it down on paper, that way your compiler can't touch it"???????????

do you mean using a generic text editor to write programs and compiling them on the command line, or...???

ok, i just read the post again. you want to make an executable file. your borland compiler should create a file called "whatever the fuck you named your program".exe in the .bin folder or somewhere. you can run the program then from there. you can find the directory it's in, copy and paste to your desktop, and double click it there and it will run. or from the original folder. it is already compatible with windows. your IDE or compiler has already done what you wanted, it's just hidden in a file somewhere.
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Old Jun 4th, 2006, 5:21 PM   #10
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
While we're on the topic of compilers, I thought I'd mention that Turbo C++ 4.5 is ancient. It's available from the Borland Museum for a reason. If you don't want to pay for a compiler, I would recommend Visual C++ 2005, Dev-C++ or Code::Blocks.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:45 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC