LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Missing SetRingItemAttibute from Linux version

Hello all,

I believe this is a bug in CVI.

I can compile but not link programs that use the function SetRingItemAttribute(). Obviously other user interface functions work fine. I'm using CVI for Linux 13.0.0.30, and the documentation for that functions says that it's been in CVI since version 2012. The function is present in the userint.h installed on Linux, but absent from the various libcvi.so libraries.

Patch ? Workaround ?

0 Kudos
Message 1 of 17
(4,088 Views)

gdargaud,

 

I was looking into this, but did not find any documentation of this behavior occurring before. With that, I was of course not able to find a workaround or patch yet either. The best way to continue forward with this is for me to recreate the behavior to verify if this is in fact a bug. In recreating it, I can investigate whether we have any viable workarounds. 

 

Could you please provide me with the exact steps you are following when you come across this behavior? I would like to be able to recreate this as accurately as possible. Please include your code as well, prefereably a stripped down version that is the smallest recreatable case of the misbehavior. I'll see if I can reproduce it and continue forward accordingly.

 

Note, if you don't want your code shared on a public forum, you can submit a bug report via this link

 

Regards,

Will - Applications Engineer

0 Kudos
Message 2 of 17
(4,059 Views)

Hello Willy,

the following program compiles and runs fine on Windows, but on Linux you get:

$ cvicc TestRing.prj 
Building Release configuration of /tmp/TestRing.prj
Compiling /tmp/TestRing.c
Link TestRing.exe
/tmp/cvibuild.TestRing/Release/TestRing.o: In function `main':
TestRing.c:(.text.startup+0x10a): undefined reference to `SetRingItemAttribute'
collect2: error: ld returned 1 exit status
Build failed.
0 Kudos
Message 3 of 17
(4,022 Views)

gdargaud,

 

I looked into this a little more, I think there may be a way to include necessary libraries at compile time. What are you entering into the command line to compile this on your Linux system?

Also, I haven't had the chance to look myself, but are there any other functions in your code from the User Interface Library? Basically, anything on this list: http://zone.ni.com/reference/en-XX/help/370051V-01/cvi/uiref/cviuser_interface_library_function/

If so, do you get the same errors with those functions or not?

 

-Will

 

0 Kudos
Message 4 of 17
(4,006 Views)

OK, I took the whole list from that page and compiled it on Linux. Here are the results.

Simple typos on the page:

GetNumTableCellRingItems instead of GetNumTableCellRingsItems
DiscardNumericColorRamp instead of DiscardColorRamp
GetCVIWindowHandleForCurrThread instead of GetCVIWindowHandleforCurrThread

 Missing from header file (doesn't compile):

MinimizeAllWindows

Windows specific functions (I guess):

RegisterWinMsgCallback
UnRegisterWinMsgCallback
GetCVIWindowHandle
GetCVIWindowHandleForCurrThread
NewActiveXCtrl
NewActiveXCtrlFromFile
GetObjHandleFromActiveXCtrl
GetActiveXCtrlFromObjHandle
DSBindCtrl
DSBindPlot
DSBindTableCellRange
DSUnbind
DSGetBoundPlotID

Functions present in the headers file and documentation but missing from the library files (linker error):

 

GetRingItemAttribute
SetRingItemAttribute
GetTreeCellRingItemAttribute
SetTreeCellRingItemAttribute
GetTableCellRingItemAttribute
SetTableCellRingItemAttribute
GetRealFontTypefaceNameLength
GetRealFontTypefaceName

 

Message 5 of 17
(3,992 Views)

Gdargaud,

 

 Are you compiling this for a 32-bit or 64-bit system?

 

I think it would be a good idea to focus on the Windows specific function and it is curious that they're missing. There might be some manual libraries we might be able to add but I think the system architecture would be helpful before going down that route.

 

 

Regards,

Ali S.
Applications Engineering
National Instruments
0 Kudos
Message 6 of 17
(3,954 Views)

It's perfectly normal for the Windows-specific functions to be missing on Linux, and it's documented that way. But the last list of functions I provided are NOT documented as missing on Linux, and are only user-interface related, so I don't see why they should be missing. And I need them !

I'm using Scientific Linux 7.2, 64-bits, but CVI is 32 bits anyway.

0 Kudos
Message 7 of 17
(3,943 Views)

Gdargaud,

 

 I think the best next step would be for me to replicate Scientific Linux 7.2 64-bits with CVI and see if I can replicate your behavior.

 

Is there anything else I should know when trying to do so?

 

I plan on making a fresh install and then running the TestRing.prj that you attached.

Regards,

Ali S.
Applications Engineering
National Instruments
0 Kudos
Message 8 of 17
(3,926 Views)

Do you mean if you try that function on an older or 32-bits SL, it works ? Here's the complete code to test all the functions. And the results:

$ cvicc TestRing.prj 
Building Release configuration of /tmp/TestRing.prj
Compiling /tmp/TestRing.c
Link TestRing.exe
/tmp/cvibuild.TestRing/Release/TestRing.o: In function `main':
TestRing.c:(.text.startup+0xfe): undefined reference to `SetRingItemAttribute'
TestRing.c:(.text.startup+0x35d): undefined reference to `GetRingItemAttribute'
TestRing.c:(.text.startup+0x365): undefined reference to `SetRingItemAttribute'
TestRing.c:(.text.startup+0x4ad): undefined reference to `GetTreeCellRingItemAttribute'
TestRing.c:(.text.startup+0x4b5): undefined reference to `SetTreeCellRingItemAttribute'
TestRing.c:(.text.startup+0x94d): undefined reference to `GetTableCellRingItemAttribute'
TestRing.c:(.text.startup+0x955): undefined reference to `SetTableCellRingItemAttribute'
TestRing.c:(.text.startup+0xe6d): undefined reference to `GetRealFontTypefaceNameLength'
TestRing.c:(.text.startup+0xe75): undefined reference to `GetRealFontTypefaceName'
collect2: error: ld returned 1 exit status
Build failed.
0 Kudos
Message 9 of 17
(3,915 Views)

So, is this confirmed as a bug and will there be a fix on the next version ? BTW, when is the next Linux version of CVI due ? It's been over 3 years now...

0 Kudos
Message 10 of 17
(3,823 Views)