MICO: An Open Source CORBA Implementation

4.6: Compiler and Linker Wrappers

4.6 Compiler and Linker Wrappers

Note

Wrappers ease the generation ofMICO applications

It can be quite complicated to compile and link MICO applicationsbecause you have to specify system-dependent compiler flags, linkerflags, and libraries. This is why MICO provides you with four shellscripts:

  • mico-c++

    should be used as the C++ compiler when compiling the C++source files of a MICO application.

  • mico-ld

    should be used as the linker when linking together the .o filesof a MICO application.

  • mico-shc++

    should be used as the C++ compiler when compiling theC++ source files of a MICO dynamically loadable module. mico-shc++ will not be available if you specified the --disable-dynamic option during configuration.

  • mico-shld

    should be used as the linker when linking together the .o filesof a MICO dynamically loadable module. mico-shld willnot be available unless you specified the --enable-dynamicoption during configuration.

The scripts can be used just like the normal compiler/linker, exceptthat for mico-shld you do not specify a filename suffix forthe output file because mico-shld will append a system-dependentshared object suffix (.so on most systems) to the specified outputfilename.

4.6.1 Examples

Let's consider building a simple MICO application that consists oftwo files: account.idl and main.cc. Here's how to build account:

idl account.idlmico-c++ -I. -c account.cc -o account.omico-c++ -I. -c main.cc -o main.omico-ld account.o main.o -o account -lmico

As a second example, consider building a dynamically loadablemodule and a client program that loads the module. We have threesource files now: account.idl, client.cc, and module.cc:

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Casting Resins
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.