Error when multi-file compilation link

xiaoxiao2021-03-06  66

gosh! When compiling with the ARM-Linux-GCC compiler in Linux, the linker can distinguish between .o files compiled by .C and .cpp, and do not contain the .C file generation .o file when link Function implementation! Related: 1. You can include a function declaration (because it is compiled), an error occurs when the link (no implementation included). Undefined Reference to M () 2. Change the .C file to .CPP file and compile :) 3.BTW: Multiple files and header files compile, note that the contained header must not contain variable declarations and definitions , Macros and function declarations.

转载请注明原文地址:https://www.9cbs.com/read-120374.html

New Post(0)