How to compile and link the LabView program(G) with some function written in C?

Before, some employee in our company developed some program which was written in LabView (G). Now we want to add some new function with has already been done in C++. Can we combine them together? how to do it?

Hi;
To use external code in LabVIEW, you can create a dynamic link library (.dll) that you can call from LabVIEW or a Code Interface Node (CIN). The instructions on how to make any of those are in National Instruments manual Using External Code in LabVIEW, which is included with LabVIEW, or you can download it from NI website.
Also, in the knowledge base there is a "External Code for LabVIEW - CIN / DLL - Starting Point" page.
If, on the contrary, you want to use LabVIEW code on your C application, you can build dll's in LabVIEW. Depending on your version of LabVIEW, you may need Application Builder to do so.
Of course, you can also use other techniques like, for example, making that your LabVIEW application save the data in a file and then your C++ application read the file and continues from there, or vice versa. You can also use the "System Exec.vi" in LabVIEw to do that, assuming your C code is an executable.
Regards;
Enrique
www.vartortech.com

Similar Messages

  • How to compile and link a C program that uses the FSEvents framework

    I've been trying to compile a program from the command line that uses the FSEvents framework. I can compile and link the code in Xcode and it runs correctly.
    At the moment I have the following command line:
    cc -Wall -g -o Watcher *.c -framework CoreFoundation -framework FSEvents
    I'm running Snow Leopard and noticed that FSEvents is not in the Frameworks directory under /System/Library as it was in Leopard.
    The link error is:
    ld: framework not found FSEvents
    collect2: ld returned 1 exit status

    I'm not sure what the point is if it builds in Xcode, but the build log should show you every command it uses throughout the process--copy and paste.

  • Using GCC on SunSolaris2.8 to compile and link sample OCI programs

    Hi,
    Does anyone have sample make file (or modified version of demo_rdbms.mk) or command to compile and link OCI demo programs using gcc?? I am trying to compile and link cdemo81.c from rdbms/demo directory.
    gcc related files are under /usr/local/bin and /usr/local/lib, /us/local/lib/gcc-lib/sparc-sun-solaris2.8/3.1
    Thanks

    Hi,
    I finally got cdemo81.c to compile and link on Solaris 8 using Oracle 8.1.7.3. I got some help from one other person who had posted similar question on this forum. Following is the makefile that I am currently using to compile my oci code. Please note that you need to have $(ORACLE_HOME) and LD_LIBRARTY_PATH set before you try to compile using gcc.
    ************** Makefile Starts here ***********************************
    CPP=g++
    CC=gcc
    LD=ld
    CCFLAGS= -g
    CPPFLAGS=-g3 -Wall
    INCDIR=-I$(ORACLE_HOME)/rdbms/demo -I$(ORACLE_HOME)/rdbms/public -I$(ORACLE_HOME)/plsql/public -I$(ORACLE_HOME)/network/public
    LIBNAME=liboralib
    SOEXT=.so
    DLLINK=-shared -ldl
    ###SOFLAGS=-shared -Wl,-expect_unresolved -Wl,-soname,$(LIBNAME)$(SOEXT) $(LIBPATH)
    SOFLAGS=-shared -Wl
    LDFLAGS=-shared -expect_unresolved * -soname
    LIBPATH=-L$(ORACLE_HOME)/lib/ -L$(ORACLE_HOME)/rdbms/lib/ -R$(ORACLE_HOME)/lib/ -R$(ORACLE_HOME)/rdbms/lib/
    ORALIBS= -lnbeq8 -lnhost8 -lnus8 -lnldap8 -lldapclnt8 -lnsslb8 -lnoname8 -lntcp8 \
    -lntcps8 -lnsslb8 -lntcp8 -lntns8 -ln8 -lnl8 -lnro8 -lnbeq8 -lnhost8 -lnus8 \
    -lnldap8 -lldapclnt8 -lnsslb8 -lnoname8 -lntcp8 -lntcps8 -lnsslb8 \
    -lntcp8 -lntns8 -ln8 -lnl8 -lclient8 -lvsn8 -lcommon8 -lgeneric8 \
    -lmm -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 -lnbeq8 -lnhost8 -lnus8 -lnldap8 \
    -lldapclnt8 -lnsslb8 -lnoname8 -lntcp8 -lntcps8 -lnsslb8 -lntcp8 \
    -lntns8 -ln8 -lnl8 -lnro8 -lnbeq8 -lnhost8 -lnus8 -lnldap8 -lldapclnt8 \
    -lnsslb8 -lnoname8 -lntcp8 -lntcps8 -lnsslb8 -lntcp8 -lntns8 -ln8 \
    -lnl8 -lclient8 -lvsn8 -lcommon8 -lgeneric8 -ltrace8 -lnls8 -lcore8 \
    -lnls8 -lcore8 -lnls8 -lclient8 -lvsn8 -lcommon8 -lgeneric8 -lnls8 \
    -lcore8 -lnls8 -lcore8 -lnls8 -lnsl -lsocket -lgen -ldl -lsched \
    -lc -laio -lposix4 -lkstat -lm -lthread -lwtc8
    LIBS=$(ORACLE_HOME)/rdbms/lib/defopt.o $(ORACLE_HOME)/lib/sscoreed.o $(ORACLE_HOME)/lib/libclntsh.so $(ORACLE_HOME)/lib/nautab.o $(ORACLE_HOME)/lib/naeet.o $(ORACLE_HOME)/lib/naect.o $(ORACLE_HOME)/lib/naedhs.o $(ORALIBS)
    ##LIBS=$(ORACLE_HOME)/rdbms/lib/defopt.o $(ORACLE_HOME)/lib/sscoreed.o $(ORACLE_HOME)/lib/nautab.o $(ORACLE_HOME)/lib/naeet.o $(ORACLE_HOME)/lib/naect.o $(ORACLE_HOME)/lib/naedhs.o $(ORALIBS)
    ###LIBS=$(ORACLE_HOME)/rdbms/lib/ssdbaed.o $(ORACLE_HOME)/lib/nautab.o $(ORACLE_HOME)/lib/naeet.o $(ORACLE_HOME)/lib/naect.o $(ORACLE_HOME)/lib/naedhs.o $(ORALIBS)
    ORALIBSO=-lnetv2 -lnttcp -lnetwork -lncr -lclient8 -lvsn -lcommon8 -lgeneric8 \
    -lmm -lnlsrtl3 -lcore8 -lnlsrtl3 -lcore8 -lnlsrtl3 -lnetv2 -lnttcp \
    -lnetwork -lncr -lclient8 -lvsn -lcommon8 -lgeneric8 -lepc -lnlsrtl3 \
    -lcore8 -lnlsrtl3 -lcore8 -lnlsrtl3 -lclient8 -lvsn -lcommon8 -lgeneric8 \
    -lnlsrtl3 -lcore8 -lnlsrtl3 -lcore8 -lnlsrtl3 -lnsl -lm -ldl -lm \
    -ldl -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr \
    -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr \
    -lnetv2 -lnttcp -lnetwork -lncr -lsql
    ###-lnbeq8 -lnhost8 -lnus8 -lnldap8 -lldapclnt8 -lnsslb8 -lnoss8 -lnoname8 -lntcp8 \
    #ORALIBS=-lnetv2 -lnttcp -lnetwork -lncr -lclient8 -lvsn -lcommon8 -lgeneric8 \
    # -lmm -lcore8 -lnlsrtl3 -lepc -lnsl -lm -ldl
    CPPOBJECTS=orabase.o orastmt.o
    HEADER=orabase.h orastmt.h
    .SUFFIXES: .cc .c
    ###.c.o:
    ###     $(CC) $(CCFLAGS) $(INCDIR) -o $@ -c $<
    .cc.o:
         $(CPP) $(CPPFLAGS) $(INCDIR) -o $@ -c $<
    #lib: $(CPPOBJECTS) $(HEADERS)
    #     $(CPP) $(CPPFLAGS) $(SOFLAGS) $(LIBPATH) -o $(LIBNAME)$(SOEXT) $(CPPOBJECTS) $(LIBS)
    #clean:
    #     $(RM) *.o core *~
    #distclean: clean
    #     $(RM) $(LIBNAME)$(SOEXT) so_locations
    ###ocimanager:     ocimanager.o
    ###     $(CC) -o $@ $(LIBPATH) $(LIBS) $<
    ocimanager.so: ../obj/ocimanager.o
         $(CC) $(LIBPATH) -o ocimanager.so -G ../obj/ocimanager.o $(LIBS)
    ##     gcc -L$(ORACLE_HOME)/lib/ -L$(ORACLE_HOME)/rdbms/lib/ -o ocimanager.so -G ../obj/ocimanager.o $(LIBS)
    ../obj/ocimanager.o: ocimanager.c ocimanager.h
         $(CC) $(CCFLAGS) $(INCDIR) -o ../obj/ocimanager.o -c ocimanager.c
    **************** Makefile ends here*********************************************
    Hope this helps
    Brunda

  • How to compile and run PRO*C programs in Linux

    Hi all,
    This is my first post in this forum.
    I have Oracle 9i installed in linux platform .
    How can i compile and run Pro*C programs in linux.(i mean any commands or procedure to run these programs)
    please help me in this regard.
    Thanks in advance,
    Trinath Somanchi,
    Hyderabad .

    (1) How to compile the Pro*c program U got to have a makefile to compile a Pro*c program. It helps u in compiling and creating an excutable. Once U have created a makefile , just call "make" and it will do the compilation and create the executable as well.
    For a sample makefile visit
    http://asktom.oracle.com/~tkyte/proc_makefile/
    (2) How to run the Pro*c program ? and Once U have created an executable, U shall call that directly as any other linux command. Make sure U have the permissions to run the executable. If not give the permissions using chmod 777 executable
    (3)How to get the output of the program ?Question 2 and 3 are the same. I mean running and getting a output are the same

  • How to compile and run a java program?

    I am getting this error message, what to do?
    Exception in thread "main" java.lang.NoClassDefFoundError:
    Thanks for you help.
    Ajay

    Hello,
    I believe that this error is caused because when you
    compile and run a java program, you have to use the
    same name that is next to public class. For example,
    the program name is next to the word public class.
    For example, if a program began like this:
    public class Concat
    then the name of the program in this case is Concat
    and when you compile it you type: javac Concat.java
    when you run it type: java Concat
    depending on the name of your program.and depending on whether the class is in a package. And depending on what directory you are currently in.
    Also depending on if you set your class path you might
    have to type the above like this: jdk1.2.1\bin\javac
    Concat.java to compile, and to run you would have to
    type jdk1.2.1\bin\java Concat where you would replace
    Concat with the name of your program and replace
    jdk1.2.1 with the name of your version of java, that
    is again if you do not have your classpath set. Hope
    this helps.Your examples have nothing to do with whether the CLASSPATH is set--only with whether the PATH is set. And, it may not be jdkXXX\bin. The path to the JDK (in this case, to javac and java executables) could be anything. Classpath should be set on the command line. The OP probably did NOT set a classpath on the command line (preferred), or in the environment variables.
    Also, make sure you did not forget to put:
    public static void main(String[ ] args)
    on the line underneath the line where it says "public
    class Concat" where Concat is the name of your
    program. Again, I hope this helps.Irrelevant (with the info we have from the OP so far). The error says that the JVM can't even find the class--not that the class doesn't have a main. The "main" referred to in the error message is within the JVM itself.
    OP: Did you fix your problem? If not, what directory are your files in? Are they in a package? What command are you typing to get that error? That is, please tell us your entire command line.

  • How to compile and run the servelt

    how to the compile and run the servlet programmes and how should i deploy them
    and is there any site for the tomcat server free download

    your first question is too general. you'll need a tutorial a Hello World on a servlet...google it.
    for the second one go to [http://tomcat.apache.org]

  • How to compile and register a Java CFX tag with multiple class files?

    All-
    If this is the wrong forum for CFX questions, please let me
    know.
    I need to determine how to compile and register a Java CFX
    tag that contains multiple class files. One class file implements
    the CustomTag interface and the other class files implement various
    supporting classes. All of the documentation that I have found
    talks about using a single class file. I am assuming that a JAR
    file will be involved, but I am not sure of the specifics.
    Thanks in advance for your help.
    -Josh

    Yes, it will involve a jar. Use your java IDE (eclipse,
    etcetera ..) to create a jar containing all of the classes. Check
    your ide's documentation for how to create jar files. After you
    have created the jar, place the jar in the CF class path so CF will
    recognize it. For example the {cf_root}/WEB-INF/lib directory. CF
    must be restarted before it will detect the new jar. After
    restarting CF, register the CFX tag in the ColdFusion Administrator
    using the name of the class that implements the CustomTag
    interface.
    Though it is worth noting you can also instantiate java
    classes directly from ColdFusion (ie without using a CFX
    tag).

  • How to compile and run a matlab program?

    Hi,
    I have a college matlab code that i want to compile and run and take an output of. Can anyone guide me with this in xcode?
    Neerav

    Hi,
    I already googled it and went through that website before posting here and as you can see the software is paid. And thats exactly why I asked in my original post as to whether there is a way to do it with xcode.
    And the idea that xcode might be of any help too came after some experimentation. I double clicked the .m file and it opened in xcode. So I guess there must be a way to compile and run it too.
    Thanks for you recommendation anyway.
    Neerav Kothari

  • How to compile and run package programs in Java

    Hi,
    I want to know how to compile and run the package programs in Java using -d. instead of creating the package folder manually.
    eg:
    package Test;
    class test1
    public void disp()
    //Any code;
    I want to compile this without creating the folder ' Test ' manually. that is if we use -d with javac the Test folder will be created automatically. I need the format of -d
    could anyone please help me.
    Thanks in Advance ,
    Ambika

    My program Test.java in F:\Tomcat5\webapps\Ambika\WEB-INF\Classes. I compiled in the format below. I got like this. What should I do for this? But yesterday I compiled like this only, It compiled and the folder com\cert\Test.class is created. Today again I compiled the pgm after deleting the already created folder 'com\cert', I got the error like this.
    I've given my pgm and the thing I've got when I compiled it.
    Test.java
    package com.cert;
    public class Test
         public void display()
              System.out.println("Hai");
    F:\Tomcat5\webapps\Ambika\WEB-INF\Classes>javac -d F:\Tomcat5\webapps\Ambika\WEB-INF\Classes\Test.java
    javac: no source files
    Usage: javac <options> <source files>
    where possible options include:
    -g Generate all debugging info
    -g:none Generate no debugging info
    -g:{lines,vars,source} Generate only some debugging info
    -nowarn Generate no warnings
    -verbose Output messages about what the compiler is doing
    -deprecation Output source locations where deprecated APIs are u
    sed
    -classpath <path> Specify where to find user class files
    -cp <path> Specify where to find user class files
    -sourcepath <path> Specify where to find input source files
    -bootclasspath <path> Override location of bootstrap class files
    -extdirs <dirs> Override location of installed extensions
    -endorseddirs <dirs> Override location of endorsed standards path
    -d <directory> Specify where to place generated class files
    -encoding <encoding> Specify character encoding used by source files
    -source <release> Provide source compatibility with specified release
    -target <release> Generate class files for specific VM version
    -version Version information
    -help Print a synopsis of standard options
    -X Print a synopsis of nonstandard options
    -J<flag> Pass <flag> directly to the runtime system
    F:\Tomcat5\webapps\Ambika\WEB-INF\Classes>
    Plz help me.
    thanks in advance
    Ambika

  • How to compile and run java program at command console

    hi there
    can anyone tell me how to compile and run a java program at command console? I have installed JRE 1.3.1, and also have installed JBuilder 5 if it helps.

    try this
    System.out.println("Enter your Name : ");
    BufferedReader console = new BufferedReader( new InputStreamReader( System.in ) );
    String s = console.readLine();
    System.out.println("Hello : "+ s+" !" );

  • Compiling and linking Pro*c

    Hi All.
    i want to know the complete process os compiling and linking Pro*c programs.
    Q:1. Do i need to install visual studio?
    Q:2. If yes, please tell me complete procedure for setting environment variables and usage.
    Q:3. If visual studio is not required, how can i compile and link Pro*c programs.
    i heard that we can compile and link using COMPLINK.BAT
    if yes, how to set the complink.bat into execution(ie any paths need to be modified in .bat file)
    need help urgent.
    thanx in advance

    Q:1. Do i need to install visual studio? -
    Yes you need this
    Q:2. If yes, please tell me complete procedure for setting environment variables and usage.:
    Refer V.Studio installation manual and PROC++ Programmers Guide.
    Q:3. If visual studio is not required, how can i compile and link Pro*c programs.
    Yes you need this

  • I have some software problems of running matlab script node in the LabVIEW program.

    Hi there,
    I wrote a simple matlab code, like x= 1, y = x*2. Then I tried to put them into matlab script node in LabVIEW.
    However, when I ran the program, I couldn't run and Labiew show some error. 
    Then I tried the method talked before on this forum. Please see the following link.
    http://forums.ni.com/ni/board/message?board.id=Mat​hScript&thread.id=571
    I followed the instruction and open the "command prompt," type some commands then I could run the program, and simultaneously, the LabVIEW program open "Matlab command line window" and run my labview code. However, if I didn't use the command prompt, the  "matlab command window" will not be opened by running the labview program. It would just show some error. And even if I turn on the matlab program in advance, I still couldn't run the labview program.
    Is there any effecient way to deal with this problem without using "command prompt?" Because I try another PC with both matlab and labview installed on it, I "can" run my simple matlab script node on it, and it will open the matlab command line window automatically by running my code. Therefore, I thought there might be some software linking problems in the previous PC I used . Do you have any ideas?
    Thanks in advacne.  

    This board is for Mathscript, but you seem to have a matlab problem. You should probably post in the LabVIEW forum instead.
    What is your LabVIEW version? What is you matlab version?
    LabVIEW Champion . Do more with less code and in less time .

  • How to compile and publish after modified a .java file?

    Hello,
    I am a newbie to Business Object. I am now working on a server that installed BusinessObjects Enterprise, to develop and run BO reports. I need to edit some java codes of the InfowView. I found that there are some .java, .class, .jar files under the installed folder. I know that it is a struts framework and I can find which .java file to edit, but I don't know how to compile and publish the codes. Is it necessary to install any development tool to do it?
    Regards,
    Philip

    Since you are using CSV, you can read a line at a time and then use String.split() on it. One you have it split, you upload to your DB using JDBC or if your in the MS world and cannot get a JDBC driver, then use the JDBC/ODBC bridge.

  • How to compile and execute lex,yac,c and java programs

    its the 3rd day on my New MacBook pro..
    as i just migrated from windows to mac i love to work on this..
    The main problem  is i DON't know .......
    how to compile and execute
    1) lex and yac programs
    2) c program
    3) java program
    so please help me
    THIS is the error i got   a1.l is a program
    i got the same error when i used  gcc
    $ lex a1.l
    $ cc lex.yy.c                                 
    Undefined symbols:
      "_yywrap", referenced from:
          _yylex in cc8QDQjW.o
          _input in cc8QDQjW.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status

    Is the problem that you don't know how to compile and execute these programs on a Mac, or just that you don't know how to compile and execute them?
    Mac OS X is really just a version of BSD Unix, as far as programs like like bison, flex and gcc are concerned...and even when Apple specific versions are provided in the Developer Tools, there are symlinks in the usual places in the Unix file hierarchy.
    For problems with lex and yacc, I suggest you start with their own references, for example, here.
    Or you could just use %option noyywrap, if you only have one file to scan.
    Or you could link to libfl.a using -lfl and use the default version from that library.
    But you really should (as Keith Barkley was subtly hinting at) learn how these tools work and why they work that way.

  • How to compile and execute a Pro*C program on Unix?

    Hello Gurus,
    I am new to Pro*C. I just wrote a sample Pro*C program 'first.pc' to read some information from some tables and print it on screen.
    I am not sure how to compile it and execute it to see the output of my very first program.
    After searching a lot I tried following ..
    -- Step 1 compile the program into .c program
    $->ls -lrt first.pc
    -rwxrwxrwx    1 sqloper4 staff          1069 Oct 31 03:39 first.pc
    $->proc first.pc
    Pro*C/C++: Release 8.1.7.0.0 - Production on Sat Oct 31 05:43:35 2009
    (c) Copyright 2000 Oracle Corporation.  All rights reserved.
    System default option values taken from: /oracle/app/oracle/product/8.1.7/precomp/admin/pcscfg.cfg
    $->ls -lrt first*
    -rwxrwxrwx    1 sqloper4 staff          1069 Oct 31 03:39 first.pc
    -rw-r--r--    1 sqloper4 staff             0 Oct 31 05:43 first.lis
    -rw-r--r--    1 sqloper4 staff          6648 Oct 31 05:43 first.c
    $->
    -- Step 2 Generate the .o file
    $->cc -I${ORACLE_HOME}/precomp/public -c first.c
    first.c: In function 'main':
    first.c:154: warning: return type of 'main' is not 'int'
    $->
    $->ls -lrt first*
    -rwxrwxrwx    1 sqloper4 staff          1069 Oct 31 03:39 first.pc
    -rw-r--r--    1 sqloper4 staff             0 Oct 31 05:43 first.lis
    -rw-r--r--    1 sqloper4 staff          6648 Oct 31 05:43 first.c
    -rw-r--r--    1 sqloper4 staff          3709 Oct 31 05:45 first.o
    $->
    -- Step 3 After that link the .o to libraries and produce the exe
    $->cc -o exe_name -L $ORACLE_HOME/lib -lclntsh
    ld: 0711-317 ERROR: Undefined symbol: .main
    ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
    collect2: ld returned 8 exit status
    $->
    $->ls -lrt first*
    -rwxrwxrwx    1 sqloper4 staff          1069 Oct 31 03:39 first.pc
    -rw-r--r--    1 sqloper4 staff             0 Oct 31 05:43 first.lis
    -rw-r--r--    1 sqloper4 staff          6648 Oct 31 05:43 first.c
    -rw-r--r--    1 sqloper4 staff          3709 Oct 31 05:45 first.o
    $->After all above still I am not sure how to proceed and 'execute' the program.
    Could you please help me with the steps to 'Compile and execute' a Pro*C program ?
    Oracle DB Version : Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
    OS : Unix
    Thanks in advance!

    Hi All,
    After reading Pro*C Question thread I have tried below steps to compile my .C program, but failed with the given errors
    $->cc -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib first.c -o sample
    ld: 0711-317 ERROR: Undefined symbol: .sqlcxt
    ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
    collect2: ld returned 8 exit statusAfter receiving above error I tried below command as an alternative
    $->cc -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib first.c -o first -lclntsh -lsql10
    collect2: library libsql10 not foundCould you please help in resolving above error? Whats missing exactly?

Maybe you are looking for

  • READSIZE problem in Oracle 10.2.0.4

    Hi, Could someone help on the access parameter READSIZE on external tables. In Dev having oracle version 10.2.0.4.0 , I didn't explicitly set the READSIZE when creating the external table and it works when reading the EBCDIC file (fixed length) In Pr

  • How to store multiple values associated to one key

    hello all In my program I need to store "multiple values associated to one key". for example : key would be ="T"                          Values are    = 2,4,5,1,2Plz tell me which data structure I can use for this purpose. I have tried Hashtable for

  • OSB automated deployment question

    Can anyone provide me a working location of import.py file for OSB 11g? The ones on Oracle.com under samples section are not working. Edited by: 816687 on May 12, 2011 6:42 AM

  • How do I update iBooks to 1.5?

    I just downloaded  "Yelow Submarine" for iBooks, but I get the message that some features are not available for iBooks versions earlier than 1.5. According to my settings I have iBooks 1.3.1.  How do I update iBooks to version 1.5?

  • Adobe 8 vs. 9 on merging PDFs

    The task is to merge PDF x into PDF y, such that PDF y ends up with both its original content and with that of PDF x. When a co-workder does it with Adobe 8, it works.  When I do it in Adobe 9, it doesn't work: in fact, PDF y disappears. Any one know