Compiling in C in terminal

I'm trying to use a program for a class called "xspim"
http://www.cs.wisc.edu/~larus/spim.html
However, I'm not familiar with C, and am struggling to get this program working on my mac. At that link, they have the source code available for a OS X install, but I've followed their instructions and am struggling.
Can anyone help me get this compiled in terminal so I can work on my assignments without having to go into the PC lab?
thanks

Forgiven. In the PC lab, we actually use Sun systems which are just unix terminals. I'm semi familiar with unix, but am not too familiar with C.
The steps I cannot get beyond are steps 5 (and 6).
5. Next, you must set the directories in which spim will be installed by editing the Makefile (the file that contains instructions on building spim). In general, if you are installing spim and want the windowing version (xspim), edit the file xspim/Imakefile. If you don't want xspim or are running on a system without X-windows installed, you use the file spim/Makefile.
Set these pathnames to the appropriate locations for your system:
EXCEPTION_DIR -- The full pathname of the directory in which to install the spim exception handler (exceptions.s).
BIN_DIR -- The full pathname of the directory in which spim and xspim should be installed.
MAN_DIR -- The full pathname of the directory in which the manual pages for spim and xspim should be installed.
In general, the remaining parameters in a Makefile need not be changed.
6. Then, if you are using Imakefile file, change to the spim-7.2/xspim directory and type:
% xmkmf
% make
If you do not have a copy of xmkmf, you can use the Makefile in the xspim directory, but beware that it may not work on your system because the paths to the X windows libraries could be different.
in 5, do I need to enter a specific directory or will the given usr/local/bin work?
Then when I try typing just "xmkmf" it gives me
colonel:~/desktop/spim-7.3/xspim Colonel$ xmkmf
-bash: xmkmf: command not found
"make" gives me the same thing...
Do I need to use the makefile described at the end of that excerpt?
I appreciate your help, but I understand if you consider this a lost cause. Thanks for helping thus far anyway.

Similar Messages

  • Can I run gcc compiled programs in the terminal?

    I compiled a simple C program in the terminal using gcc 4.0 from the Xcode 2.2 distribution. I used gcc a.c at the command line and the compiler produced a.out. When I type a.out at the command line, I get the message
    tcsh: a.out: Command not found.
    Am I missing a step in the comilation phase? Is it possible to run gcc compiled programs in the terminal? I get the same results in the bash shell and when using X11.
    eMac G4   Mac OS X (10.4.6)  

    ./a.out is correct. Your current directory in not in your $PATH. You could add "." to the PATH, but that is considered a security compromise, because an unexpected command could be introduced either maliciously or inadvertently. (I have seen this happen.)

  • Gcc compile for linux from terminal

    Hi all,
    I've usually done my compiling in OSX via terminal with gcc, using a few flags, but as of recently, wanted to build for some linux systems as well and was wondering if it was possible to compile on the mac side using specific flags instead of having to compile them on the linux boxes themselves? What I'm using now:
    gcc -arch ${arch} -mmacosx-version-min=10.4 file.c -o file
    I have a mac on our network specifically for building, recompiling and distribution which is why I'd like to keep it there instead of having to do it on each individual machine...

    You want to cross-compile on the Mac and target Linux? Certainly this is possible, but harder than it looks, and it looks pretty hard. Personally, I would suggest building it on a Linux VM running on the Mac. You'll get the best of both worlds that way.

  • Memory Error When Compiling Resulting in Program Termination

    When I compile my file, it prints the following message
    "There is not enough memory for this task. Quit one or more
    programs to increase available memory and then try again."
    I can rule out memory and incorrectly named files:
    * I have 1 GB memory with no other programs open after a
    clean reboot when I get this message. My virtual memory is adequate
    as well. I also have 20 GB free drive space on C drive and 15 GB
    free on the network drive.
    * I have no spaces in the file names; all spaces are replaced
    with underscores.
    Any idea of what can cause this or how to fix this?

    Looks like the classes that you are using were compiled with a different JDK version.
    Try using JDeveloper 10.1.3 - which has built in JDK 5.

  • Compile smartmontools pkg from terminal: command not found

    hi there!
    when i comiple tar.gz packages i usally install it by this way:
      cd smartmontools-6.0
      ./configure
      make
      sudo make install
    everythink ok but when i prompt:
    smartctl /dev/disk1s2
    i see the error: command not found
    whats wrong? i googled it up and it seems that the command isnt in the system path but cant find to fix it!
    is a smartctl specific problem or after compiling/install am i missing something?
    thanks
    Enrico
    (osx: 10.8.2)

    Open Source installers DO NOT mess with individual user shell initialization scripts.  Open Source project may be installed on single user systems, or multi-user systems so to update every possible user's shell initialization files becomes a nightmare.   For example which accounts should be updated, and which are daemon accounts that should be left along.  Which shell does the user of each account prefer to use?  And for some shells, there are multiple different shell initialzation files, so which one does the shell initialzation file select.  And if the user already has a PATH environment variable in a shell initializaton file that gets executed AFTER the file the installer choose (.bash_profile vs .bashrc), then all the installers work would be for nothing, and worse confuse the user. And the user already has the directory in PATH, but they are not logged in, does the installer parse all the other user's shell initialzation files to figure out if that user does not need an update PATH, or does it blindly add yet another export PATH to one of the shell initialization files?
    Open Source installers worry about the getting the app built and installed.  It leaves the user's personal files alone, for very good reasons :-)

  • Can't find (and possibly don't have) the -lglut -lGLU -lGL libraries... or at least when I try to compile a program, it returns with that error.  Any ideas (I really need to get this popgen program running on Lion)? Thx!

    Hi all,
        I'm trying to compile a population genetic software program onto my Mac Lion.  It was originally compiled to Tiger and worked beautifully.  But now I'm getting an error  'library not found for -lglut', and now I'm trying to figure out how to download the library. I've installed the command line code for Xcode, and am thinking I possibly missed installing the libraries.  I could be very wrong here... all I know is that I'm no longer near the people I would ask to help me with this so I'm asking you!  Thanks in advance for any help!  I guess my questions are: 1) where can I download the glut (potentially OpenGL) libraries (if I don't have them already)? And 2) once downloaded, how do I install it so the makefile will compile my program (in terminal, not Xcode)? Cheers,
    C

    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox program files and then reinstall Firefox. Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default:
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!

  • Extremely Slow System when Compiling - New Macbook Pro

    Hello,
    I am having numerous problems with the newest Macbook Pro 13 inch (16GB RAM i7) when compiling programs in the terminal. Every time I start a process whether it is compiling a file / installing a program etc the terminal window and other application freeze. It is important to note that I have an older macbook pro which does not suffer from this issue. In order to check whether it could have been an issue with the software/compiler/library version installed I reinstalled the same version of OS Mavericks from scratch on both laptops and did not install any  additional software and or anything which did not come directly from apple. The issue is still there and no matter what the terminal freezes on the newer macbook pro.
    Does anyone have any suggestion?
    Thanks
    John

    This procedure is a diagnostic test. It changes nothing, for better or worse, and therefore will not, in itself, solve your problem.
    If you don't already have a current backup, back up all data before doing anything else. The backup is necessary on general principle, not because of anything in the test procedure. There are ways to back up a computer that isn't fully functional. Ask if you need guidance.
    Below are instructions to run a UNIX shell script, a type of program. All it does is to gather information about the state of your computer. That information goes nowhere unless you choose to share it on this page. However, you should be cautious about running any kind of program at the request of a stranger on a public message board. If you have doubts, search this site for other discussions in which this procedure has been followed without any report of ill effects. If you can't satisfy yourself that the instructions are safe, don't follow them.
    Here's a summary of what you need to do: Copy a line of text from this web page into the window of another application. Wait about a minute. Then paste some other text, which will have been copied automatically, back into a reply on this page. The sequence is: copy, paste, wait, paste again. Details follow.
    You may have started the computer in "safe" mode. Preferably, these steps should be taken in “normal” mode. If the system is now in safe mode and works well enough in normal mode to run the test, restart as usual. If you can only test in safe mode, do that.
    If you have more than one user, and the one affected by the problem is not an administrator, then please run the test twice: once while logged in as the affected user, and once as an administrator. The results may be different. The user that is created automatically on a new computer when you start it for the first time is an administrator. If you can't log in as an administrator, test as the affected user. Most personal Macs have only one user, and in that case this paragraph doesn’t apply.
    The script is a single long line, all of which must be selected. You can accomplish this easily by triple-clicking  anywhere in the line. The whole line will highlight, though you may not see all of it in your browser, and you can then copy it. If you try to select the line by dragging across the part you can see, you won't get all of it.
    Triple-click anywhere in the line of text below on this page to select it:
    clear; Fb='%s\n\t(%s)\n'; Fm='\n%s:\n\n%s\n'; Fs='\n%s: %s\n'; Fu='user %s%%, system %s%%'; PB="/usr/libexec/PlistBuddy -c Print"; A () { [[ a -eq 0 ]]; }; R () { o=; [[ r -eq 0 ]]; }; M () { find -L "$d" -type f -exec sh -c 'file -b "$1" | egrep -q XML\|exec' {} {} \; -print; }; Pm () { [[ "$o" ]] && o=`sed 's/^ */   /' <<< "$o"` && printf "$Fm" "$1" "$o"; }; Pc () { o=`egrep -v '^[[:blank:]]*($|#)' "$2"`; Pm "$1"; }; Pp () { o=`$PB "$2" | awk -F'= ' \/$3'/{print $2}'`; Pm "$1"; }; Ps () { o=`echo $o`; [[ ! "$o" =~ ^0?$ ]] && printf "$Fs" "$1" "$o"; }; id | grep -qw '80(admin)'; a=$?; A && sudo true; r=$?; t=`date +%s`; clear; { A || echo $'No admin access\n'; A && ! R && echo $'No root access\n'; system_profiler SPSoftwareDataType | sed '8!d;s/^ *//'; o=`system_profiler SPHardwareDataType | awk '/Mem/{print $2}'`; o=$((o<4?o:0)); Ps "Memory (GB)"; o=`system_profiler SPDiagnosticsDataType | sed '5,6!d'`; [[ "$o" =~ Pass ]] || Pm "POST"; o=`system_profiler SPUSBDataType | awk '/V.*[(]/{if ($4 !~ /Apple/) print}' | wc -l`; Ps "3rd-party USB devices"; o=`pmset -g therm | sed 's/^.*CP/CP/'`; egrep -q 'No th|pms' <<< "$o" && o=; Pm "Thermal conditions"; o=`pmset -g sysload | grep -v :`; grep -q '= [^GO]' <<< "$o" || o=; Pm "System load advisory"; o=`nvram boot-args | awk '{$1=""; print}'`; Ps "boot-args"; d=(/ ""); D=(System User); for i in 0 1; do o=`cd ${d[$i]}L*/L*/Dia* && ls | grep -v 'ag$' | tail | awk -F_ '{$NF=a[split($NF,a,".")]; print}'`; Pm "${D[$i]} diagnostics"; done; o=`syslog -F bsd -k Sender kernel -k Message CReq 'GPU |hfs: Ru|I/O e|n Cause: -|NVDA\(|pagin|SATA W|ssert|timed? ?o' | tail -n25 | awk '/:/{$4=""; $5=""; print}'`; Pm "Kernel messages"; o=`df -m / | awk 'NR==2 {print $4}'`; o=$((o<5120?o:0)); Ps "Free space (MiB)"; o=$(($(vm_stat | awk '/eo/{sub("\\.",""); print $2}')/256)); o=$((o>=1024?o:0)); Ps "Pageouts (MiB)"; s=( `sar -u 1 10 | sed '$!d'` ); [[ s[4] -lt 85 ]] && o=`printf "$Fu" ${s[1]} ${s[3]}` || o=; Ps "Total CPU usage" && { s=(`ps acrx -o comm,ruid,%cpu | sed '2!d'`); o=${s[2]}%; Ps "CPU usage by process \"$s\" with UID ${s[1]}"; }; s=(`top -R -l1 -n1 -o prt -stats command,uid,prt | sed '$!d'`); s[2]=${s[2]%[+-]}; o=$((s[2]>=25000?s[2]:0)); Ps "Mach ports used by process \"$s\" with UID ${s[1]}"; o=`kextstat -kl | grep -v com\\.apple | cut -c53- | cut -d\< -f1`; Pm "Loaded extrinsic kernel extensions"; R && o=`sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix\.cron)|org\.(amav|apac|calendarse|cups|dove|isc|ntp|post[fg]|x)/{print $3}'`; Pm "Extrinsic system jobs"; o=`launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)|\.[0-9]+$/{print $3}'`; Pm "Extrinsic agents"; o=`for d in {/,}L*/Lau*; do M; done | grep -v com\.apple\.CSConfig | while read f; do ID=$($PB\ :Label "$f") || ID="No job label"; printf "$Fb" "$f" "$ID"; done`; Pm "launchd items"; o=`for d in /{S*/,}L*/Star*; do M; done`; Pm "Startup items"; o=`find -L /S*/L*/E* {/,}L*/{A*d,Compon,Ex,In,Keyb,Mail,P*P,Qu,Scripti,Servi,Spo}* -type d -name Contents -prune | while read d; do ID=$($PB\ :CFBundleIdentifier "$d/Info.plist") || ID="No bundle ID"; egrep -qv "^com\.apple\.[^x]|Accusys|ArcMSR|ATTO|HDPro|HighPoint|driver\.stex|hp-fax|\.hpio|JMicron|microsoft\.MDI|print|SoftRAID" <<< $ID && printf "$Fb" "${d%/Contents}" "$ID"; done`; Pm "Extrinsic loadable bundles"; o=`find -L /u*/{,*/}lib -type f -exec sh -c 'file -b "$1" | grep -qw shared && ! codesign -v "$1"' {} {} \; -print`; Pm "Unsigned shared libraries"; o=`launchctl getenv DYLD_INSERT_LIBRARIES`; Pm "Inserted libraries"; o=`find -L {,/u*/lo*}/e*/periodic -type f -mtime -10d`; Pm "Modified periodic scripts"; o=`scutil --proxy | grep Prox`; Pm "Proxies"; o=`scutil --dns | awk '/r\[0\] /{if ($NF !~ /^1(0|72\.(1[6-9]|2[0-9]|3[0-1])|92\.168)\./) print $NF; exit}'`; Ps "DNS"; R && o=`sudo profiles -P | grep : | wc -l`; Ps "Profiles"; for f in fstab sysctl.conf crontab launchd.conf; do Pc $f /etc/$f; done; Pc "hosts" <(grep -v 'host *$' /etc/hosts); Pc "User launchd" ~/.launchd*; R && Pc "Root crontab" <(sudo crontab -l); Pc "User crontab" <(crontab -l); R && o=`sudo defaults read com.apple.loginwindow LoginHook`; Pm "Login hook"; Pp "Global login items" /L*/P*/loginw* Path; Pp "User login items" L*/P*/*loginit* Name; Pp "Safari extensions" L*/Saf*/*/E*.plist Bundle | sed 's/\..*$//;s/-[1-9]$//'; o=`find ~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 \) | wc -l`; Ps "Restricted user files"; cd; o=`system_profiler SPFontsDataType | egrep "Valid: N|Duplicate: Y" | wc -l`; Ps "Font problems"; o=`find L*/{Con,Pref}* -type f ! -size 0 -name *.plist ! -exec sh -c 'plutil -s "$1" >&-' {} {} \; -print`; Pm "Bad plists"; d=(Desktop L*/Keyc*); n=(20 7); for i in 0 1; do o=`find "${d[$i]}" -type f -maxdepth 1 | wc -l`; o=$((o<=n[$i]?0:o)); Ps "${d[$i]##*/} files"; done; o=$((`date +%s`-t)); Ps "Elapsed time (s)"; } 2>/dev/null | pbcopy; exit 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign ($) or a percent sign (%). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign.
    Click anywhere in the Terminal window and paste (command-V). The text you pasted should vanish immediately. If it doesn't, press the return key.
    If you're logged in as an administrator, you'll be prompted for your login password. Nothing will be displayed when you type it. You will not see the usual dots in place of typed characters. Make sure caps lock is off. Type carefully and then press return. You may get a one-time warning to be careful. If you make three failed attempts to enter the password, the test will run anyway, but it will produce less information. In most cases, the difference is not important.
    If you're not logged in as an administrator, you won't be prompted for your password. The test will still run. It just won't do anything that requires administrator rights.
    The test may take up to a few minutes to run, depending on how many files you have and the speed of the computer. A computer that's abnormally slow may take longer to run the test. There wiil be nothing in the Terminal window and no indication of progress until it's done. Wait for the line "[Process completed]" to appear. If you don't see it within half an hour or so, the test probably won't complete in a reasonable time. In that case, close the Terminal window and report your results. No harm will be done.
    When the test is complete, quit Terminal. The results will have been copied to the Clipboard automatically. They are not shown in the Terminal window. Please don't copy anything from there. All you have to do is start a reply to this comment and then paste by pressing command-V again.
    If any private information, such as your name or email address, appears in the results, anonymize it before posting. Usually that won't be necessary.
    When you post the results, you might see the message, "You have included content in your post that is not permitted." That's because the forum software falsely identifies something in the post as a violation of the terms of use. If that happens, please post the results on Pastebin, then post a link here to the page you created.
    Note: This is a public forum, and others may give you advice based on the results of the test. They speak only for themselves, and I don't necessarily agree with them.
    Copyright © 2014 Linc Davis. As the sole author of this work, I reserve all rights to it except as provided in the Terms of Use of Apple Support Communities ("ASC"). Readers of ASC may copy it for their own personal use. Neither the whole nor any part may be redistributed.

  • Media Encoder (compilation error)

    grande difficulté pour exporter mes vidéo faites à partir d'images fixes de grande résolution !
    le processus s’interrompt au bout d'un temps variable   avec le message  COMPILATION ERROR non déterminé  ,

    Depuis quel(s) logiciel(s) réalisez vous ces exports ?
    Quelles sont les dimensions et le format des images incriminées ?
    Pouvez-vous anticiper un redimensionnement (dans Photoshop) en amont pour les passer 1. en 72dpi 2. à leur plus grande taille finale et ainsi limiter la charge mémoire ?

  • Compiling with string.h in C++

    I'm having trouble loading the "string" class into my C++ files. I compile using gcc through Terminal. In my main program file, I have
    #include <string.h>
    at the top, but when I compile (by typing "make" into the command line), the line
    string s;
    gets the error
    'string' undeclared
    If I type
    using namespace standard;
    below the #include and compile, I get the error
    parse error before "namespace"
    Do you have any suggestions for how I can get string library working? Do I need to add a line to the makefile?

    Thanks for your quick reply. I was mistaken - I thought I had been compiling in C++ all along, but I was actually compiling in C. Naturally, when I found and attempted to compile examples using the string class in C++ (e.g. "using namespace" and declaring strings using "string" instead of "char*"), they didn't compile correctly in C.

  • Java compiling on a mac

    Could Someone PLEASE explain with a good amount of detail how to compile a program through terminal on a mac. Whatever I try I can't get it to work.

    one might just say that one has no idea how to use
    the javac command in terminal at all, and one would
    just like a little bit of helpWhat have you tried to do? What terminal are you using? (I've never used a mac personally, but I understand they ship with a *NIX shell, right??)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • IMAQdx External Compiler Interface

    Hello,
    I wish to use the IMAQdx and NI-Vision External Compiler Interfaces with Cygwin gcc/g++ compilers.
    I am already doing this sort of game without any problem with the NI-VISA and NI-DAQmx External Interfaces (g++ appears to be happy with the dll files in C:\WINDOWS\system32 for NI-VISA, NI-488.2 and NI-DAQmx).
    I have written a simple C test code that calls IMAQdx symbols.
    I compile it from Cygwin terminal with the command :
    gcc -I/cygdrive/c/PROGRA~1/NATION~1/Shared/EXTERN~1/C/include TestIMAQdx.c -L/cygdrive/c/WINDOWS/system32 -lniimaqdx -lnivision
    It apparently compiles and links fine, but I get unreliable behavior and segmentation faults.
    (But the camera is found and I get some informations from it, so the symbols are somehow found. But there seems to be some problems with memory alignments)
    If I compile the very same C test code with MSVC from the Microsoft Visual Studio command line:
    cl -IC:\PROGRA~1\NATION~1\Vision\Include -IC:\PROGRA~1\NATION~1\NI-IMA~1\include TestIMAQdx.c /link C:\PROGRA~1\NATION~1\Vision\Lib\MSVC\nivision.lib C:\PROGRA~1\NATION~1\NI-IMA~1\lib\msvc\niimaqdx.lib
    Then, everything works fine. So, I guess it is not a bug in my C source file, but rather some incompatibilities between the library and the compiler. But since it is a C interface (and not, eg. a C++ interface, with ABI problems), I see no reason why it shouldn't work.
    However, I cannot use MSVC for my application because I require linking with several Cygwin C++ libraries that are not compatible with MSVC (for ABI reasons). Since IMAQdx are C interfaces, it SHOULD work.
    So:
    Is there a compatible interface library available somewhere ? Could NI possibly provide a standard external interface ?
    What could I possibly do to have g++ link properly ?
    Why does it work like a charm with VISA and DAQmx, and not with IMAQdx and Vision ?
    Thank you for your help.
    Attachments:
    TestIMAQdx.c ‏4 KB

    Hi jsalort,
    I have reproduced this issue with the code you provided. Specifically, I noted that some of the calls were corrupting the stack. This appears to be due to a mismatched calling convention. Looking at NIIMAQdx.h, it appears that the calling convention (stdcall for most functions) is NOT declared when __GNUC__ is defined (presumably under the assumption that GCC platforms were non-Windows and did not deal with multiple calling conventions).
    I think you can work around this on your own by putting the following before including NIIMAQdx.h:
    #define _NI_FUNC_DEFINED
    #define NI_FUNC         __stdcall
    #define NI_FUNCC       __cdecl
    I have also filed this issue as CAR #410920 so that it can be addressed in the header file itself.
    Eric

  • Fortran and g77 compiler

    Hi,
    I want to compile a fortran program but I don't understand how can I do it.
    I was following that instructions http://hpc.sourceforge.net
    I've installed Xcode from the Apple web site and I've downloaded and installed that package g77-intel-bin.tar.gz It has created a new folder in my desktop.
    Could please anyone tell me how can I compile? Opening the terminal and then going to the path that g77-intel-bin.tar.gz has created and using that code "g77 xxxx.f" where xxx is the program's name doesn't work.
    Then if I open Xcode application (Developer/Applications/Xcode) I can open my .f file but I don't know how to compile again...
    Thanks in advance.
    Best regards.

    Hi,
    Well I had to check the PATH too because the PATH wasn't added on the terminal.
    Thanks for your reply.
    Best regards.

  • How to include others jar in my project use netbean

    Hi,
    Here i'm build my project in netbean, in compile source i add jdom.jar. Afer compile, run jar from terminal. But, application can't use and error :
    Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/jpos/
    iso/ISOPackager
    Now, i ask : How to include others lib or jar in my project use netbean
    Rgds,
    Wira S

    Dear All,
    The code In manifest.mf, like :
    Manifest-Version: 1.0
    X-COMMENT: Main-Class will be added automatically by build
    Main-Class: root/Phase3/TesterPhase3/IsolibTester/src/isolibtester/DynamicTreeTester
    Class-Path: root/Phase3/TesterPhase3/jpos/lib/jdom.jar
    When build jar, error :
    error while reading original manifest: error in opening zip file
    Building jar: /root/PHASE3/TesterPhase3/IsolibTester/dist/IsolibTester.jar
    Manifest is invalid: Manifest sections should start with a "Name" attribute and not "Main-Class"
    /root/PHASE3/TesterPhase3/IsolibTester/nbproject/build-impl.xml:273: Invalid Manifest: /root/PHASE3/TesterPhase3/IsolibTester/manifest.mf
    BUILD FAILED (total time: 0 seconds)
    So, i tried add classpath in bash_profile and build.xml, unseccessful
    But, when runing my project from terminal can't found component jdom.jar

  • How to open a bin file

    I have os 10.7 and 10.6.8 and have several atari rom files that are compressed
    as bin files and i can't open them w/ stuffit expander or unachriever
    at this point i can't find anything to open them please help
    thanks Mike

    If you have no luck with decompression tools available within Lion or Snow Leopard, you might want to consider that either those Atari ROMS are simply not decompressible with or without existing tools, or that perhaps they were originally compressed using something else.
    After I read your post, I thought maybe there is a functional Atari emulator for OS X that would have tools to deal with those Atari ROMS. That lead me to the Hatari emulator sources. Among the pre-requsites for building Hatari, was also obtaining and building Zlib from Github sources. Apparently, Zlib is its own compression/decompression animal that appears to used for .png data compression in libpng. It apparently will also deflate compressed data within PDF files.
    It is a stretch to presume that Atari ROMS may be compressed with Zlib, but since nothing else may have worked, it might be possible that the Zlib library could be the can opener you need. It may be worth reading further.
    On the Zlib site, they have a link to a heavily documented stream I/O source file called zpipe.c. There is a downloadable copy of it. You do not need to download the Zlib library code or anything else. Just get this zpipe.c file. I have Mountain Lion and the zlib include file and library are already included in the OS, as they are in Lion. I have not found any Zlib command line tools in either OS X release though.
    I have Xcode 4.5.2 and command-line tools installed in ML. You won't need Xcode itself, just the command-line GNU C++ compiler. You need to open zpipe.c in the editor of your choice and change the following line only:
    From                               To
    #include "zlib.h"                #include <zlib.h>
    Now, save the file.
    Compile it in the Terminal (on Mountain Lion 10.8.2, the library file name is libz.1.2.5.dylib)
    g++ -O2 -o zpipe zpipe.c /usr/lib/libz.1.1.3.dylib
    I got a clean compile on Mountain Lion with the 1.2.5 version.
    I haven't been amazed in awhile, so if this works, it will be worth it.
    You would use zpipe in the following manner from the terminal to possibly deflate [ -d ] a COPY of an Atari ROM file.
    zpipe [ -d ] < Atari ROM file > Dest File

  • Release vs Debug: Bad Memory Access

    Hello everyone.
    For a school assignment I have to write a program that sorts bottles (inputed by the user) into three bins, and state the minimum amount of moves it takes. I've completed the program, that's not really the problem.
    There is a drop down menu up on the top left, and it gives me the option between 'Release' and 'Debug' (under Active Configuration). Now I don't quite understand the difference, but expected for the final copy it should be compiles with it set to Release. But that's just an assumption.
    The problem is, or maybe this is just a question, when I set it to Debug and build my program, it runs great. If I change this option to Release and run the program I get "EXCBADACCESS" and the program fails.
    My main worry is this might indicate a potential problem with compatibility on other platforms (maybe). I've compiled the program in Terminal with GCC and it works fine there as well. I will post my code below if it helps any. My hope is this is either a bug in xcode, or simply nothing to worry about.
    I've underlined the area XCode highlights when the error occurs. Thank you.
    #include <stdio.h>
    #include <stdlib.h>
    const char bottle_colour[][6]={"red","white","blue"};
    int main()
    int i,low,move[6],bottles[3][3];// bottles[bin][colour]
    for (i=0;i<3;i++)
    printf("Please enter the amount of %s bottles in each bin with a space inbetween each amount\n",bottle_colour);
    scanf("%i%i%i",&bottles[0],&bottles[1],&bottles[2]);
    printf("\n");
    move[3] += bottles[1][0] + bottles[2][0];// Moving all red bottles to bin 1
    move[3] += bottles[0][1] + bottles[2][1];// Moving all white bottles to bin 2
    move[3] += bottles[0][2] + bottles[1][2];// Moving all blue bottles to bin 3
    move[2] += bottles[1][0] + bottles[2][0];// Moving all red bottles to bin 1
    move[2] += bottles[0][1] + bottles[1][1];// Moving all white bottles to bin 3
    move[2] += bottles[0][2] + bottles[2][2];// Moving all blue bottles to bin 2
    move[5] += bottles[0][0] + bottles[2][0];// Moving all red bottles to bin 2
    move[5] += bottles[1][1] + bottles[2][1];// Moving all white bottles to bin 1
    move[5] += bottles[0][2] + bottles[1][2];// Moving all blue bottles to bin 3
    move[4] += bottles[0][0] + bottles[2][0];// Moving all red bottles to bin 2
    move[4] += bottles[0][1] + bottles[1][1];// Moving all white bottles to bin 3
    move[4] += bottles[1][2] + bottles[2][2];// Moving all blue bottles to bin 1
    move[1] += bottles[0][0] + bottles[1][0];// Moving all red bottles to bin 3
    move[1] += bottles[1][1] + bottles[2][1];// Moving all white bottles to bin 1
    move[1] += bottles[0][2] + bottles[2][2];// Moving all blue bottles to bin 2
    move[0] += bottles[0][0] + bottles[1][0];// Moving all red bottles to bin 3
    move[0] += bottles[0][1] + bottles[2][1];// Moving all white bottles to bin 2
    move[0] += bottles[1][2] + bottles[2][2];// Moving all blue bottles to bin 1
    for (i=0;i<5;i++)
    _if (move[i+1] < move && move[i+1] < move[low])_
    low = i + 1;
    printf("\nThe lowest amount of moves it would take is %i.",move[low]);

    Well, welcome to programming.
    The code as printed obviously isn't quite right due to formatting problems. There's a way to format it so it is displayed correctly but I don't know it off hand.
    If you use look at the build warnings you'll get a pretty good idea what is going on. In general there should be few or zero warnings in the build process. They're there for a reason. C provides a lot of rope.
    A few issues right away from the command line compiler:
    s.c:12: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘const char (*)[6]’
    s.c:13: warning: format ‘%i’ expects type ‘int *’, but argument 2 has type ‘int (*)[3]’
    s.c:13: warning: format ‘%i’ expects type ‘int *’, but argument 3 has type ‘int (*)[3]’
    s.c:13: warning: format ‘%i’ expects type ‘int *’, but argument 4 has type ‘int (*)[3]’
    I presume the following code
    if (movei+1 < move && movei+1 < movelow)
    low = i + 1;
    is
    if (move[i+1] < move && move[i+1] < move[low])
    low = i + 1;
    If so, I see the following warning:
    s.c:43: warning: comparison between pointer and integer
    Trust me, the issue is not portability at all nor a bug in Xcode. There are significant bugs in this code that just happen to compile.
    For instance, in line 12, the %s takes a pointer to a string yet a pointer to an array of strings has been provided.
    In line 13, the scanf %i operator requires a pointer to an integer yet a pointer to an array of pointers as been provided. You should have passed something such as &bottles[x][y] for each of those arguments.
    If you actually have 'move && move[i+1]' in the code, the code is comparing an address to an integer and I'm sure that's not intended.
    Lastly, 'low' is not initialized (those are difficult to find and the compiler does not warn of them even when using the -Wall flag). Probably should be set to zero. Different compilers and platforms vary on guarantees of a zero value.
    Since this is a project in school I will stop at this (and there are more issues in the code than I have stated).
    It'll all come in time. Good luck to you.

Maybe you are looking for

  • Reg. table name, that contains data of deletion of PP & PM operations(point

    Hi all, Could any body tell me the table, that contains task list operation deletion data in PM terms of tcode IA01. or in case of PP u can see routing data operation. It's urgent..... Help me & have ur poinrts. Regards, pradeep phogat

  • Saving SQL+ output to a text file

    I have to use SQL+ on one of my databases. No way around it. So I will write my queries, run them, check the output, tweak them and run again as necessary. So I might start with SELECT ename, job FROM emp;Once I know it is working correctly, I wrap i

  • 3Gs video no longer rotates horizontally

    Anyone have any ideas as to what the problem may be ? Doesn't work with some of my most often used apps.

  • Localhost 127.0.0.1(oracle database express edition)

    hi all, i finished installing the oracle database express edition,checked the "launch the database homepage" , i still could not load the database homepage,the message i keep getting is "internet explorer cannot display the page" and i tried it on fi

  • DNS Packet Filtering Within BM3.9

    Hi I hope you can help - now i think i know the answer to this (No!), but i really need some functionality within ZCM10 working ok for patches. See :- here But as we use BM3.9 which does not allow DNS filtering am i to understand its not possible to