- Timestamp:
-
06/22/07 04:47:11 (17 years ago)
- Author:
-
Rsg
- Comment:
-
/* Linking */
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v5
|
v6
|
|
28 | 28 | |
29 | 29 | On some targets/with some compilers "linking c++" is effectively "just adding -lstdc++" but on most others it is more. What confuses some users is "gcc ... -lstdc++" once having been worked with old gcc (IIRC, gcc < 4.0) on i386 targets. |
| 30 | |
| 31 | If you use the RTEMS Makefile Template ($TARGET/make/Templates/Makefile.leaf), this is the easy way to link properly (example from the Template): |
| 32 | |
| 33 | {{{ |
| 34 | # The following links using C++ rules to get the C++ libraries. |
| 35 | # Be sure you BSP has a make-cxx-exe rule if you use this. |
| 36 | ${ARCH}/xxx-your-program-here: ${OBJS} ${LINK_FILES} |
| 37 | $(make-cxx-exe) |
| 38 | }}} |
30 | 39 | = Global Object Construction and Destruction = |
31 | 40 | |