I have created a static library for the following class, libtgbotengine.a and externed the class to be used in a different project. tgbotengine.h In a different project, I want to link libtgbotengine.a with the following cpp file. My goal is to not to include tgbotengine.h. Is externing myTgBotEngine help me achieve this? project2.cpp Answer The upcoming modules will probably allow
Tag: extern
How to declare a global variable in an header file and how he need to be in the c file
i have a serious problem to understand how to declare a global variable in an header file and how he need to be in the c file. In my .h : extern struct my_global_variable glob; and on my .c i add to reference it : struct my_global_variable glob; Is it like that ?? Thanks you for your answer and have