09-07-2005 01:54 PM
09-07-2005 03:23 PM
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[]);
03-08-2011 09:38 AM - edited 03-08-2011 09:40 AM
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?
03-16-2011 10:40 AM
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.
03-16-2011 10:54 AM
03-16-2011 11:10 AM
windows.h
put it at top of your includes
03-16-2011 11:38 AM
03-16-2011 11:50 AM
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.
05-17-2011 08:55 AM
So am I to gather that the utility.h and/or the MakeDir method is not RT safe? Is this why it does not work?
05-18-2011 03:36 AM
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