LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

type library problem when using external optimizing compiler

I'm building a type library into a DLL I've created using the Intel 9.1 C++ external, optimizing compiler.

When I switched to production mode, compiled (using the Intel compiler) and then tried to build the DLL (with the type library included, and exporting symbols marked for export) I got an error that the first function in my type library was in the FP but it wasn't marked for export (but it was, using DLLSTDCALL DLLEXPORT macros).

I switched over to the native CVI compiler for production mode, and compiled and built the DLL.  No errors.

Then I switched back to the Intel compiler, and recompiled and rebuilt, with no errors (!)

There's some mention in the help file about exported DLL symbols identified in binary files (such as the FP).  But, I need to use the FP to generate the type library so the DLL can be called from Windows.

I've also noticed that if I use a windows defined data type (INT, or LPSTR, which are macros to CVI data types) in an exported function, the DLL build failed, but after recompiling/building with the native CVI compiler in production mode this problem went away as well.

Should I trust the build with the Intel compiler?  The performance improvement with the Intel compiler is dramatic - I'd sure like to be able to use it as NI advertises.

Menchar


0 Kudos
Message 1 of 4
(3,447 Views)
Hi menchar,

Just to note, NI LabWindows/CVI provides environment-wide compiler configuration templates for Intel C++ 8.1 and Intel C++ 9.0.  Not sure if this makes a difference but I've yet to reproduce the behavior you described.  Can you post the exact message (a screenshot would be preferred)? I will talk to R&D to see if this version of the compiler has been validated.

Have a great day,

Ecleamus R.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(3,408 Views)
Can't easily reproduce this, I'm not sure of the exact sequence of events.  I may have been editing the instrument front panel while in release mode, then tried compiling the application in release mode.   Something repaired itself when I went back to the native CVI compiler and compiled in release mode, then switched back to the Intel compiler.

I am using the newest Intel compiler at this point, 10.0.025.  I created new configurations (.ecc files) for the 9.1 and the 10.0 Intel C++ compilers, both seem to work, save for the error I've mentioned.  The only trick to getting the Intel compilers to work I've found so far is to include the Intel C library libirc.lib in the project.  The ecc file doesn't capture this dependency apparently.

Speaking of the front panel, how do I specify a two dimension array of chars as a parameter for a function?  i.e. char  array[ ][ ]

A multiply dimensioned array type is not offered as a parameter type when constructing a front panel.


0 Kudos
Message 3 of 4
(3,398 Views)
Hi menchar,

It sounds like there's more to it than what I've been able to test on my end especially since I've yet to reproduce it on my send.  Whatever you can provide in terms of steps, files, etc. to reproduce will help greatly.

As for your question about 2D arrays as inputs for your function panel, you can specify the Data Type of the input as a char pointer (char *).  This implies that you will need to allocate the necessary memory either before calling the function or inside the function.  Here's another discussion that addresses the former case which is required to use our analysis functions.

Have a great day,

Ecleamus R.
0 Kudos
Message 4 of 4
(3,374 Views)