From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I need 'libc.lib' when I compile my program that uses Switch Executive's API in Visual studio 2005?

Hi there,

I'm just getting started with learning Switch Executive's API. I followed the "Getting Started->Using NI Switch Executive in Visual C++" instructions in the documentation, but when I tried to compile my simple C++/CLI program:

 

#include "stdafx.h"
#include "nise.h"

using namespace System;

int main(array<System::String ^> ^args)
{
    NISESession mySess;
    niSE_OpenSession("myDevice", "",  &mySess);
    return 0;
}

 

I get a linker error: fatal error LNK1104: cannot open file 'libc.lib' 

 

I looked up the error and the file and it turns out libc.lib is an older runtime library from visual studio 2003. And it is no longer used in VS2005 projects.  I checked my project settings and they are all set to use the /MDd "Multi-threaded Debug DLL runtime library. I don't think I even have a copy of libc.lib on my computer. Do I need to go and download it from somewhere in order to link with NISE?

 

Thanks for the help,

Eric 

0 Kudos
Message 1 of 2
(9,487 Views)

Aha, I think I found a workaround: add "libc.lib" to the ignore specific library property under Project Proeprties->Linker->Input->IgnoreSpecific Library. Hope this helps someone else.

 

Eric 

0 Kudos
Message 2 of 2
(9,485 Views)