LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

cvi executable size

I have a project with 11 subroutines that compiles to a 354KB executable.  Created a 'lite' version of the same eliminating much of the functionality and subroutines, but now this compiles to 622KB.  Both projects have the same build settings.  Any ideas what might trigger the executable growth? All array variables are allocated dynamically. It does use a different uir, but only 8KB.
0 Kudos
Message 1 of 5
(3,481 Views)

Do you have the same target settings as well?

 

If the "lite" project embeds the UIR in the executable and the "heavy" one doesn't that could explain it.

 

Menchar

0 Kudos
Message 2 of 5
(3,475 Views)

Are you sure both are release versions?

As you might already know, debug versions of CVI executables are significantly larger than release versions.

 

If you made extensive use of macros (instead of function calls) in that lite version, that may also increase the size.

Since macros replaced by their code equivalent before compilation they increase the actual code size.

Message Edited by ebalci on 13-02-2010 11:34 AM
S. Eren BALCI
IMESTEK
0 Kudos
Message 3 of 5
(3,463 Views)

I saw an enormous increase in exe size (~200K) as a result of my including a single call to a simple CVI toolbox function. (FileExists(), IIRC) It appeared that CVI then incorporated all the toolbox functions (there are a lot...) into my exe.

 

Then again, hard drives are pretty big these days, so why worry about it?

 

JR

0 Kudos
Message 4 of 5
(3,437 Views)

Found the issue

 

I was using the toolbox function Pi().  Replaced it with a #define for pi and it reduced the exe by 300k.

0 Kudos
Message 5 of 5
(3,415 Views)