LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Integrating FlexNet Publisher with CVI

I've been trying to integrate software licensing code from Flexera (FlexNet Publisher) into my application to allow secure licensing (and hence revenue).

 

The API from Flexera relies on several System Libraries. Most of the libraries have been successfully added to my application, but one is causing a problem. The library causing problems is called "oldnames.lib", and causes the below link error:

 

error: Input file does not match the target architecture: c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\oldnames.lib

 

My suspicion is that this library has mangled names. Is there anyway around this problem within CVI?

 

0 Kudos
Message 1 of 3
(2,276 Views)

Hi @nelsonviva,

 

I'm not familiar with that particular error, but typically the target architecture is referring to 64 vs. 32-bit, or even AnyCPU which I know is an option with Windows DLLs.  Do you know what architecture the Flexera library is built for?  I'm guessing 32-bit by the path, but it would be good to check.  Does that match your application?

 

Thanks,

Michael B.
Product Support Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,147 Views)

Thanks for the reply Michael.

 

The Flexera library I'm using is 32 bit. Since originally posting this issue, I've been able to create a DLL using Visual Studio to access the Flexera code from CVI. I also tried creating a static library in Visual Studio so I could add this to my CVI application, but ended up getting the same error as before. Creating a C wrapper within a DLL is the only way around this issue that I've found.

 

As a trial, I did try adding 64 bit libraries to the CVI application to see what error would appear, and CVI can correctly identify them as 64 bit as shown below:

warning: Incompatible input binary. Building 32-bit configuration, but 64-bit binary found: h:\W7Redirects\Desktop\oldnames.lib 

For some reason, the CVI compiler/linker just can't identify what the 32 bit version of oldnames.lib actually is.

0 Kudos
Message 3 of 3
(2,120 Views)