Home |
RTTarget-32 Programming Manual Running Win32 Programs without Win32 Running a Program on the Target Compiling and Linking with On Time RTOS-32 Order of Libraries |
Order of LibrariesThe order of libraries can be very important. For a program or DLL to link directly against the On Time RTOS-32 libraries, the recommended order of libraries is as follows: Object files of the applicationTypically, the startup code and code of the application. 387 Emulator init object fileRtemu.obj (only if the 387 emulator is needed). Libraries of the applicationIf you have any application libraries, link them here. RTUSB-32 libraryRtusb.lib only if USB support will be used. RTPEG-32 libraryPeg.lib only if a GUI is required. RTIP-32 Add-On librariesIf RTIP-32 add-ons are required, they should be linked here. RTIP-32 librariesNetrth.lib (if using RTRth-32), Netvmf.lib (if using RTVmf-32), and Rtip.lib, if TCP/IP communication is desired. OpenSSL librariesLibcrypto.lib and Libssl.lib, if encrypted TCP/IP communication is desired. RTFiles-32 libraryRtfiles.lib or RtfilesX.lib only if a file system is required. RTFiles-32 driverNeeded only if Rtfiles.lib or RtfilesX.lib is linked. Rtfsrtt.lib for single-threaded applications or Rtfsk32.lib for RTKernel-32 applications. Drvdoc.lib must be linked if M-Systems DiskOnChip support is required. RTKernel-32 libraryOnly required for multithreaded applications. Rtk32.lib for the RTKernel-32 Debug Version and Rtk32s.lib for the Standard Version. If the multiprocessor kernel is desired, use Rtk32mp.lib or Rtk32mps.lib (Debug/Standard Version, respectively). RTKernel-32 driversOnly required for multithreaded applications. Drvrt32.lib or any set of alternate drivers followed by Drvrt32.lib. Rttheap.libAlways optional. This library replaces the run-time system's heap manager with RTTarget-32's RTTHeap heap manager. Rtvmf.libOnly required for programs to run under RTOS32Win (RTVmf-32 required). Rtrth.libOnly required for programs to run under the Real-Time Hypervisor (RTRth-32 required). Acpica.libRequired if the application calls function RTMPACPITableCreate. Rtt32.libAlways required. RTTarget-32's native API and Win32 emulation. 387 Emulator libraryOnly required if the application needs floating point support on CPUs without FPU. Rtemu.lib or Rtemumt.lib. MetaWINDOW support libraryOnly required if MetaWINDOW is also linked. Library Rtmetaw.lib. Compiler-supplied run-time systemWhatever your compiler documentation recommends for console mode applications. For RTKernel-32 programs, use the multithread run-time system. EXEs or DLLs which do not link the On Time RTOS-32 libraries but must still have access to the On Time RTOS-32 API should link an import library. See examples DLLDemo2 and DLLDemo3 for details. The order of object files is not important. The linker will unconditionally link all object files regardless of their relative order, but object modules contained in libraries are only linked if they are referenced. Thus, if two libraries define the same referenced symbol, the first symbol encountered in the list of libraries is linked. The following symbols are redefined by various On Time RTOS-32 libraries:
The following examples list the On Time RTOS-32 libraries in the recommended link order. An application using only RTTarget-32, no floating point: Rtt32.lib An application using RTTarget-32 and RTKernel-32's single-CPU Debug Version with RTTarget-32's alternate heap manager RTTHeap: Rtk32.lib Drvrt32.lib Rttheap.lib Rtt32.lib An application using RTTarget-32, RTPEG-32, RTFiles-32 with no exFAT file system support, DiskOnChip support, RTKernel-32's Standard Version, Pentium High-Resolution timer driver, need for FPU emulation, and RTTarget-32's alternate heap manager RTTHeap: Rtemu.obj Peg.lib Rtfiles.lib Rtfks32.lib Drvdoc.lib Rtk32s.lib Hrtpent.lib Clkpc.lib Fltemumt.lib Drvrt32.lib Rttheap.lib Rtt32.lib Rtemumt.lib Compiling and Linking with On Time RTOS-32
|