misc0110/PTEditor

should not define global variable in ptedit_header.h

Closed this issue · 1 comments

ptedit_header.h:
ptedit_paging_definition_t ptedit_paging_definition;

I found there is a global variable defined in .h file, which could cause duplicate definition error if multiple .c file include this .h file.
Hence, It should be defined in some other place.

This is true, but this is why there are 2 different headers: ptedit_header.h is a "single-header library" for small projects. It is not supposed to be included multiple times in the project. If you want to do that, you should use ptedit.h and link with the library.