On Time RTOS-32 Documentation
Welcome
RTTarget-32
RTTarget-32 Programming Manual
Introduction
Running Win32 Programs without Win32
The i386 Microprocessor
RTLoc: Locating a Program
Running a Program on the Target
Cross Debugging
Using an IDE
The RTTarget-32 API
Demo Programs
Advanced Topics
Choosing a Locate Method
Running with or without Paging
Running at CPL 0 or 3
Installing Hardware Interrupt Handlers
Catching NULL Pointer Assignments
Catching Stack Overflows
Running without Run-Time System
Avoid Repeated Downloads
Configuration for Debug and Release Builds
Using Data Compression
Using DLLs through RTLoc
Using Rtt32dll.dll
Linking Rtt32.lib into the EXE
Using a Custom System DLL
Utility MakeDef
Differences from Win32
Using Microsoft Run-Time System DLLs
Loading DLLs through a File System
RAM File System
Installable File System
Multithread Applications
Using the MetaWINDOW Graphics Library
Using the 387 Emulator
Using Non-Volatile Memory
APIC Mode
Multiprocessor Applications
Custom MP Floating Pointer Structure
RTVmf-32
RTRth-32
Performance Optimizations
Compiling and Linking with On Time RTOS-32
Redistributable Components of RTTarget-32
RTLoc Error Messages
RTTarget-32 Reference Manual
RTKernel-32
RTFiles-32
RTIP-32
RTPEG-32
RTUSB-32
|
Linking Rtt32.lib into the EXE
When Rtt32.lib is linked into the main program, other DLLs can access RTTarget-32's functions in the EXE if they are exported. This generally means that a module definition file has to be used when linking the EXE. The DEF file must list all functions (RTTarget native and Win32 emulation) needed by other modules with EXPORT directives. The advantage of this method is that only those parts of Rtt32.lib actually used by the application are linked. The disadvantage is that maintaining DEF files can be cumbersome. However, utility Makedef.exe can be used to automate DEF file maintenance (see section Utility MakeDef).
RTLoc's Dynamic Link Report (which must be explicitly enabled with option -Rd+) in the .LOC file can be used to analyze exactly which functions must be exported. All missing functions will be reported in warning messages. If you have exported functions not required by the application, they will be listed under unreferenced entrypoints at the end of the Dynamic Link Report.
Example program DLLDemo2 shows how to link Rtt32.lib and export RTTarget-32 functions to other DLLs.
Using DLLs through RTLoc
Using Rtt32dll.dll
Using a Custom System DLL
|