Creates a new directory based on the specified directory name.
Note: Only one directory can be created at a time.
/*-------------------- Prototype ---------------------*/
int MakeDir (char Directory_Name[]);
This seems really straight forward, but for some reason adding a call to MakeDir gives this error when I compile:
Undefined symbol '_MakeDir@4' referenced in "report.c"
However, I have included utility.h. So I'm not sure what the problem is. Also, the project is real-time only. Any ideas?
Maybe CreateDirectoryA might work (according to http://zone.ni.com/reference/en-XX/help/370051K-01/cvirtmodulehelp/windowssdkfuncsinrt/ this function should be available in RT)
For parameter definition see windows sdk help.
in CVI: Help/Windows SDK
What i forgot to say: you must have Windows SDK installed with CVI.
Here an extract:
BOOL CreateDirectory(
LPCTSTR lpPathName, // directory name
LPSECURITY_ATTRIBUTES lpSecurityAttributes // SD
);
You can set lpSecurityAttributes to 0 for RT systems.
I don't know if it is safe or not. I only know that this function is not contained in the RT library.
Maybe a National Instruments representative can answer this question.
In the meantime you can use the SDK funktion.
... and while there is a workaround there is no need to change anything ![]()