03-17-2010 11:24 AM
Hi,
I'm writing an application (OK technically a DLL but whatever) to run on a CVI Realtime controller.
I want to use both the list functionality (ListCreate, etc.) from toolbox.h and the ini file functions (Ini_New, etc.) from inifile.h.
I've added toolbox.fp and inifile.fp to my library list using: Customise Library Menu -> browse, but when I hit Run or Build -> Create Debuggable DLL I get 130 odd link errors. Here's a few examples:
Undefined symbol '_MenuIsOpen' referenced in "toolbox.obj".
Undefined symbol '_GlobalMemoryStatus@4' referenced in "toolbox.obj".
Undefined symbol '_GetComputerNameA@8' referenced in "toolbox.obj".
Undefined symbol '_GetUserNameA@8' referenced in "toolbox.obj".
Undefined symbol '_GetVersionExA@4' referenced in "toolbox.obj".
Undefined symbol '_DeleteDC@4' referenced in "toolbox.obj".
Undefined symbol '_DeleteObject@4' referenced in "toolbox.obj".
Undefined symbol '_GetDIBits@28' referenced in "toolbox.obj".
Undefined symbol '_DefWindowProcA@16' referenced in "toolbox.obj".
Undefined symbol '_CallWindowProcA@20' referenced in "toolbox.obj".
Undefined symbol '_GetKeyboardType@4' referenced in "toolbox.obj".
Undefined symbol '_CreatePopupMenu@0' referenced in "toolbox.obj".
Undefined symbol '_DestroyMenu@4' referenced in "toolbox.obj".
Undefined symbol '_GetMenuItemCount@4' referenced in "toolbox.obj".
Undefined symbol '_TrackPopupMenu@28' referenced in "toolbox.obj".
Undefined symbol '_InsertMenuItemA@16' referenced in "toolbox.obj".
Undefined symbol '_GetMenuItemInfoA@16' referenced in "toolbox.obj".
Undefined symbol '_SetMenuItemInfoA@16' referenced in "toolbox.obj".
Undefined symbol '_GetMenuDefaultItem@12' referenced in "toolbox.obj".
...
Can anyone tell me where I'm going wrong with this please?
Thanks.
Adam.
03-17-2010 11:37 AM
#include <inifile.h>
03-17-2010 12:04 PM
I can be pretty stupid sometimes but I did remember to add the #include <inifile.h> line to my code.
CVI automatically added #include "toolbox.h" to all of the files I use ListType in.
03-17-2010 12:34 PM
03-19-2010 10:43 AM
Hi Adam,
Unfortunately, the Programmer's Toolbox isn't yet supported in CVI Real-Time. I'm sorry that you didn't get a more informative message than simply a bunch of link errors.
However, off the top of my head, I can't think of any reason why the functions you want to use (ListCreate, etc...) couldn't work. Therefore, a possible workaround, although a bit messy, would be for you to copy and paste only the functions that you need to use from toolbox.c into your own souce code.
Luis
03-19-2010 11:06 AM
Thanks for the reply Luis.
Not the answer I was hoping for but I had a suspision it might be the case. Could really do with NI sorting this out. It's a bit of a let down that CVI Real-Time is not as polished as it first looked.
In the mean time I think I shall do as you suggest and see how easy it is to copy the functions I want without all the other fluf coming with it.
Adam
04-28-2010 05:23 PM
LuisG wrote:Hi Adam,
Unfortunately, the Programmer's Toolbox isn't yet supported in CVI Real-Time. I'm sorry that you didn't get a more informative message than simply a bunch of link errors.
However, off the top of my head, I can't think of any reason why the functions you want to use (ListCreate, etc...) couldn't work. Therefore, a possible workaround, although a bit messy, would be for you to copy and paste only the functions that you need to use from toolbox.c into your own souce code.
Luis
Is this ever planned to be supported by CVI Real-Time? I figured that by using NI's own libraries that I was safe to port my code to real-time but am frustrated to find out that isn't the case.
04-29-2010 10:41 AM
However, both of you make a good point about the completeness of the real-time module. The distinction between standard CVI libraries and other libraries is increasingly blurry, so this is becoming somewhat of a spurious distinction. And since we are receiving specific requests for this, we'll definitely go ahead and raise the priority.
Luis
04-29-2010 12:46 PM
04-29-2010 12:48 PM
I did the same for the Ini file functions. These need the List files.