Compiling programs in different directories (packages)

I'm studying Java from the book, Java: A Beginner's Guide Fourth Edition. I've come across a hurdle regarding compiling programs where classes are called from other files (packages). I can compile without error a file that doesn't include 'main()' which resides in it's own directory, "BookPack". I can't compile the second file which contains the 'main()' function. This file residing in another directory by the same name as it's package, "BookPackB". The error reported is "..... package BookPack.Book(..." does not exist.
For completeness here are the two files (page 308 from the book).
// Book recoded for public access.
package BookPack;
public class Book {
  private String title;
  private String author;
  private int pubDate;
  // Now public.
  public Book(String t, String a, int d) {
    title = t;
    author = a;
    pubDate = d;
  // Now, public.
  public void show() {
    System.out.println(title);
    System.out.println(author);
    System.out.println(pubDate);
    System.out.println();
}and
// This class is in package BookPackB
package BookPackB;
// Use the Book Class from BookPack.
class UseBook {
  public static void main(String args[]) {
    BookPack.Book books[] = new BookPack.Book[5];
    books[0] = new BookPack.Book("Java: A Beginner's Guide", "Schildt", 2007);
    books[1] = new BookPack.Book("Java: The Complete Reference", "Schildt", 2007);
    books[2] = new BookPack.Book("The Art of Java", "Schildt and Holmes", 2003);
    books[3] = new BookPack.Book("Red Storm Rising", "Clancy", 1986);
    books[4] = new BookPack.Book("On the Road", "Kerouac", 1955);
    for(int i=0; i<books.length; i++) books.show();
I would appreciate some simple guidance in the steps to compile the above files.
Cheers,
Steve.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

superjacent wrote:
My base direcory is "Module-08" and I have two sub-directories, "BookPack" and "BookPackA".
The first file with the class Book resides in the BookPack directory and the other file containing 'main()' resides in the BookPackA directory.Which ones? The .java files? or the .class files?
There are two possible ways to compile such structures: Have the .class files be next to the .java files (that's the easier one) or have a parallel directory structure for the .class files that mirrors the source structure (that's the nicer one but a tiny bit harder to set up).
I'll describe the first one here.
Your goal is for your directories + content to be like this:
Module-08/BookPack/Book.java
Module-08/BookPack/Book.class
Module-08/BookPackB/UseBook.java
Module-08/BookPackB/UseBook.class
1.) Go to Module-08
2.) compile Book.java using this command:
javac -cp . BookPack/Book.java3.) compile UseBook.java using this command:
javac -cp . BookPackB/UseBook.javaThe "-cp ." means "Use the current directory as the Classpath".
Note that your package names should be lower-case, that's a convention and it would be better to follow it.

Similar Messages

  • .java files located in different directories - trouble compiling

    My attempts at getting my main .class file (../master/BicycleMaster.class) to automatically recognize that it's supporting .class file (../master/child/BicycleChild.class) located one directory below keep failing and the .java files won't compile.
    If I move both .java files to the same location (in the ../master directory) then they compile and run just fine, but it's when I want to separate them into the two different directories that I have a problem compiling them. They won't compile because the references in BicycleMaster.jave to BicycleChild.java can't be resolved.
    I was hoping - if you have time - that you might be able to show me by example in the code below? In the file ../master/BicycleMaster.java I added 'package master;' as the first line of the code. It was my impression that this would tell the compiler to look in the sub-directories for any additional .java files. This didn't work either.
    HERE ARE THE DETAILS:
    Directory of K:\COMMON\ITS\STEVEB\java\master
    03/04/2008 04:25 PM <DIR> .
    03/04/2008 04:25 PM <DIR> ..
    03/04/2008 04:24 PM 612 BicycleMaster.java
    03/04/2008 03:54 PM <DIR> child
    1 File(s) 612 bytes
    K:\COMMON\ITS\STEVEB\java\master>type BicycleMaster.java
    package master;
    class BicycleMaster {
        public static void main(String[] args) {
            //Create 2 different bicycle objects
            BicycleChild bike1 = new BicycleChild();
            BicycleChild bike2 = new BicycleChild();
            //Invoke methods on the objects
            bike1.changeCadence(50);
            bike1.speedUp(10);
            bike1.changeGear(2);
            bike1.printStates();
            bike2.changeCadence(50);
            bike2.speedUp(10);
            bike2.changeGear(2);
            bike2.changeCadence(40);
            bike2.speedUp(10);
            bike2.changeGear(3);
            bike2.printStates();
    }Directory of K:\COMMON\ITS\STEVEB\java\master\child
    03/04/2008 03:54 PM <DIR> .
    03/04/2008 03:54 PM <DIR> ..
    03/04/2008 03:54 PM 524 BicycleChild.java
    1 File(s) 524 bytes
    K:\COMMON\ITS\STEVEB\java\master\child>type BicycleChild.java
    class BicycleChild {
        int cadence = 0;
        int speed = 0;
        int gear = 1;
        void changeCadence(int NewValue) {
            cadence = NewValue;
        void changeGear(int NewValue) {
            gear = NewValue;
        void speedUp(int increment) {
            speed = speed + increment;
        void applyBrakes(int decrement) {
            speed = speed - decrement;
        void printStates() {
            System.out.println("Your cadence: "+cadence+", Your speed: "+speed+", Your gear: "+gear);
    }HERE ARE THE ERRORS:
    First I compile the ../master/child/BicycleChild.java file and it compiles fine. This I attempt to compile ../master/BicycleMaster.java and I get the following errors:
    K:\COMMON\ITS\STEVEB\java\master>javac BicycleMaster.java
    BicycleMaster.java:5: cannot find symbol
    symbol : class BicycleChild
    location: class master.BicycleMaster
    BicycleChild bike1 = new BicycleChild();
    ^
    BicycleMaster.java:5: cannot find symbol
    symbol : class BicycleChild
    location: class master.BicycleMaster
    BicycleChild bike1 = new BicycleChild();
    ^
    BicycleMaster.java:6: cannot find symbol
    symbol : class BicycleChild
    location: class master.BicycleMaster
    BicycleChild bike2 = new BicycleChild();
    ^
    BicycleMaster.java:6: cannot find symbol
    symbol : class BicycleChild
    location: class master.BicycleMaster
    BicycleChild bike2 = new BicycleChild();
    ^
    4 errors

    Thanks so much for responding. Progress was definetly made as the compiler now works longer before erroring out. Sadly it's still erroring out for a reason I'm not understanding. Please let me know if you can see where I'm going wrong.
    Here's how it played out for me:
    K:\COMMON\ITS\STEVEB\java>echo %classpath%
    .;k:\common\its\steveb\java\;C:\Program Files\Java\jre1.6.0_04\lib\ext\QTJava.zip
    K:\COMMON\ITS\STEVEB\java\master\child>javac BicycleChild.java
    K:\COMMON\ITS\STEVEB\java\master\child>cd ..
    K:\COMMON\ITS\STEVEB\java\master>javac BicycleMaster.java
    BicycleMaster.java:5: cannot find symbol
    symbol : class BicycleChild
    location: class master.BicycleMaster
    BicycleChild bike1 = new BicycleChild();
    ^
    BicycleMaster.java:5: cannot find symbol
    symbol : class BicycleChild
    location: class master.BicycleMaster
    BicycleChild bike1 = new BicycleChild();
    ^
    BicycleMaster.java:6: cannot find symbol
    symbol : class BicycleChild
    location: class master.BicycleMaster
    BicycleChild bike2 = new BicycleChild();
    ^
    BicycleMaster.java:6: cannot find symbol
    symbol : class BicycleChild
    location: class master.BicycleMaster
    BicycleChild bike2 = new BicycleChild();
    ^
    4 errors
    Here are the two programs revised as you suggested:
    K:\COMMON\ITS\STEVEB\java\master\child>type BicycleChild.java
    package master.child;
    class BicycleChild {
        int cadence = 0;
        int speed = 0;
        int gear = 1;
        void changeCadence(int NewValue) {
            cadence = NewValue;
        void changeGear(int NewValue) {
            gear = NewValue;
        void speedUp(int increment) {
            speed = speed + increment;
        void applyBrakes(int decrement) {
            speed = speed - decrement;
        void printStates() {
            System.out.println("Your cadence: "+cadence+", Your speed: "+speed+", Your gear: "+gear);
    }K:\COMMON\ITS\STEVEB\java\master>type BicycleMaster.java
    package master;
    class BicycleMaster {
        public static void main(String[] args) {
            //Create 2 different bicycle objects
            BicycleChild bike1 = new BicycleChild();
            BicycleChild bike2 = new BicycleChild();
            //Invoke methods on the objects
            bike1.changeCadence(50);
            bike1.speedUp(10);
            bike1.changeGear(2);
            bike1.printStates();
            bike2.changeCadence(50);
            bike2.speedUp(10);
            bike2.changeGear(2);
            bike2.changeCadence(40);
            bike2.speedUp(10);
            bike2.changeGear(3);
            bike2.printStates();
    }

  • How to use two different packages which in  different directories?

    In my progrom, I'm using two differnet packages that in two different directories, but if I use classpath , the program can only be in one environment, so what can I do?

    or you set your classpath to the first common dir they have, and specify the packages from that dir on...
    or you just simply copy (you don't have to move it) the one package together with the other package...
    by the way you can add multiple paths to your classpath...
    between the paths you specify a ";"
    if i'm not mistaken...
    SeJo

  • Compile and run java programs in different directroy

    Hi,
    I often encounter many problems when I run java programs in the different directories. Like
    javac -d dir_name a.java
    java -cp dir_name a
    Something wired often happens, such as, there is not a.java file in some directory, but javac -d dir_name a.java can still work or "java -cp dir_name a" often doesn't work. Moreover, file_name.jar is also a tough problem and solving compiling problems is often time-consuming.
    So I hope to read something about how to compile and run java programs in different directory properly.
    Could you pleae give me a detailed description for that or recommend a book or website?
    Thanks a lot.

    Can you post a small amount of code that does not work, including the directory structure, and the error messages? Some one here can likely explain the problem.

  • [SOLVED] configure: error: cannot run C compiled programs

    I'm trying to build lib32-libxkbcommon 0.5.0-1 from AUR with makepkg. I already tried installing pacman (setting the default makepkg.conf) and multilib-devel with no luck.
    makepkg messages:
    ==> Making package: lib32-libxkbcommon 0.5.0-1 (Mon May 11 00:17:05 EEST 2015)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving sources...
    -> Found libxkbcommon-0.5.0.tar.xz
    ==> Validating source files with sha256sums...
    libxkbcommon-0.5.0.tar.xz ... Passed
    ==> Extracting sources...
    -> Extracting libxkbcommon-0.5.0.tar.xz with bsdtar
    bsdtar: Failed to set default locale
    ==> Starting prepare()...
    ==> Removing existing $pkgdir/ directory...
    ==> Starting build()...
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking whether to enable maintainer-specific portions of Makefiles... yes
    checking for style of include used by make... GNU
    checking for gcc... gcc -m32
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... configure: error: in `/mnt/tmp/yaourt-tmp-tsester/aur-lib32-libxkbcommon/src/libxkbcommon-0.5.0':
    configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details
    ==> ERROR: A failure occurred in build().
    Aborting...
    makepkg.conf:
    # /etc/makepkg.conf
    # SOURCE ACQUISITION
    #-- The download utilities that makepkg should use to acquire sources
    # Format: 'protocol::agent'
    DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
    'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
    'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
    'rsync::/usr/bin/rsync --no-motd -z %u %o'
    'scp::/usr/bin/scp -C %u %o')
    # Other common tools:
    # /usr/bin/snarf
    # /usr/bin/lftpget -c
    # /usr/bin/wget
    #-- The package required by makepkg to download VCS sources
    # Format: 'protocol::package'
    VCSCLIENTS=('bzr::bzr'
    'git::git'
    'hg::mercurial'
    'svn::subversion')
    # ARCHITECTURE, COMPILE FLAGS
    CARCH="x86_64"
    CHOST="x86_64-unknown-linux-gnu"
    #-- Compiler and Linker Flags
    # -march (or -mcpu) builds exclusively for an architecture
    # -mtune optimizes for an architecture, but builds for whole processor family
    CPPFLAGS="-D_FORTIFY_SOURCE=2"
    CFLAGS="-march=core2 -m64 -mfpmath=sse -O2 -fomit-frame-pointer -pipe -fstack-protector --param=ssp-buffer-size=4"
    CXXFLAGS="${CFLAGS}"
    LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"
    #-- Make Flags: change this for DistCC/SMP systems
    MAKEFLAGS="-j5"
    #-- Debugging flags
    DEBUG_CFLAGS="-g -fvar-tracking-assignments"
    DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
    # BUILD ENVIRONMENT
    # Defaults: BUILDENV=(!distcc color !ccache check !sign)
    # A negated environment option will do the opposite of the comments below.
    #-- distcc: Use the Distributed C/C++/ObjC compiler
    #-- color: Colorize output messages
    #-- ccache: Use ccache to cache compilation
    #-- check: Run the check() function if present in the PKGBUILD
    #-- sign: Generate PGP signature file
    BUILDENV=(!distcc color !ccache check !sign)
    #-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
    #-- specify a space-delimited list of hosts running in the DistCC cluster.
    #DISTCC_HOSTS=""
    #-- Specify a directory for package building.
    #BUILDDIR=/tmp/makepkg
    # GLOBAL PACKAGE OPTIONS
    # These are default values for the options=() settings
    # Default: OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !upx !debug)
    # A negated option will do the opposite of the comments below.
    #-- strip: Strip symbols from binaries/libraries
    #-- docs: Save doc directories specified by DOC_DIRS
    #-- libtool: Leave libtool (.la) files in packages
    #-- staticlibs: Leave static library (.a) files in packages
    #-- emptydirs: Leave empty directories in packages
    #-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
    #-- purge: Remove files specified by PURGE_TARGETS
    #-- upx: Compress binary executable files using UPX
    #-- debug: Add debugging flags as specified in DEBUG_* variables
    OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !upx !debug)
    #-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
    INTEGRITY_CHECK=(md5)
    #-- Options to be used when stripping binaries. See `man strip' for details.
    STRIP_BINARIES="--strip-all"
    #-- Options to be used when stripping shared libraries. See `man strip' for details.
    STRIP_SHARED="--strip-unneeded"
    #-- Options to be used when stripping static libraries. See `man strip' for details.
    STRIP_STATIC="--strip-debug"
    #-- Manual (man and info) directories to compress (if zipman is specified)
    MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
    #-- Doc directories to remove (if !docs is specified)
    DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
    #-- Files to be removed from all packages (if purge is specified)
    PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
    # PACKAGE OUTPUT
    # Default: put built package and cached source in build directory
    #-- Destination: specify a fixed directory where all packages will be placed
    #PKGDEST=/home/packages
    #-- Source cache: specify a fixed directory where source files will be cached
    #SRCDEST=/home/sources
    #-- Source packages: specify a fixed directory where all src packages will be placed
    #SRCPKGDEST=/home/srcpackages
    #-- Log files: specify a fixed directory where all log files will be placed
    #LOGDEST=/home/makepkglogs
    #-- Packager: name/email of the person or organization building packages
    #PACKAGER="John Doe <[email protected]>"
    #-- Specify a key to use for package signing
    #GPGKEY=""
    # COMPRESSION DEFAULTS
    COMPRESSGZ=(gzip -c -f -n)
    COMPRESSBZ2=(bzip2 -c -f)
    COMPRESSXZ=(xz -c -z -)
    COMPRESSLRZ=(lrzip -q)
    COMPRESSLZO=(lzop -q)
    COMPRESSZ=(compress -c -f)
    # EXTENSION DEFAULTS
    # WARNING: Do NOT modify these variables unless you know what you are
    # doing.
    PKGEXT='.pkg.tar.xz'
    SRCEXT='.src.tar.gz'
    # vim: set ft=sh ts=2 sw=2 et:
    config.log:
    This file contains any messages produced by compilers while
    running configure, to aid debugging if configure makes a mistake.
    It was created by libxkbcommon configure 0.5.0, which was
    generated by GNU Autoconf 2.69. Invocation command line was
    $ ./configure --prefix=/usr --libdir=/usr/lib32 --disable-docs --disable-static
    ## Platform. ##
    hostname = Arch
    uname -m = x86_64
    uname -r = 4.0.1-1-ARCH
    uname -s = Linux
    uname -v = #1 SMP PREEMPT Wed Apr 29 12:00:26 CEST 2015
    /usr/bin/uname -p = unknown
    /bin/uname -X = unknown
    /bin/arch = unknown
    /usr/bin/arch -k = unknown
    /usr/convex/getsysinfo = unknown
    /usr/bin/hostinfo = unknown
    /bin/machine = unknown
    /usr/bin/oslevel = unknown
    /bin/universe = unknown
    PATH: /usr/local/sbin
    PATH: /usr/local/bin
    PATH: /usr/bin
    PATH: /usr/lib/jvm/default/bin
    PATH: /usr/bin/site_perl
    PATH: /usr/bin/vendor_perl
    PATH: /usr/bin/core_perl
    ## Core tests. ##
    configure:2424: checking for a BSD-compatible install
    configure:2492: result: /usr/bin/install -c
    configure:2503: checking whether build environment is sane
    configure:2558: result: yes
    configure:2709: checking for a thread-safe mkdir -p
    configure:2748: result: /usr/bin/mkdir -p
    configure:2755: checking for gawk
    configure:2771: found /usr/bin/gawk
    configure:2782: result: gawk
    configure:2793: checking whether make sets $(MAKE)
    configure:2815: result: yes
    configure:2844: checking whether make supports nested variables
    configure:2861: result: yes
    configure:2987: checking whether to enable maintainer-specific portions of Makefiles
    configure:2996: result: yes
    configure:3023: checking for style of include used by make
    configure:3051: result: GNU
    configure:3122: checking for gcc
    configure:3149: result: gcc -m32
    configure:3378: checking for C compiler version
    configure:3387: gcc -m32 --version >&5
    gcc (GCC) 5.1.0
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    configure:3398: $? = 0
    configure:3387: gcc -m32 -v >&5
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
    Target: x86_64-unknown-linux-gnu
    Configured with: /build/gcc-multilib/src/gcc-5-20150505/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --with-default-libstdcxx-abi=c++98
    Thread model: posix
    gcc version 5.1.0 (GCC)
    configure:3398: $? = 0
    configure:3387: gcc -m32 -V >&5
    gcc: error: unrecognized command line option '-V'
    gcc: fatal error: no input files
    compilation terminated.
    configure:3398: $? = 1
    configure:3387: gcc -m32 -qversion >&5
    gcc: error: unrecognized command line option '-qversion'
    gcc: fatal error: no input files
    compilation terminated.
    configure:3398: $? = 1
    configure:3418: checking whether the C compiler works
    configure:3440: gcc -m32 -march=core2 -m64 -mfpmath=sse -O2 -fomit-frame-pointer -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wl,-O1,--sort-common,--as-needed,-z,relro conftest.c >&5
    configure:3444: $? = 0
    configure:3492: result: yes
    configure:3495: checking for C compiler default output file name
    configure:3497: result: a.out
    configure:3503: checking for suffix of executables
    configure:3510: gcc -m32 -o conftest -march=core2 -m64 -mfpmath=sse -O2 -fomit-frame-pointer -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wl,-O1,--sort-common,--as-needed,-z,relro conftest.c >&5
    configure:3514: $? = 0
    configure:3536: result:
    configure:3558: checking whether we are cross compiling
    configure:3566: gcc -m32 -o conftest -march=core2 -m64 -mfpmath=sse -O2 -fomit-frame-pointer -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wl,-O1,--sort-common,--as-needed,-z,relro conftest.c >&5
    In file included from /usr/include/stdio.h:27:0,
    from conftest.c:11:
    /usr/include/features.h:365:25: fatal error: sys/cdefs.h: No such file or directory
    compilation terminated.
    configure:3570: $? = 1
    configure:3577: ./conftest
    ./configure: line 3579: ./conftest: No such file or directory
    configure:3581: $? = 127
    configure:3588: error: in `/mnt/tmp/yaourt-tmp-tsester/aur-lib32-libxkbcommon/src/libxkbcommon-0.5.0':
    configure:3590: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details
    ## Cache variables. ##
    ac_cv_env_CC_set=set
    ac_cv_env_CC_value='gcc -m32'
    ac_cv_env_CFLAGS_set=set
    ac_cv_env_CFLAGS_value='-march=core2 -m64 -mfpmath=sse -O2 -fomit-frame-pointer -pipe -fstack-protector --param=ssp-buffer-size=4'
    ac_cv_env_CPPFLAGS_set=set
    ac_cv_env_CPPFLAGS_value=-D_FORTIFY_SOURCE=2
    ac_cv_env_CPP_set=
    ac_cv_env_CPP_value=
    ac_cv_env_DOT_set=
    ac_cv_env_DOT_value=
    ac_cv_env_DOXYGEN_set=
    ac_cv_env_DOXYGEN_value=
    ac_cv_env_LDFLAGS_set=set
    ac_cv_env_LDFLAGS_value=-Wl,-O1,--sort-common,--as-needed,-z,relro
    ac_cv_env_LIBS_set=
    ac_cv_env_LIBS_value=
    ac_cv_env_PKG_CONFIG_LIBDIR_set=
    ac_cv_env_PKG_CONFIG_LIBDIR_value=
    ac_cv_env_PKG_CONFIG_PATH_set=set
    ac_cv_env_PKG_CONFIG_PATH_value=/usr/lib32/pkgconfig
    ac_cv_env_PKG_CONFIG_set=
    ac_cv_env_PKG_CONFIG_value=
    ac_cv_env_XCB_XKB_CFLAGS_set=
    ac_cv_env_XCB_XKB_CFLAGS_value=
    ac_cv_env_XCB_XKB_LIBS_set=
    ac_cv_env_XCB_XKB_LIBS_value=
    ac_cv_env_XORG_MALLOC_DEBUG_ENV_set=
    ac_cv_env_XORG_MALLOC_DEBUG_ENV_value=
    ac_cv_env_YACC_set=
    ac_cv_env_YACC_value=
    ac_cv_env_YFLAGS_set=
    ac_cv_env_YFLAGS_value=
    ac_cv_env_build_alias_set=
    ac_cv_env_build_alias_value=
    ac_cv_env_host_alias_set=
    ac_cv_env_host_alias_value=
    ac_cv_env_target_alias_set=
    ac_cv_env_target_alias_value=
    ac_cv_path_install='/usr/bin/install -c'
    ac_cv_path_mkdir=/usr/bin/mkdir
    ac_cv_prog_AWK=gawk
    ac_cv_prog_ac_ct_CC='gcc -m32'
    ac_cv_prog_make_make_set=yes
    am_cv_make_support_nested_variables=yes
    ## Output variables. ##
    ACLOCAL='${SHELL} /mnt/tmp/yaourt-tmp-tsester/aur-lib32-libxkbcommon/src/libxkbcommon-0.5.0/build-aux/missing aclocal-1.14'
    ADMIN_MAN_DIR=''
    ADMIN_MAN_SUFFIX=''
    AMDEPBACKSLASH='\'
    AMDEP_FALSE='#'
    AMDEP_TRUE=''
    AMTAR='$${TAR-tar}'
    AM_BACKSLASH='\'
    AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
    AM_DEFAULT_VERBOSITY='1'
    AM_V='$(V)'
    APP_MAN_DIR=''
    APP_MAN_SUFFIX=''
    AR=''
    AUTOCONF='${SHELL} /mnt/tmp/yaourt-tmp-tsester/aur-lib32-libxkbcommon/src/libxkbcommon-0.5.0/build-aux/missing autoconf'
    AUTOHEADER='${SHELL} /mnt/tmp/yaourt-tmp-tsester/aur-lib32-libxkbcommon/src/libxkbcommon-0.5.0/build-aux/missing autoheader'
    AUTOMAKE='${SHELL} /mnt/tmp/yaourt-tmp-tsester/aur-lib32-libxkbcommon/src/libxkbcommon-0.5.0/build-aux/missing automake-1.14'
    AWK='gawk'
    BASE_CFLAGS=''
    BUILD_LINUX_TESTS_FALSE=''
    BUILD_LINUX_TESTS_TRUE=''
    CC='gcc -m32'
    CCDEPMODE=''
    CFLAGS='-march=core2 -m64 -mfpmath=sse -O2 -fomit-frame-pointer -pipe -fstack-protector --param=ssp-buffer-size=4'
    CHANGELOG_CMD=''
    CPP=''
    CPPFLAGS='-D_FORTIFY_SOURCE=2'
    CWARNFLAGS=''
    CYGPATH_W='echo'
    DEFS=''
    DEPDIR='.deps'
    DLLTOOL=''
    DOT=''
    DOXYGEN=''
    DRIVER_MAN_DIR=''
    DRIVER_MAN_SUFFIX=''
    DSYMUTIL=''
    DUMPBIN=''
    ECHO_C=''
    ECHO_N='-n'
    ECHO_T=''
    EGREP=''
    ENABLE_DOCS_FALSE=''
    ENABLE_DOCS_TRUE=''
    ENABLE_X11_FALSE=''
    ENABLE_X11_TRUE=''
    EXEEXT=''
    FGREP=''
    FILE_MAN_DIR=''
    FILE_MAN_SUFFIX=''
    GREP=''
    HAVE_DOT=''
    HAVE_DOT_FALSE=''
    HAVE_DOT_TRUE=''
    HAVE_DOXYGEN_FALSE=''
    HAVE_DOXYGEN_TRUE=''
    HAVE_NO_UNDEFINED_FALSE=''
    HAVE_NO_UNDEFINED_TRUE=''
    INSTALL_CMD=''
    INSTALL_DATA='${INSTALL} -m 644'
    INSTALL_PROGRAM='${INSTALL}'
    INSTALL_SCRIPT='${INSTALL}'
    INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
    LD=''
    LDFLAGS='-Wl,-O1,--sort-common,--as-needed,-z,relro'
    LIBOBJS=''
    LIBS=''
    LIBTOOL=''
    LIB_MAN_DIR=''
    LIB_MAN_SUFFIX=''
    LIPO=''
    LN_S=''
    LTLIBOBJS=''
    MAINT=''
    MAINTAINER_MODE_FALSE='#'
    MAINTAINER_MODE_TRUE=''
    MAKEINFO='${SHELL} /mnt/tmp/yaourt-tmp-tsester/aur-lib32-libxkbcommon/src/libxkbcommon-0.5.0/build-aux/missing makeinfo'
    MANIFEST_TOOL=''
    MAN_SUBSTS=''
    MISC_MAN_DIR=''
    MISC_MAN_SUFFIX=''
    MKDIR_P='/usr/bin/mkdir -p'
    NM=''
    NMEDIT=''
    OBJDUMP=''
    OBJEXT=''
    OTOOL64=''
    OTOOL=''
    PACKAGE='libxkbcommon'
    PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=libxkbcommon'
    PACKAGE_NAME='libxkbcommon'
    PACKAGE_STRING='libxkbcommon 0.5.0'
    PACKAGE_TARNAME='libxkbcommon'
    PACKAGE_URL='http://xkbcommon.org'
    PACKAGE_VERSION='0.5.0'
    PATH_SEPARATOR=':'
    PKG_CONFIG=''
    PKG_CONFIG_LIBDIR=''
    PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
    RANLIB=''
    RT_LIBS=''
    SED=''
    SET_MAKE=''
    SHELL='/bin/sh'
    STRICT_CFLAGS=''
    STRIP=''
    VERSION='0.5.0'
    XCB_XKB_CFLAGS=''
    XCB_XKB_LIBS=''
    XKBCONFIGROOT=''
    XLOCALEDIR=''
    XORG_MALLOC_DEBUG_ENV=''
    XORG_MAN_PAGE=''
    YACC=''
    YACC_INST=''
    YFLAGS=''
    ac_ct_AR=''
    ac_ct_CC='gcc -m32'
    ac_ct_DUMPBIN=''
    am__EXEEXT_FALSE=''
    am__EXEEXT_TRUE=''
    am__fastdepCC_FALSE=''
    am__fastdepCC_TRUE=''
    am__include='include'
    am__isrc=''
    am__leading_dot='.'
    am__nodep='_no'
    am__quote=''
    am__tar='$${TAR-tar} chof - "$$tardir"'
    am__untar='$${TAR-tar} xf -'
    bindir='${exec_prefix}/bin'
    build=''
    build_alias=''
    build_cpu=''
    build_os=''
    build_vendor=''
    datadir='${datarootdir}'
    datarootdir='${prefix}/share'
    docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
    dvidir='${docdir}'
    exec_prefix='NONE'
    host=''
    host_alias=''
    host_cpu=''
    host_os=''
    host_vendor=''
    htmldir='${docdir}'
    includedir='${prefix}/include'
    infodir='${datarootdir}/info'
    install_sh='${SHELL} /mnt/tmp/yaourt-tmp-tsester/aur-lib32-libxkbcommon/src/libxkbcommon-0.5.0/build-aux/install-sh'
    libdir='/usr/lib32'
    libexecdir='${exec_prefix}/libexec'
    localedir='${datarootdir}/locale'
    localstatedir='${prefix}/var'
    mandir='${datarootdir}/man'
    mkdir_p='$(MKDIR_P)'
    oldincludedir='/usr/include'
    pdfdir='${docdir}'
    prefix='/usr'
    program_transform_name='s,x,x,'
    psdir='${docdir}'
    sbindir='${exec_prefix}/sbin'
    sharedstatedir='${prefix}/com'
    sysconfdir='${prefix}/etc'
    target_alias=''
    ## confdefs.h. ##
    /* confdefs.h */
    #define PACKAGE_NAME "libxkbcommon"
    #define PACKAGE_TARNAME "libxkbcommon"
    #define PACKAGE_VERSION "0.5.0"
    #define PACKAGE_STRING "libxkbcommon 0.5.0"
    #define PACKAGE_BUGREPORT "[url]https://bugs.freedesktop.org/enter_bug.cgi?product=libxkbcommon[/url]"
    #define PACKAGE_URL "[url]http://xkbcommon.org[/url]"
    #define PACKAGE "libxkbcommon"
    #define VERSION "0.5.0"
    configure: exit 1
    other info:
    core/pacman 4.2.1-1
    multilib/gcc-multilib 4.9.2-4 (multilib-devel) [installed]
        The GNU Compiler Collection - C and C++ frontends for multilib
    multilib/lib32-fakeroot 1.20.2-1 (multilib-devel) [installed]
        Tool for simulating superuser privileges (32-bit)
    multilib/lib32-libltdl 2.4.5-1 (multilib-devel) [installed]
        A generic library support script (32-bit)
    Last edited by tsester (2015-05-10 22:10:28)

    tsester wrote:P.S.: I recently transfered the linux system between failing disks
    In that case you should probably check that no other packages are missing files with
    pacman -Qkk 2>&1 | grep "No such file or directory"
    Any packages that report that they're missing files, you should reinstall.

  • Linking subroutines from different directories

    <font class="fixed_width">{font:Courier, Monospaced}hello, How can i compile and link a program that uses subroutines in
    different directories?
    as for simple example;
    {font}</font>$ cat trial.f90
            call lm(oidxdn,opnu,opold,oqnu,oqold,avw)
            call lm_end(oidxdn,opnu,opold,oqnu,oqold,avw)
            end <font class="fixed_width">{font:Courier, Monospaced}
    is compiling as:
    $ gfortran  -c trial.f90 -I/home/rudra/Recursion/LMTO-A {font}</font>
    <font class="fixed_width">{font:Courier, Monospaced}but when i am trying to create the executable, it says:
    {font}</font>
    gfortran   trial.f90 -L/home/rudra/Recursion/LMTO-A -llm
    /tmp/cc2gfNyf.o: In function `MAIN__':
    trial.f90:(.text+0x44): undefined reference to `lm_'
    collect2: ld returned 1 exit status <font class="fixed_width">{font:Courier, Monospaced}can anyone tell me the wayout?
    {font}</font>
    <font class="fixed_width">{font:Courier, Monospaced}As a work around, i tried to create a library(static) as
    {font}</font>
    liblm.a:MAIN/lm-lib.f MAIN/lm-lib-end.f $(lmobj)
            $(FC) -c MAIN/lm-lib.f MAIN/lm-lib-end.f $(lmobj)
            ar rcs liblm.a lm-lib.o lm-lib-end.o $(lmobj)<font class="fixed_width">{font:Courier, Monospaced}and link this to my main as:
    {font}</font>
    irun: $(FOBJ)
            $(FC) $(FFLAGS) $(FPAR) -o $@  $(FOBJ) -L/home/rudra/Recursion/LMTO-
    A/ -llm
    main.o : main.f90 util.o ldos.o fermi.o band.o dos.o mmat.o hop.o
    shared.o param.o kind.o cgreen.o bit_unm.o nis.o
             $(FC) -c $(FFLAGS) $(FPAR) main.f90 -L/home/rudra/Recursion/LMTO-A -
    llm <font class="fixed_width">{font:Courier, Monospaced} {font}</font>
    <font class="fixed_width">{font:Courier, Monospaced}This one is working fine, only with a problem that even if my library
    (liblm.a) is updated, main is not updating via make and i am forced to
    make clean; make everytime i compile.
    any suggestion?
    (This is historical as i am trying to create and use my FIRST library.
    So plz. be simple)
    {font}</font>

    Your makefile looks good to me. If you want your program to be rebuild in case liblm.a is changed,
    you can specify it the same way to specified other dependencies:
    irun: $(FOBJ)  /home/rudra/Recursion/LMTO-A/liblm.a
            $(FC) $(FFLAGS) $(FPAR) -o $@  $(FOBJ) -L/home/rudra/Recursion/LMTO-A/ -llmProbably it is better to make this directory configurable:
    LIBLM_DIR=/home/rudra/Recursion/LMTO-A/
    irun: $(FOBJ)  $(LIBLM_DIR)/liblm.a
            $(FC) $(FFLAGS) $(FPAR) -o $@  $(FOBJ) -L$(LIBLM_DIR) -llmAnother way is to use Sun Studio "dmake", which has a nice feature: KEEP_STATE
    All you need is to add one line to your makefile:
    .KEEP_STATE:and it will keep the information about all dependencies (including hidden dependencies),
    and rebuild object files, libraries and programs in case anything changed.
    Thanks,
    Nik
    P.S.: BTW, gfortran is not a part of Sun Studio, it is GNU fortran compiler.
    Did you try Sun Studio fortran compiler "f90"?
    Edited by: NikMolchanov on Jul 13, 2009 4:10 PM

  • How to include header files from different directories?

    Hi,
    Sorry for the newb question, but I can't figure this out. I'm trying to compile a simple piece of code (C++) that uses header files in a directory different from the Project directory; header files are in /opt/csw/postgresql/include/pqxx. I've tried a few different things, adding that directory to the include directives under Resource Files, add existing files from a folder, etc etc. Whenever I try to build, dmake bails with status -1. I can't seem to get this working, can someone explain how to use header files from different directories?
    Thanks,
    SlowToady

    Header files are usually specified relative to a base directory. If the base directory is not a system directory -- /usr/include or the compiler installation directory -- add a command-line directive
    -I path/to/base/dirfor each such directory.
    The path can be absolute, such as
    -i /opt/csw/postgresql/includeor relative, such as
    -I ../../my/includeIn your source code, specify the header file relative to the base directory, and be sure to use quotes, not angle brackets. Example:
    #include "header.h"  // right
    #include <header.h>  // wrongThe angle brackets are used for system headers, like <iostream> or <stdlib.h>.
    The rules above are common to all compilers on Unix and Linux, and generally to all C and C++ compilers.
    For more details, read about the -I option in the C++ Users Guide. You can find the guide by pointing your browser to the "docs" directory in the compiler installation, or go here:
    http://docs.sun.com/app/docs/doc/819-5267
    All command-line options are described in Appendix A.

  • Reading files from different directories and exceuting them

    D:\>cd PROC_PKG_FUNC
    mkdir FUNCTIONS
    mkdir PACKAGES
    mkdir PACKAGES_BODY
    mkdir PROCEDURES
    mkdir TYPES
    mkdir TYPES_BODY
    SQL> create directory FUNCTIONS as 'D:\PROC_PKG_FUNC\FUNCTIONS';
    Directory created.
    SQL> create directory PACKAGES as 'D:\PROC_PKG_FUNC\PACKAGES';
    Directory created.
    SQL> create directory PROCEDURES as 'D:\PROC_PKG_FUNC\PROCEDURES';
    Directory created.
    SQL> create directory PACKAGES_BODY as 'D:\PROC_PKG_FUNC\PACKAGES_BODY';
    Directory created.
    SQL> create directory TYPES as 'D:\PROC_PKG_FUNC\TYPES';
    Directory created.
    SQL> create directory TYPES_BODY as 'D:\PROC_PKG_FUNC\TYPES_BODY';
    Directory created.
    suppose,
    there is a D:\PROC_PKG_FUNC directory in my local machine where the database server exists.
    And in that directory there are different directories like FUNCTIONS,PACKAGES,PACKAGES_BODY,PROCEDURES,TYPES,TYPES_BODY, now I've created all the remote schemas obejcts in these folders using utl_file, with the help of the following package
    SQL> CREATE OR REPLACE PROCEDURE Get_Db_Ddl_Scripts AS
    2 v_file Utl_File.FILE_TYPE;
    3 v_file_dir VARCHAR2(50);
    4 i_first_line NUMBER := 1;
    5 BEGIN
    6
    7 v_file_dir := 'PROC_PKG_FUNC';
    8
    9 FOR REC_OBJ IN
    10 (SELECT DISTINCT NAME,TYPE,DECODE(TYPE,'FUNCTION','FUNCTIONS','PACKAGE','PA
    CKAGES','PACKAGE BODY','PACKAGES_BODY','PROCEDURE','PROCEDURES','TYPE','TYPES','
    TYPE BODY','TYPES_BODY') v_file_dir
    11 FROM ALL_SOURCE@FRISKDEVI41B_ORCL WHERE OWNER='FRISKDEVI41B'
    12 AND TYPE IN ('FUNCTION, PROCEDURE','PACKAGE','PACKAGE BODY','TYPE'))
    13 LOOP
    14 v_file := Utl_File.FOPEN(location => REC_OBJ.v_file_dir,
    15 filename => REC_OBJ.NAME || '.sql',
    16 open_mode => 'w',
    17 max_linesize => 32767);
    18 i_first_line := 1;
    19 FOR REC IN (SELECT TEXT FROM ALL_SOURCE@FRISKDEVI41B_ORCL WHERE NAME = REC_
    OBJ.NAME AND TYPE=REC_OBJ.TYPE AND OWNER='FRISKDEVI41B' ORDER BY LINE)
    20 LOOP
    21 IF i_first_line = 1 THEN
    22 Utl_File.PUT_LINE(v_file,'CREATE OR REPLACE ' || REPLACE(REC.TEXT,CHR(10),N
    ULL));
    23 ELSE Utl_File.PUT_LINE(v_file, REPLACE(REC.TEXT,CHR(10),NULL));
    24 END IF;
    25 i_first_line := i_first_line + 1;
    26 END LOOP;
    27 Utl_File.FCLOSE(v_file);
    28
    29 END LOOP;
    30
    31 END;
    32 /
    Procedure created.
    SQL>exec Get_Db_Ddl_Scripts ;
    PL/SQL procedure successfully completed.
    Thus the files are created in the location.
    now what i want to do is i want to read each file and run in my current schema to create these objects in my local scehma ,is that possible? Help required._

    ORCHYP wrote:
    once these files are written in respective folders, you can open them with utl_file('read') in current schema and very well you can execute them.
    Try it onceTry it as many times as you like, you won't execute the files with utl_file, that's for sure. ?:|
    Using something like DBMS_SCHEDULER you could issue a one off job for each script, as that package can call o/s commands.
    However, what's the point?
    You may as well, in the code above, just build up your DDL commands or whatever inside your code and, rather than write them out to scripts, use the EXECUTE IMMEDIATE command to execute the DDL against the database.
    Of course may not be the best thing to be doing, but we have very little information about what it is that is trying to be achieved, and no reason given why all the functions, packages etc. aren't just put together in a single script that is executed from the command line in the first place. Why try and write PL/SQL to do it?

  • How can I compile all functions, procedures and packages with a script?

    I need to compile all functions, procedures and packages of 5 schemas (users) with a script.
    How can I do it?
    Thanks!

    you can create a script to select all invalid objects in those schemas Since Oracle 8 introduced NDS this approach has struck me as a trifle old fashioned. It's much simpler to loop round the query in PL/SQL and use EXECUTE IMMEDIATE to fire off the DDL statements. No scripts, no muss, no fuss.
    Having said that, the problem with this approach and also with using DBMS_UTILITY.COMPILE_SCHEMA is that they do not compile all the invalid objects in dependency order. This may result in programs being invalidated by the subsequent compilation of dependencies. This is due to the introduction of Java into the database.
    The UTLRP script is much better, because it (usually) avoids cyclic references. But you still may need to run it more than once.
    In general it is better to avoid sledgehammer recompilations (like DBMS_UTILITY.COMPILE_SCHEMA, which starts by invalidating all the objects). If we have twenty invalid objects, nineteen of which are dependencies of the twentieth, we actually only need to recompile the master object, as recompiling it will trigger the recompilation of all the others.
    Cheers, APC

  • Configure: error: cannot run C compiled programs.

    Hi,
    I am new to Solaris. I have installed Solaris 10 and compiled packages without any error.
    I have tried to compile Wireshark 1.7.1 and it was exist indicating '/usr/include/sys/feature_tests.h no such file or directory'.
    So I have download feature_tests.h file and uploaded it to the relevant location and run ./configure again.
    Now I am not able to compile any package and it indicate error
    'configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details'
    I have attached portion of the config.log
    configure:3739: checking whether the C compiler works
    configure:3761: gcc conftest.c >&5
    configure:3765: $? = 0
    configure:3813: result: yes
    configure:3816: checking for C compiler default output file name
    configure:3818: result: a.out
    configure:3824: checking for suffix of executables
    configure:3831: gcc -o conftest conftest.c >&5
    configure:3835: $? = 0
    configure:3857: result:
    configure:3879: checking whether we are cross compiling
    configure:3887: gcc -o conftest conftest.c >&5
    In file included from conftest.c:11:
    /usr/include/stdio.h:21:31: sys/feature_tests.h: No such file or directory
    In file included from /usr/include/stdio.h:66,
    from conftest.c:11:
    /usr/include/iso/stdio_iso.h:90: error: syntax error before "fpos_t"
    /usr/include/iso/stdio_iso.h:208: error: syntax error before "fpos_t"
    /usr/include/iso/stdio_iso.h:210: error: syntax error before '*' token
    In file included from /usr/include/stdio.h:135,
    from conftest.c:11:
    /usr/include/iso/stdio_c99.h:54: error: conflicting types for '_RESTRICT_KYWD'
    /usr/include/iso/stdio_c99.h:54: error: previous definition of '_RESTRICT_KYWD' was here
    /usr/include/iso/stdio_c99.h:56: error: redefinition of parameter '_RESTRICT_KYWD'
    /usr/include/iso/stdio_c99.h:56: error: previous definition of '_RESTRICT_KYWD' was here
    /usr/include/iso/stdio_c99.h:68: error: conflicting types for '_RESTRICT_KYWD'
    /usr/include/iso/stdio_c99.h:68: error: previous definition of '_RESTRICT_KYWD' was here
    /usr/include/iso/stdio_c99.h:70: error: conflicting types for '_RESTRICT_KYWD'
    /usr/include/iso/stdio_c99.h:70: error: previous definition of '_RESTRICT_KYWD' was here
    configure:3891: $? = 1
    configure:3898: ./conftest
    ./configure: line 3900: ./conftest: No such file or directory
    configure:3902: $? = 127
    configure:3909: error: in `/wireshark-1.6.7':
    configure:3911: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details

    934802 wrote:
    Hi,
    I am new to Solaris. I have installed Solaris 10 and compiled packages without any error.
    I have tried to compile Wireshark 1.7.1 and it was exist indicating '/usr/include/sys/feature_tests.h no such file or directory'.
    So I have download feature_tests.h file and uploaded it to the relevant location and run ./configure again.
    Now I am not able to compile any package and it indicate error Where did you get this file?

  • Compiling programs using jdk1.6.0

    when i compiled program using "system.out.print.in " , it shows an error
    that package system does not exist .

    if you want to print something use
    System.out.printor if you want to make it print on seperate lines
    System.out.println

  • How compile an entire tree structure packages in JDev

    Hello there
    When i use jdev i have the src folder (source files) and the classes folder (compiled files) as Jdev makes them, but the compiled files are not updated correctly.
    For eg. i created a batch file that runs the application with this content
    echo on
    C:
    set path=C:\Program Files\Java\jdk1.6.0_11\bin;%path%
    set classpath=
    cd C:\jdevstudio10133\jdev\mywork\Supreme\ProjectServer\classes
    java project.main.Main
    And the application started is an older version of the application that i have now, if i put the first line System.out.println("Message") even if i make and rebuild the project, the message will not appear and i dont know how to get the compiled files.
    Also i tried to find out how to compile a tree structure of packages from command line but it seems very difficult. If anyone can give a reference.
    Thank you.

    User,
    you left out vital information. Read this post before posting.
    what happens if you delete the whole classes folder and rebuild the application? JDev will recreate the folder and you should see all changes then. If not you are not running the right classes.
    Timo

  • My compiled program crashes after first run (LabVIEW 2009)

    I have a compiled program created with LabVIEW 2009 that on the first run after the computer is re-booted will work fine but after shutting down the program it will not run properly. 
    The program uses a compiled launcher to dynamically activate a set of VI's containing Queue Driven State Machines (QDSM).  On subsequent program starts the launcher module comes up fine and its progress bar shows that it is launching each of the VI's.  Once the launcher is complete it removes itself from memory leaving the dynamically launched VI's running.  The subsequent launches which fail the main user interface VI pops up barely long enough for the observer to see (if at all) then shuts down.  The program is then gone from memory as far as I can tell.  There are no processes in memory or anything.
    Additionally, the when I try to run the installed version of the exe on a computer that has the 2009 development environment installed I get this behavior consistently with a successful run even once.
    In both cases my program does not throw any errors (which are logged) nor does the runtime engine generate any that I can see.  Also, when I run my program in the development environment the program does not behave this way.  It has no problems at all.
    I have used this style of architecture before in LV8.6 with out any problems.  Can anyone suggest some possible solutions or even some debugging tips?  I have never had a problem that I could not duplicate in the development environment so I am unsure how begin attacking my issue.
    Thanks for any help.
    Jason
    Wire Warrior
    Behold the power of LabVIEW as my army of Roomba minions streaks across the floor!
    Solved!
    Go to Solution.

    I have solved the problem I think (at least as far as testing to this point has revealed).   After I added in the ability to log the states passed to the QDSM's, I was able to determine that the program was "crashing" after I dynamically closed the front panel of the launcher.  My program was designed to close the front panel of the launcher then pop-up the front panel of the main UI.   My EXE is built on to contain the launcher with my other QDSM files being maintained externally in specific directories.  What appeared to be happening is that when the launcher closed its front panel and before the UI opened up the run-time engine would decide since there were no windows open it would close itself down.  This is my supposition about what may be happening any way.  I modified my code to changed the launcher window to hidden and delay for 1/2 a second to give the main UI a chance to start fully running.  This fixed the problem, or at least worked around it.  If someone out there can explain to me exactly what is happening I sure would appreciate it.
    Thanks for all the help those of you who responded.  Your advice was very beneficial and certainly led me to a resolution faster.
    Jason
    Wire Warrior
    Behold the power of LabVIEW as my army of Roomba minions streaks across the floor!

  • RTorrent: move downloads to different directories depending on tracker

    Hi!
    I would like rTorrent to move completed downloads to different directories depending on the trackers in the torrent. An ideal setup for me would be something like this:
    torrents/completed/tracker_x
    torrents/completed/tracker_y
    torrents/completed/tracker_z
    torrents/completed/unknown_trackers
    torrents/incomplete
    torrents/torrent_files
    torrents/session_data
    Any hints/links/etc for me? I think i can make something work if rTorrent could pass the .torrent file path and downloading directory to a bash script

    very lazily copied out my .rtorrentrc
    32 schedule = watch_directory_1,10,10,"load_start=/home/share/media/torrents/foo/*.torrent,d.set_custom1=/home /share/media/video/foo"
    33 schedule = watch_directory_2,10,10,"load_start=/home/share/media/torrents/bar/*.torrent,d.set_custom1=/home/s hare/media/video/bar"
    39 on_finished = move_complete,"d.set_directory=$d.get_custom1= ;execute=mv,-u,$d.get_base_path=,$d.get_custom1="
    there's also this, but i think it doesn't actually move the files; it makes symlinks.
    http://code.google.com/p/pyroscope/wiki … Completion
    Last edited by tladuke (2010-12-12 23:31:40)

  • LV 8 problem with New Report.vi in compiled program

    I'm a novice LV programmer trying to finish my first project.  The project is the automation of an air flow stand using field point for acquisition/control.  Have the code written and everything seems to work fine until I compile.  Specifically, I get an error when I attempt to open an Excel template (XLT) using the New Report.vi included in the report generation add on.  When the compiled executable run I get a message with the header "Error 7 occured at Open VI reference in New Report vi>report2.vi>auto air flow testing.vi .   And then in the body of the message is says:
    Possible reason(s):
    LabVIEW:  File not found. The file might have been moved or deleted, or the file path might be incorrectly formatted for the operating system. For example, use \ as path separators on Windows, : on Mac OS, and / on Linux.
    NI-488:  Non-existent board.
    VI Path: C:\builds\auto air flow\My Application\auto air flow 1a.exe\Excel_Open.vi
    Built Application or Shared Library (DLL): Make sure all dynamically loaded VIs were properly included in the build specification for the application or shared libr
    The input to the New Report.vi template connector is C:\Air Flow Data Files\templates\psc.xlt.  Again this works in design so I believe the formatting is correct and the file does exist.
    Why would this work in design environment but not the compiled program?  I recompiled several times and even tried reinstalling the report generation tool kit. Any help or pointers would be greatly appreciated. I will be happy to supply more info if necessary.   thanks. 

    Okay, I found the solution by doing a search here on 'Error 7".  My thanks to those who have posted the solution in the past.  Regards

Maybe you are looking for

  • How do i change my apple id to another one in iPhoto

    How do you change id's for iphoto

  • OEM Version of Windows 7

    So I'm purchasing Windows 7 64-Bit OEM version. I had a pervious thread, but it was getting lost and off topic so I am starting over. I hate to be a pain. Just please answer yes, or no. Can I run the OEM version of Windows 7 64-Bit on BootCamp 4.0 on

  • How to find out Black white Image??

    Hi All, I am Prashant I have bunch of images in one folder form the bunch of images I want to find out color images and black and white images. Can u help me plz???? Thanking you Prashnat

  • V$osstat and V$SYS_TIME_MODEL question

    Hi there ! I have a function osstat, which take stats from the os using v$osstat (credits for the procedure to a person, I regret to say, that I cant remember his name). But since we have 9 databases on the same server (and we dont have access to the

  • How do you debug etl

    Where do you go or look to debug data issues after a successful etl full load? using Peoplesoft HR analytics,the oltp database has over 7k rows in employment, dw has over 4k in w_employee_d, missing half of the users.TIA