I have 2 different Origin versions (8.5 & 8.6) in 2 different machines. I have some commonly-used functions in abc.c under user system folder (eg. c:\Users\origin\Documents\OriginLab\85\User Files\OriginC\ in 8.5 version). It will be compiled automatically when Origin starts.
I have a header file called abc.h under the same directory. I hard coded the path to include this file in different Origin Project with: #include "c:\Users\origin\Documents\OriginLab\85\User Files\OriginC\abc.h"
If I move the project to a server with Origin 8.6, the above codes won't work. Origin has different system path with different version. How can I use the dynamic path? I tried #include GetOriginPath(ORIGIN_PATH_USER) + "OriginC\abc.h" and it is not working.
Unless I put abc.h under other folder with fixed name (eg. c:\folder123\)
According to your description, you have put the source file and the header file to the same folder, which is the User Files Folder. Then you can just include the file without the file path, such as