Introduction

 < Day Day Up > 



It is common for software systems to comprise software modules developed at different times in different programming languages. Sometimes this occurs by design. An example of this would be an optimized routine of some sort written in assembly language and used in a C++ program. However, it is more likely the case that a software application has 'evolved' from early versions developed in one language into a later version written in a new language that still relied on legacy modules. A classic example of this is when a development team 'goes object-oriented' and begins to migrate legacy application code previously developed in C to C++.

This chapter is an introduction to some of the issues surrounding mixed language programming. You will learn how to use the extern keyword to link functions written in C to your C++ programs, how to embed assembly code directly in a function, and how to incorporate previously developed assembly modules into your programs.

As a C++ programmer you may be tasked to write a C++ program that is called by a Java program. In this chapter you will also learn how C++ programs can be executed via the Java Native Interface (JNI). Success in this endeavor depends a lot on knowing when it is good idea to call a C++ program from Java and when it is not.

This chapter is not intended to serve as a complete treatment of the issues regarding assembly language or Java programming. Many excellent books cover these topics in great detail and a few especially good ones are listed in the references section.



 < Day Day Up > 



C++ for Artists. The Art, Philosophy, and Science of Object-Oriented Programming
C++ For Artists: The Art, Philosophy, And Science Of Object-Oriented Programming
ISBN: 1932504028
EAN: 2147483647
Year: 2003
Pages: 340
Authors: Rick Miller

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net