LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with inifile.c in CVI 2010 project

I upgraded to CVI 2010 today. I was using 2009. In my project I have included inifile.c in my project. The file is located in the CVI2010 toolbox directory. I used this in CVI 2009 and did not have a problem. When I compile I get a bunch of link errors "Undefined symbol". Some of the symbols it has a problem with are ConvertDataToText, AppendString, StrDup, FileExists, ... there are many more.

 

My question is why are these linking errors coming up in CVI 2010?

 

I would imagine I need to add another source file to my project or something like that.

0 Kudos
Message 1 of 4
(3,269 Views)

The commands you list are not part of the IniFile file: they are part of the Programmer's Toolbox, instead, which is linked to by the IniFile instrument.

There probably has been some misalignment between the files you are using during the conversion between CVI2009 and 2010.

 

It is to be noted, though, that you could avoid directly using inifile.c source file: loading inifile.fp instrument, either via the Instrument menu or loading it in the Library menu guarantees that the correct environment is loaded and used for compilation.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 4
(3,257 Views)

That is what I did after I posted this message. I think I will always load the fp files from the toolbox from now on. I think it is probably the smartest way to go.

 

Thanks for your response to my post.

0 Kudos
Message 3 of 4
(3,249 Views)

It's true that using .FPs is the best way to go.

 

As I told you, an instrument driver can be loaded in Instrument menu or in the Library menu. If loaded in Intrument menu, to have it loaded automatically when you open a project you must add the .fp to the project itself; operating this way, every time you open a project it will recompile the instrument, which can be annoying and is a waste of time. On the other hand, if the instrument has an object file (which is the case of IniFile and all instruments shipped with CVI) you can load it in the library menu (Library >> Customize and add it to the list) and have it ready for use with no time spent on it.

 

I personally have loaded in the library collection a set of general-use instrument that I happen to use in almost all my projects (IniFile, Programmer's Toolbox, Password control and a library with my own utilities) and only use the instrument menu for instruments very specific to one or a few projects (e.g. the driver for some external device I use in a project)



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 4
(3,241 Views)