![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: May 2006
Posts: 5
Rep Power: 0
![]() |
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. |
|
|
|
|
|
#2 | |
|
Professional Programmer
|
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:
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! ▄▄▄▄ |
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: May 2006
Posts: 5
Rep Power: 0
![]() |
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... |
|
|
|
|
|
#4 |
|
Unverified User
Join Date: Mar 2006
Posts: 18
Rep Power: 0
![]() |
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
|
|
|
|
|
|
#5 |
|
Professional Programmer
|
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 |
|
|
|
|
|
#6 |
|
Programmer
Join Date: May 2006
Posts: 85
Rep Power: 3
![]() |
Newb...
__________________
Code Forums |
|
|
|
|
|
#7 |
|
Newbie
Join Date: May 2006
Posts: 5
Rep Power: 0
![]() |
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.
|
|
|
|
|
|
#8 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
|
|
#9 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
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. |
|
|
|
|
|
#10 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
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.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|