On Fri, 17 Apr 2009, Daniel Herrington wrote:

> I'm a C++ newbie, so be gentle ;)

   I tried C++ and decided to stick with C; I now use Python when I want an
OO approach.

> My question is, how does the compiler know about that get_auto_event.cpp
> defines get_auto_event from just the extern keyword in autosys_api_auto.h?
> Does it just match by the name? Do I have to compile get_auto_event.cpp
> before I can compile test_api.cpp, or will the compiler handle that
> automagically? (The fact that get_auto_event.cpp doesn't compile is
> another issue. That is trying to include a missing header file).

   I always wrote my Makefiles so that all the subordinate files (e.g., those
included but declared 'extern') were compiled first. The main file was
always the last to be compiled. In other words, struture the build from the
bottom up. Should work the same way with C++.

HTH,

Rich

-- 
Richard B. Shepard, Ph.D.               |  Integrity            Credibility
Applied Ecosystem Services, Inc.        |            Innovation
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to