Home > Software engineering > How to MFC dialog box packaging into static library lib, header files, and how to call?
How to MFC dialog box packaging into static library lib, header files, and how to call?
Time:09-19
I'd like to make a dialog box packaging into static LIB, not all dynamic DLL project!!!!! Dynamic library is static library project, I have achieved, but not too corresponds with my needs, I don't think all compiled into EXE with DLL, static lib project I also make a success, but don't know how to go to the header file to write, what's the extern "c", and the insides of the so called the lib
CodePudding user response:
Static library just like own code, header files can use the include came in
CodePudding user response:
Static library is put you in the library header files and lib together in another project, and other places include the header file can call a function, etc
CodePudding user response:
Put in a header file function declarations, do you want to add extern "C" is the function that you generate lib have add, If the lib is C code generated, h plus EXTERN_C best this is the macro Windows header files, is equal to blank in C, C + + is equal to the extern "C", or your own written like this: # ifdef __cplusplus Extern "C" # endif If the lib is the C + + code generation, function of h is generally do not need to add extern "C", consistent with the implementation of CPP files can, Then contains the h file, add contains the project Settings (header) and libraries directory can be used,
CodePudding user response:
Static library is essentially a piece of code
CodePudding user response:
# pragma comment (lib, "XXX. Lib")
CodePudding user response:
Upstairs said a lot of, pass by pass by!
CodePudding user response:
Why are in response to "how to use static library", the problem was "how to create a static library (interface)"