# Another C++ question

**URL:** <https://boards.straightdope.com/t/another-c-question/172819>\
**Category:** Factual Questions\
**Created:** [May 3, 2003, 6:07am UTC](https://boards.straightdope.com/t/another-c-question/172819 "2003-05-03T06:07:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Firx](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@Firx](https://boards.straightdope.com/u/Firx)\
**Post date:** [May 3, 2003, 6:07am UTC](https://boards.straightdope.com/t/another-c-question/172819/1 "2003-05-03T06:07:01Z")

</div>

Having written a c++ source file in, for example, Codewarrior, How do I turn this into an executable file (for Windows)?

For the record, I don’t know Codewarrior very well, and I don’t have the documentation for it. There is a button titled “make”, but all this seems to do is compile the code again. Well, doubtless it does something, but I have no idea what. Does “make” have anything to do with making an executable?

---

<div class="post-metadata">

**Author:** ![DarrenS](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DarrenS](https://boards.straightdope.com/u/DarrenS)\
**Post date:** [May 3, 2003, 6:39am UTC](https://boards.straightdope.com/t/another-c-question/172819/2 "2003-05-03T06:39:07Z")

</div>

In general, you will need to compile the source code (into a .OBJ file) then link it (to produce a .EXE) with its dependencies. This is how it works with Visual C++, anyway.

---

<div class="post-metadata">

**Author:** ![DarrenS](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DarrenS](https://boards.straightdope.com/u/DarrenS)\
**Post date:** [May 3, 2003, 6:58am UTC](https://boards.straightdope.com/t/another-c-question/172819/3 "2003-05-03T06:58:18Z")

</div>

I’ve never used _Codewarrior_, but according to their [web site](http://www.metrowerks.com/MW/Develop/Desktop/Windows/Professional/Default.htm) it seems to be an integrated development environment (IDE).

> [@](#):
>
> CodeWarrior Development Tools for Windows includes a sophisticated project manager, customizable text editor, debugger, compilers, linkers, and more. The integrated development environment (IDE) lends extensibility, customization options, and an open API to plug-in your favorite third-party tools. CodeWarrior for Windows also includes one of the best ANSI/ISO C/C++ compilers in the industry.

So once you’ve created your source, there must be an option to compile and link it?

---

<div class="post-metadata">

**Author:** ![Firx](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@Firx](https://boards.straightdope.com/u/Firx)\
**Post date:** [May 3, 2003, 8:01pm UTC](https://boards.straightdope.com/t/another-c-question/172819/4 "2003-05-03T20:01:55Z")

</div>

I know almost nothing about c++, or any cs stuff, except (sort of) how to write code. Sure, when I have Codewarrior open I can compile and link by clicking the “compile” and “run” buttons, respectively. But, I don’t have any idea how to do this outside Codewarrior. In other words, how can I make the finished file work independently from Codewarrior. Is it possible?

> [@](#):
>
> In general, you will need to compile the source code (into a .OBJ file) then link it (to produce a .EXE) with its dependencies. This is how it works with Visual C++, anyway.

I’m with you so far, but how can I do that?

---

<div class="post-metadata">

**Author:** ![Q.E.D](https://avatars.discourse-cdn.com/v4/letter/q/51bf81/32.png) [@Q.E.D](https://boards.straightdope.com/u/Q.E.D)\
**Post date:** [May 3, 2003, 8:12pm UTC](https://boards.straightdope.com/t/another-c-question/172819/5 "2003-05-03T20:12:02Z")

</div>

Once you’ve successfully compiled and linked it to create the final .exe it should run as a standalone application outside of the development software.
