LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

2 questions about CVI 2010 under Linux

Bonjour

I did some test with CVI 2010 under Linux today

 

Q1 - Do you confirm release & debug version of a project yield an application with always the same size?

 

 

cvicc  demo.prj -lnidaqmx => demo (size=146.8 KB)

cvicc demo.prj -lnidaqmx -debug => demo_dbg (size=146.8 KB)

 

cvicc demo.prj -lnidaqmx -config="Release" => demo (size=146.8 KB)

cvicc demo.prj -lnidaqmx -config=Release => demo (size=146.8 KB)

cvicc demo.prj -lnidaqmx -config="Debug" => demo_dbg (size=146.8 KB)
cvicc demo.prj -lnidaqmx -config=Debug => demo_dbg (size=146.8 KB)
The demo.prj is a CVI 2010 Windows project.
Surprise, surprise I was able to use gdb and step thru the "Release" version.
So, until now it seems I only generate a Debug version
I checked the content of the compile.ecc in /usr/local/natinst/cvi2010/bin and I can see optional flags for Debug & Release version (I don't know however if they are used)
Any idea of what I'm doing wrong?

 

 

 

Q2 - Do you confirm under Linux it is not possible to embed the UIR inside the compiled application?

 

Opening the above demo.prj with a text editor I can see 

 

In sections

[Default Build Config Release] and [Default Build Config Debug]

 

The following statement

Embed Project .UIRs = True

 

However, compiling the project and renaming the UIR file (demo.uir.bak) before to run the application I get a runtime error.

 

Regards, Philippe

 

Regards, Philippe proud to be using LabWindows since version 1.2
// --------------------------------------------------------------------------------------------
0 Kudos
Message 1 of 7
(3,476 Views)

> Fell free to visit the CVI Rebel Site

 

Page introuvable

--
Martin
Certified CVI Developer
0 Kudos
Message 2 of 7
(3,461 Views)

Bonjour

1 - I updateted my signature. Indeed the CVI Reble Site in moving to another host.

 

2 - Could someone confim that the "Conform to system colors" check boxe on the panel is not working under Linux?

I did'nt make a test where I call the SetPanelAttribute directly from the code

However, changing the Windows appearance of the Windows system (gnome) have no impact on the content of the window. The border and the 3 controls in the tittle bar changed however.

 

3 - Regarding the compilation, here are the results of the tests I didt oday

Compiling the project with my own makefile, I'm now able to create both release and debug versions

Now the size of the application is very small in both versions

Yesterday it was around 146 kB now it is just 8 kB and I'm able to use gdb to debug the debug version

Here is the content of my makefile :

 

 

SHELL = /bin/sh

CC=gcc

LIBS = -lcvi
LIBS += -lnidaqmx

INCLUDE = -I/usr/local/natinst/cvi2010/include

#CFLAGS = -g
#CFLAGS = -O2
#CFLAGS = -W -Wall -ansi -pedantic
CFLAGS = -W -Wall
#CFLAGS = -c -x c -m32

LINKFLAGS = -rdynamic -m32

TARGET = demo

src=$(wildcard *.c)
OBJ = $(SRC:.c=.o)

all: $(TARGET)

demo: $(OBJ)
    $(CC) -o $@ $^ $(LIBS) $(LINKFLAGS)

demo.o: demo.h

%.o: %.c
    @$(CC) -o $@ $(CFLAGS) -c $<  $(INCLUDE)

.PHONY: clean mrproper

clean:
    @rm -f *.o

mrproper: clean
    @rm $(TARGET)

 

Regards, Philippe

Regards, Philippe proud to be using LabWindows since version 1.2
// --------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 7
(3,453 Views)

Hello, Philippe

 

1. You're correct. There is a bug in the 2010 Linux version of the command-line compiler (cvicc) which is causing it to build all binaries with debug info. This will be fixed and there should be a patch available soon. In the meanwhile, as a workaround, you can edit /usr/local/natinst/cvi2010/bin/compile.ecc and set the "Debug Opt" field to "-O2" whenever you want to build a release binary with cvicc. And then set it back to "-g" when you want to build a debug binary.

 

2. The CVI system colors in Linux are hardcoded to a set of fixed colors. There is not support in the Linux module for the various window managers.

 

3. Embedding .UIRs is a feature of the CVI ADE. It is not applicable to the Linux module. Yes, that option is saved in the project file because there is only project file that is used in both Windows and Linux. But this doesn't mean that all the options defined within the project file are available in Linux.

 

Cheers,

Luis

0 Kudos
Message 4 of 7
(3,404 Views)
cvicc has finally been updated since version 8.1 ?
Awesome, but where can I get it, I can't find any info on ni.com ?
--
Guillaume Dargaud
http://www.gdargaud.net/
0 Kudos
Message 5 of 7
(3,370 Views)

A patch has been created to address the bug that prevents cvicc from creating release binaries.  The patch is available for download here.

 

I'm sorry for any inconvenience this bug has caused -

 

NickB

National Instruments

 

PS - Guillaume, you can order the new version of the module here.  Is there other information you are looking for?

0 Kudos
Message 6 of 7
(3,356 Views)

> PS - Guillaume, you can order the new version of the module <a
> href="http://sine.ni.com/nips/cds/view/p/lang/en/nid/203157 "
> target="_self" rel="nofollow">here</a>.&nbsp; Is there other information
> you are looking for?

Thanks. The order is in the mail... Should be getting the license any time
now.
--
Guillaume Dargaud
http://www.gdargaud.net/

0 Kudos
Message 7 of 7
(3,328 Views)