Running a command in a command line tool in fastest way

Before anything I want to clarify some terms : 
apk
file (android application package file) : equivalent to executable (exe) files on windows
aapt.exe
: A command line tool which comes with android sdk in order to fetch information of an apk file (It obviously has other usages)
note : This question is not about an android feature. It's all about C# and functionality of .Net framework 
An
apk file has a name just same as any other file, but it has a internal name (which will be shown when you install apk file on android os as name of application) 
with
aapt.exe I can get internal name of an apk using following command :  
aapt
d badging "<apk path>"
I
have copied aapt.exe where executable file of my c# application is and I want  :
Enter
above command for each apk in selected directory (using GetAllFiles method)
I want to get internal names of apk files and
I've tried a lot of ways and I've searched a lot. finally this is what I've got : 
Process proc = new Process();
proc.StartInfo.FileName = "cmd.exe";
proc.StartInfo.RedirectStandardInput = true;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.StandardOutputEncoding = System.Text.Encoding.UTF8;
proc.Start();
using (StreamWriter sw = proc.StandardInput)
foreach (string path in Directories.GetAllFiles(@"E:\apk", "apk"))
sw.WriteLine("aapt d badging " + "\"" + path + "\"");
//following line doesn't work because sStandardInput is open
Debug.WriteLine(proc.StandardOutput.ReadToEnd());
// There will be a really huge amount of text (at least 20 line per sw.Writeline) and
//it impacts performance so following line is not really what I'm looking for
Debug.WriteLine(proc.StandardOutput.ReadToEnd());
GetAllFiles is
a function that I've created to fetch all apk file full path. It gets two argument. First argument is path and second one is extension of file you want its full path to be fetched.
This is not final code.
As I've commented it out first Debug.WriteLine doesn't
work and second one is not a good idea. how should I get output from proc?
I have tried running process by argument and its awful :)
As another approach :
Because apk files are basically zip files I can extract them get what I want from them.
There is an xml file named Androidmanifest.xml in every apk file.
Androidmanifest.xml is like an ID card for an apk file and apk internal name can be found in it but here are some problems with this approach : 
1. Androidmanifest.xml is not a plain text file. It's coded and it requires a lot of complexity to decode it
2. application name (or apk internal name) is an attribute in this file and it's value is not a string value. It's a reference to a file where strings are stored and worst thing is it's not an easy to find out reference. It's just a number

And you don't get any output from it? Maybe you're passing the arguments incorrectly?
No. I don't get any result and I have checked arguments and it's correct.
But you are already running a separate process for every apk file. You start a single cmd.exe and then send it commands that will cause aapt to be run for every file. Unless aapt accepts multiple apk filenames on the command line there's no way
around using separate processes.
I didn't know that. anyway speed in this way is much more rather than creating a function. creating a Process object in it and calling function for each apk file.
I read somewhere that it's possible to run multiple commands in cmd by & operator but as you said I think every command runs aapt. I have tested this approach too and it's very very slow
fastest approach I have found is what I have wrote here and speed is about  0.6 per apk file which is still slow when there is thousands of apk files.
I tried an application that does same thing (fetching apk information) and in it's installation directory I found aapt.exe which means it uses this tool to get information but speed is significantly faster rather than my application.   
So what's your suggestion about this? 

Similar Messages

  • GUI Applications unable to use command line tools

    Hi All-
    I've searched, but I can't find a thread about this one, so...
    On OS 10.4.5:
    Whenever I use a GUI app that wants to use a command line tool (e.g. curl, df, java), the app fails giving an error message to the effect of "unable to find curl" or the like. It is as if the GUI cannot find my unix $PATH.
    Examples:
    -- Eclipse refuses to launch, because it appears to use "java xxxxxxx" to launch.
    -- Automator fails to run certain Safari actions because they use curl to navigate web pages.
    -- Carbon Copy Cloner fails to launch, because it can't find a tool (df, IIRC) to read drive/volume info
    Possibly relevant details:
    -- I can use the tool in question from the command line, so they are present, and in my $PATH, but the GUI can't find them.
    -- I recently moved from an old G4 to a relatively new G5, and had issues migrating files, so I eventually just copied my entire home directory from the old machine to the new, replacing the freshly created one on the new machine. I feel like that missed something that tells the GUI where your $PATH is, or some other link between GUI and command line.
    -- I created a new user, and that user does not experience the same troubles. This adds to my suspicion that it is account/PATH related.
    Any help anyone can give it greatly appreciated.
    -p
    PM G5 dual 2.0   Mac OS X (10.4.5)  

    Did you by any chance create an evironment.plist file? It is located in ~/.MacOSX/ If you don't know about it or don't know to look (.MacOSX is normally invisible), try this:
    In Finder.app, in the "Go" menu select "Go to Folder..." (shift-command-G), type ~/MacOSX in the text field and hit OK, the finder should then open a window or complain.
    If it opens a window and you find in it a file named environment.plist move that file to the desktop and try your applications. Do they work as advertized? Try again after logging in/out if things don't work. Do they work now?
    Whatever hapens, tell us more...

  • Error while running the SAP JCO java program running via command line

    Hi,
        We are facing an issue while using SAP JCO. When i try to run the sample program using RAD 8.0 ( IBM IDE tool For Java Development) its working fine.
    The same sample program if i try to run using command line, Then its giving below exception message.
    Exception in thread "main" java.lang.NoClassDefFoundError: Integration
    NOTE: I have configured proper sapjco jar & Dll files path in class path settings in my batch file.

    Hi,
    class loader can't find class definition during runtime but it could find it during compilation. So the problem is with your classpath. Does your classpath point to file with class Integration? Check this [blog|http://javarevisited.blogspot.com.au/2011/06/noclassdeffounderror-exception-in.html].
    Cheers
    Added reference to blog.

  • Command Line Tools installs the latest version of clang (and others) in /Library/Developer/CommandLineTools/... but not in /usr/bin/

    I've upgraded Xcode to the latest 5.1 Installed Command Line Tools via xcode-select --install Homebrew tells me "A newer Command Line Tools release is available"
    brew --config:
    Xcode: 5.1 CLT: 5.1.0.0.1.1393561416 LLVM-GCC: build 2336 Clang: 3.1 build 318
    Checking my clang executable:
    $ /usr/bin/clang --version Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
    $ /Library/Developer/CommandLineTools/usr/bin/clang --version Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
    So it appears Command Line Tools didn't install clang (and perhaps other executables) into /usr/bin? I checked my other laptop (w/ Mavericks), and /usr/bin/clang is version 5.1.
    So I'm guessing this is the problem? I've tried to reinstall Command Line Tools as sudo, but now it won't let me install again (says software isn't currently available).
    Can anyone help me with this? I've spent hours on it now, but can't find a solution.
    Thanks

    BTW, I installed Xcode 5.1 from the Store, but have never run xcode-select --install.  Here is the verbose output from a clang.
    xew ~/$:clang -v -o hello main.c
    Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
    Target: x86_64-apple-darwin13.1.0
    Thread model: posix
    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.9.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name main.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 236.3 -v -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ usr/bin/../lib/clang/5.1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/ SDKs/MacOSX10.9.sdk -fdebug-compilation-dir /Users/xew -ferror-limit 19 -fmessage-length 100 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.9.0 -fencode-extended-block-signature -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /var/folders/zf/d5vqmmtn5mq7h6766jtlkrvr0000gn/T/main-353995.o -x c main.c
    clang -cc1 version 5.1 based upon LLVM 3.4svn default target x86_64-apple-darwin13.1.0
    ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer /SDKs/MacOSX10.9.sdk/usr/local/include"
    ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer /SDKs/MacOSX10.9.sdk/Library/Frameworks"
    #include "..." search starts here:
    #include <...> search starts here:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ usr/bin/../lib/clang/5.1/include
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ usr/include
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/ SDKs/MacOSX10.9.sdk/usr/include
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/ SDKs/MacOSX10.9.sdk/System/Library/Frameworks (framework directory)
    End of search list.
    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.9.0 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/ SDKs/MacOSX10.9.sdk -o hello /var/folders/zf/d5vqmmtn5mq7h6766jtlkrvr0000gn/T/main-353995.o -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ usr/bin/../lib/clang/5.1/lib/darwin/libclang_rt.osx.a
    xew ~/$:

  • Issue while creating BPEL artifacts using BPEL command line tool

    All
    I am trying to create BPEL artificats for SQL server stored procedure for SQO Server 2005 using BPEL Command line tool.
    My demo.properties is
    ProductName=Microsoft SQL Server
    DriverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
    ConnectionString=jdbc:sqlserver://10.10.20.2:1433;databaseName=dAP
    Username:apcdb
    Password:password1
    SchemaName:dev
    ProcedureName:spiSOATesting
    ServiceName:SQLServerSPService
    DatabaseConnection:MSSQLServer
    Destination:c:/temp/sqlprocedure
    and I have create a batch file called as generate.bat and it contains following information
    java -cp D:\jdevstudio10134\integration\lib\DBAdapter.jar;D:\jdevstudio10134\integration\lib\bpm-infra.jar;D:\jdevstudio10134\integration\lib\orabpel.jar;D:\jdevstudio10134\lib\xmlparserv2.jar;D:\jdevstudio10134\lib\xschema.jar;D:\jdevstudio10134\toplink\jlib\toplink.jar;D:\jdevstudio10134\integration\lib\connector15.jar;D:\temp\sqlprocedure\JDBC\sqljdbc.jar oracle.tip.adapter.db.sp.artifacts.GenerateArtifacts %1
    and when I try to run the command at BPEL PM Developer Prompt, I am getting Procedure not found, Can one please tell, what is the cause of this error. and how does this command line tool exactly work.
    Following is the output from command prompt.
    D:\product\10.1.3.1\OracleAS_1\bpel\samples>D:\temp\sqlprocedure\generate.bat D:\temp\sqlprocedure\demo.properties
    D:\product\10.1.3.1\OracleAS_1\bpel\samples>java -cp D:\jdevstudio10134\integration\lib\DBAdapter.jar;D:\jdevstudio10134\integration\lib\bpm-infra.jar
    ;D:\jdevstudio10134\integration\lib\orabpel.jar;D:\jdevstudio10134\lib\xmlparserv2.jar;D:\jdevstudio10134\lib\xschema.jar;D:\jdevstudio10134\toplink\j
    lib\toplink.jar;D:\jdevstudio10134\integration\lib\connector15.jar;D:\temp\sqlprocedure\JDBC\sqljdbc.jar oracle.tip.adapter.db.sp.artifacts.GenerateArtifacts D:\temp\sqlprocedure\demo.properties
    Procedure not found: dAP.spiSOATesting
    Thank you

    HI
      Pricing will be carried basing on the pricing
    procedure.
    Case1: Prices will be carried out automatically if
    necessary condition records are maintained for the
    condition type.
      For this you can go to Sales Order-> Item Conditions
    In the screen you can click on command button Analysis,
    which gives you the list of condition types associated
    to the pricing procedure. By clicking on the condition
    type you can know the action that has taken place.
    Case2: Manually forcing prices for Items.
      To do this, you have to populate ORDER_CONDITIONS_IN &
    ORDER_CONDITIONS_INX. Also note to identify the item
    numbers, you manually pass the item number for each item
    in the sales order, use the same item number for
    populating conditions.
      Parameters required:
    ORDER_CONDITIONS_IN:
      ITM_NUMBER, COND_TYPE, COND_VALUE, CURRENCY
    ORDER_CONDITIONS_INX:
      ITM_NUMBER, COND_TYPE, UPDATEFLAG, COND_VALUE,CURRENCY.
       Hope the above info helps you. Do revert back if you
    need more info.
    Kind Regards
    Eswar

  • "add_mp_to_mpa" is not recognized by OEM 12C Command line tool

    Hi,
    As per Oracle® Enterprise Manager Command Line Interface 12c Release 1 (12.1) document ( http://docs.oracle.com/cd/E24628_01/em.121/e17786/cli.htm ), after the EM CLI Client is installed basic operational verbs like 'add_mp_to_mpa " can be used to create managenment plug-in archive. But when i am using this command with OEM 12C EM CLI command line tool it throws following error
    +Error: The command name "add_mp_to_mpa" is not a recognized command.+
    +Run the "help" command for a list of recognized commands.+
    +You may also need to run the "sync" command to synchronize with the current OMS+.
    I also used sync command to sync with my OMS server. The sync command ran successfully with output "Synchronized successfully" .
    When i use help command("emcli help") to see the list of command it supports, it doesn't list this ('add_mp_to_mpa ') verb.
    Please tell me how can i use this particular verb to create my own management plug-in archive(.jar file) in 12 C.
    -Tripati

    "add_mp_to_mpa" verb is no longer an emcli verb in EM 12c. The plug-in framework has changed EM 12c. If necessary, please see the following doc for information on packaging and deploying a plug-in.
    http://docs.oracle.com/cd/E24628_01/doc.121/e25161/package.htm#CACDJJDA
    Regards,
    - Loc

  • How are Windows Server Backup and Command Line Tools used in vCSHB installation?

    How are Windows Server Backup and Command Line Tools used during the installation of vCSHB?  Is it required in all types of deployments (PtoV, VtoV, PtoP)? Is it used to create the files that are put in the file share for the second node to use during vCSHB installation or is it only used during a vCSHB clone operation of a Physical to Physical deployment?  Are these tools not used in some deployments?

    You need Windows Server Backup installed on source and destination, and during the installation of vCSHB the installer will invoke the wbadmin (Windows Server Backup Utility) and will backup configuration and application data (application data is optimal but can decrease the sync time after installation of secondary node). On the secondary node you will need only run the vCSHB installer and everything will be restored.
    Check this blog entry for some more info about some problems in P2P deployment: http://www.vcoportal.de/2013/12/vmware-vcenter-server-heartbeat-restore-on-a-second-node-a-journey/

  • What are the commands for compiling c++ using the command line tools for xcode?

    Hi, I am taking a class in school for c++ and i would like ot be able to practice at home i found the command line tools for xcode and went ahead and installed it on my computer. now i need to know the commands and procedure to be able to compile and run c++.

    c++ testfile.cc

  • How can I create a NetBoot image using command line tools?

    Is it possible to create a NetBoot image entirely using command line tools?
    (That is, without using the SystemImageUtility)
    If so, are there reasonable instructions posted somewhere?
    I don't believe I can use SystemImageUtility with my current setup,
    but I would be happy to hear how I could:
    I have a set of Xserve clusternodes but without optical drives or video cards.
    One node acts as the head, running DHCP, DNS, OpenDirectory, Xgrid.
    They are wired to a gigabit switch.
    I have a PowerBook connected on the subnet which has ServerAdmin Tools installed.
    I don't think when I run SystemImageUtility on my PowerBook that I can successfully image one of the clusternodes disks over the network.
    I have tried to start one node in target(Firewire) mode, connect it via Firewire
    to the head node, and run hdiutil from the head node to make a complete disk image of the clusternode's drive.
    But a NetBoot image requires the whole nbi file, right?
    Could I then use copy this disk image to my PowerBook and use SystemImageUtility on my PowerBook to create a NetBoot image from it?
    I really have tried to read the PDFs, but I found the section on System Imaging in the Command Line Reference rather unhelpful.
    Thanks for anyones help.
    dmaus
      Mac OS X (10.4.4)  

    To create a NetBoot image, you could just put the cluster node in target mode and attach it to your PowerBook. Then use SIU to create the NetBoot image.
    If you're trying to create a backup image of the disk, use hdiutil, or put in in target mode and create the image with Disk Utility.

  • Can not login into command line tool or check out application system

    Hi,
    I'm not able to check out application system. Message error stack is empty. If I try to connect using command line tool to purge the version I get this:
    Repository Command Line Tool: Production on 11-July-03, 18:46
    Release 9.0.2.90.21 - (c) Copyright 2002 Oracle Corporation. All Rights Reserve
    d
    REPCMD> conn repos_manager@msdes01
    Enter password: ******
    [JDK2] No message error
    oracle.repos.services.ReposServiceException
    at oracle.repos.services.connection.RepositoryConnection.setConnection(R
    epositoryConnection.java:613)
    at oracle.repos.services.connection.RepositoryConnection.setConnection(R
    epositoryConnection.java:539)
    at oracle.repos.tools.cmdline.util.CmdLineConnection.setConnection(CmdLi
    neConnection.java:162)
    at oracle.repos.services.connection.RepositoryConnection.<init>(Reposito
    ryConnection.java:333)
    at oracle.repos.tools.cmdline.util.CmdLineConnection.<init>(CmdLineConne
    ction.java:122)
    at oracle.repos.tools.cmdline.ConnectCommand.runConnect(ConnectCommand.j
    ava:197)
    at oracle.repos.tools.cmdline.ConnectCommand.exec(ConnectCommand.java:78
    at oracle.repos.tools.cmdline.BaseCommand.exec2(BaseCommand.java:130)
    at oracle.repos.tools.cmdline.CommandLine.run(CommandLine.java:494)
    REPCMD>
    Any help will be greatly appreciated.
    Thanks,
    Radek

    Radek,
    See Metalink article <Note:178311.1>
    I assume sqlplus and the Repository Object Navigator are working.
    Check the tnsnames.ora file:-
    i.e Change the entry
    DTE817.world = (DESCRIPTION = (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ukp-desteam)(PORT = 1521)))
    (CONNECT_DATA = (SID = DTE817)))
    to
    DTE817.world = (DESCRIPTION = (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ukp-desteam)(PORT = 1521)))
    (CONNECT_DATA = (SERVICE_NAME = DTE817)))
    David

  • Oracle Http server 11g, change ports with command-line tool

    I have installed the WLS11g webtier's Oracle Http server 11g. I installed the OH 11g only.
    The OH is runing fine with ports: non-ssl 7779 and ssl 4444
    I want to change the ssl port to 443 such that we can have the url without showing the port as https://hostname.domain/
    I have looked up the documnet http://download.oracle.com/docs/cd/E15523_01/core.1111/e10105/ports.htm#CIHJIFHB for "managing port".
    it states "You can change the port numbers for some Oracle Fusion Middleware components, using Fusion Middleware Control, Oracle WebLogic Server Administration Console, or *the command line*."
    Because I only installed the OH, I have no the Fusion Middleware control , admin console available for making the port change. And I cannot find out how to the command line tool to make the change.
    I followed the steps in section 5.3.2.1 Enabling Oracle HTTP Server to Run as Root for Ports Set to Less Than 1024 (UNIX Only) http://download.oracle.com/docs/cd/E15523_01/core.1111/e10105/ports.htm#CIHJEEJH
    And I did edit ssl.conf for port change to 443 ---- this is not documented in the document. I think because Oracle wants you to use the console to make the change.
    OH is not working after I made the change.
    Does anyone know how to use the commend line tool for making the port changes for OH11g?
    Thanks

    Hi,
    if u want to achieve it using JMX then u can try :
    http://middlewaremagic.com/weblogic/?p=613
    Using Command Line Option WLST you can do it in ONLINE Mode...like:
    Step1). Please run the ". ./setWLSEnv.sh" script to set the CLASSPATH & PATH in the shell prompt.
    <b><font color=red>NOTE:</font></b> Run the “setWLSEnv.sh” by adding two DOTs separated by a single space …..before the actual script like following : (use ‘cd’ command to move inside the <BEA_HOME>/wlserver_10.3/server/bin) then run the following command….
    *. ./setWLSEnv.sh*
    Note: the first DOT represents that set the Environment in the current Shell, AND the second ./ represents execute the script from the current directory.
    Step2). Now in the same Shell Prompt please run the WLST Utility like following:
    <b><font color=maroon>
    java weblogic.WLST
    wls:/offline> connect()
    Please enter your username [weblogic] : weblogic
    Please enter your password [weblogic] : weblogic
    Please enter your server URL [t3://localhost:7001] : t3://localhost:7001
    Connecting to t3://localhost:7001 with userid weblogic ...
    edit()
    startEdit()
    cd ('Servers/AdminServer')
    cmo.setListenPort(9999)
    save()
    activate()
    </font></b>
    Now you NEED NOT to restart your Server to reflact these Changes....
    The Above JMX Code is also able to do it in Runtime only on the Fly.
    Thanks
    Jay SenSharma
    http://middlewaremagic.com/weblogic (Middleware Magic Is Here)

  • Command line tools for xcode??

    I am used to compiling code much like the java sdk works from terminal where I say javac the filename and then i get a .class file that i can run by doing the command java and then the .class file after. I am now wanting to learn c++ and I dont feel like installing xcode all i want is a compiler that can run from terminal. i found command line tools for xcode on the apple developers site and i was wondering do i need xcode for this to run and after that what the commands are and how i compile/run the code. But my biggest question is still wether or not i need xcode to let command line tools work. ive read in a couple places i dont need it but in other ive read you do can i get help?!

    You don't need Xcode to compile your apps with; just the compiler/linker.
    Xcode is Apple's IDE.  One could write the same code in TextEdit but that wouldn't be easy nor fun.
    (Missed it by THAT much!) 

  • Trying to install gcc with Command Line Tools - Mountain Lion

    I am trying to update the CUDA driver for an NVIDIA GeForce GTX 570 card. To do that, I need gcc installed.
    It appears I have not been able to install gcc, and I need help doing this.
    I am a newbie to both Terminal commands and to updating CUDA drivers, so please bear with me.
    I am running Mountain Lion (10.8.2) on a dual quad core Mac Pro (mid 2010 model).
    I have been following the guide here:
    http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-mac-os-x/index.html
    To install gcc w/o having to install Xcode (I don’t need all of Xcode and so don’t want it installed), I downloaded the “Command Line Tools (OS X Mountain Lion) for Xcode – November 2012” from the Apple Developer Downloads page:
    xcode452cltools10_86938211a.dmg
    I also downloaded the “Mac OS X CUDA 5 Production Release” from the NVIDIA Developers Download page:
    cuda_5.0.36_macos.pkg
    I installed the Command Line Tools, and then installed the CUDA 5 Release (driver, toolkit, samples). Both installed successfully.
    To verify that gcc was installed, I entered the Terminal command (the guide above says this is how I check):
    /usr/bin/gcc –-help
    The resulting message was:
    i686-apple-darwin11-llvm-gcc-4.2: –-help: No such file or directory
    i686-apple-darwin11-llvm-gcc-4.2: no input files
    I take it this means I did not successfully install gcc.
    Please tell me what I am doing wrong.
    NOTE: The steps below may not be of interest to you, since they are steps to verify the CUDA driver was updated (once gcc is successfully installed).
    But I included them in the post, in case they are helpful..
    I went to “Define the environment variables”.
    I entered the command
    export PATH=/Developer/NVIDIA/CUDA-5.0/bin:$PATH
    I got no message
    I then entered the command:
    export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-5.0/lib:$DYLD_LIBRARY_PATH
    I got no message
    To verify that the CUDA kernel extension is loaded, I then entered the command:
    kextstat | grep -i cuda
    I got this message:
    123 0 0xffffff7f81e69000 0x2000 0x2000 com.nvidia.CUDA (1.1.0)
    I then checked the CUDA Toolkit version by entering the command:
    nvcc –V
    I got the message:
    nvcc: NVIDIA (R) Cuda compiler driver
    Copyright (c) 2005-2012 NVIDIA Corporation
    Built on Fri_Sep_28_16:10:16_PDT_2012
    Cuda compilation tools, release 5.0, V0.2.1221
    To change the directory, I then entered:
    cd /Developer/NVIDIA/CUDA-5.0/samples
    Then to compile the samples, I entered:
    make
    The resulting message was:
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all'.
    Makefile:79: *** MPI not found, not building simpleMPI.. Stop.
    make: *** [0_Simple/simpleMPI/Makefile.ph_build] Error 2
    To run the binaries, I changed the directory by entering:
    cd /Developer/NVIDIA/CUDA-5.0/samples/C/bin/darwin/release
    and then entered
    deviceQuery
    I got the message:
    -bash: cd: /Developer/NVIDIA/CUDA-5.0/samples/C/bin/darwin/release: No such file or directory

    (1) When I typed in the command
    /usr/bin/gcc –v
    I got this response:
    Using built-in specs.
    Target: i686-apple-darwin11
    Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/dst-llvmCore/Deve loper/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
    Thread model: posix
    gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
    Does this say I successfully installed gcc? 4.2.1 is the latest version?
    If I have successfully installed the latest version of gcc, then my problem lies with the installation of the CUDA driver.
    If your command worked, then the NVIDIA "CUDA Getting Started Guide" doc I referenced above, which I am following, is just incorrect.
    (2) I then went through the same steps as above, and got the same responses, until I got to the "make" command. This time I entered
    make clean
    And I got the response:
    rm -f asyncAPI asyncAPI.o
    rm -f cdpSimplePrint cdpSimplePrint.o
    rm -f cdpSimpleQuicksort cdpSimpleQuicksort.o
    rm -f clock clock.o *.bin
    rm -f cppIntegration cppIntegration.o cppIntegration_gold.o main.o *.bin
    rm -f cudaOpenMP cudaOpenMP.o
    rm -f inlinePTX inlinePTX.o *.bin
    rm -f matrixMul matrixMul.o
    rm -f matrixMulCUBLAS.o matrixMulCUBLAS
    rm -f matrixMulDrv matrixMulDrv.o data/matrixMul_kernel64.ptx matrixMul_kernel64.ptx
    rm -f matrixMulDynlinkJIT matrixMulDynlinkJIT.o matrixMul_gold.o matrixMul_kernel_32_ptxdump.o matrixMul_kernel_64_ptxdump.o cuda_drvapi_dynlink.o
    rm -f simpleAssert simpleAssert.o
    rm -f simpleAtomicIntrinsics simpleAtomicIntrinsics.o simpleAtomicIntrinsics_cpu.o
    rm -f simpleCallback simpleCallback.o multithreading.o *.bin
    rm -f simpleCubemapTexture simpleCubemapTexture.o *.bin
    rm -f simpleIPC simpleIPC.o
    rm -f simpleLayeredTexture simpleLayeredTexture.o
    Makefile:79: *** MPI not found, not building simpleMPI..  Stop.
    make: *** [0_Simple/simpleMPI/Makefile.ph_clean] Error 2
    Then I entered
    make
    And I got the response:
    /Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64  -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o asyncAPI.o -c asyncAPI.cu
    g++ -arch x86_64 -o asyncAPI asyncAPI.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart
    mkdir -p ../../bin/darwin/release
    cp asyncAPI ../../bin/darwin/release
    /Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -dc  -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o cdpSimplePrint.o -c cdpSimplePrint.cu
    /Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -gencode arch=compute_35,code=sm_35  -o cdpSimplePrint cdpSimplePrint.o -L/Developer/NVIDIA/CUDA-5.0/lib -lcudadevrt
    mkdir -p ../../bin/darwin/release
    cp cdpSimplePrint ../../bin/darwin/release
    /Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -dc  -gencode arch=compute_35,code=sm_35  -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o cdpSimpleQuicksort.o -c cdpSimpleQuicksort.cu
    /Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -gencode arch=compute_35,code=sm_35  -o cdpSimpleQuicksort cdpSimpleQuicksort.o -L/Developer/NVIDIA/CUDA-5.0/lib -lcudadevrt
    mkdir -p ../../bin/darwin/release
    cp cdpSimpleQuicksort ../../bin/darwin/release
    /Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64  -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o clock.o -c clock.cu
    g++ -arch x86_64 -o clock clock.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart
    mkdir -p ../../bin/darwin/release
    cp clock ../../bin/darwin/release
    /Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64  -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o cppIntegration.o -c cppIntegration.cu
    g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o cppIntegration_gold.o -c cppIntegration_gold.cpp
    g++ -arch x86_64   -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o main.o -c main.cpp
    g++ -arch x86_64 -o cppIntegration cppIntegration.o cppIntegration_gold.o main.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart
    mkdir -p ../../bin/darwin/release
    cp cppIntegration ../../bin/darwin/release
    /Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -lineinfo -Xcompiler -fopenmp  -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o cudaOpenMP.o -c cudaOpenMP.cu
    ptxas warning : Command line option '--generate-line-info' not supported for 'sm_1x architecture', will be ignored
    g++ -arch x86_64 -o cudaOpenMP cudaOpenMP.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart -lgomp
    mkdir -p ../../bin/darwin/release
    cp cudaOpenMP ../../bin/darwin/release
    /Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64  -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o inlinePTX.o -c inlinePTX.cu
    g++ -arch x86_64 -o inlinePTX inlinePTX.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart
    mkdir -p ../../bin/darwin/release
    cp inlinePTX ../../bin/darwin/release
    /Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64  -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o matrixMul.o -c matrixMul.cu
    g++ -arch x86_64 -o matrixMul matrixMul.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart
    mkdir -p ../../bin/darwin/release
    cp matrixMul ../../bin/darwin/release
    g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o matrixMulCUBLAS.o -c matrixMulCUBLAS.cpp
    g++ -arch x86_64 -o matrixMulCUBLAS matrixMulCUBLAS.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart -lcublas
    mkdir -p ../../bin/darwin/release
    cp matrixMulCUBLAS ../../bin/darwin/release
    g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o matrixMulDrv.o -c matrixMulDrv.cpp
    g++ -arch x86_64 -o matrixMulDrv matrixMulDrv.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -framework CUDA
    mkdir -p ../../bin/darwin/release
    cp matrixMulDrv ../../bin/darwin/release
    /Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64  -gencode arch=compute_10,code=sm_10 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o matrixMul_kernel64.ptx -ptx matrixMul_kernel.cu
    mkdir -p data
    cp matrixMul_kernel64.ptx ./data
    g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -o matrixMulDynlinkJIT.o -c matrixMulDynlinkJIT.cpp
    g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -o matrixMul_gold.o -c matrixMul_gold.cpp
    g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -o matrixMul_kernel_32_ptxdump.o -c matrixMul_kernel_32_ptxdump.c
    g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -o matrixMul_kernel_64_ptxdump.o -c matrixMul_kernel_64_ptxdump.c
    g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -o cuda_drvapi_dynlink.o -c cuda_drvapi_dynlink.c
    g++ -arch x86_64  -o matrixMulDynlinkJIT matrixMulDynlinkJIT.o matrixMul_gold.o matrixMul_kernel_32_ptxdump.o matrixMul_kernel_64_ptxdump.o cuda_drvapi_dynlink.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -framework CUDA
    mkdir -p ../../bin/darwin/release
    cp matrixMulDynlinkJIT ../../bin/darwin/release
    /Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64  -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o simpleAssert.o -c simpleAssert.cu
    g++ -arch x86_64 -o simpleAssert simpleAssert.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart
    mkdir -p ../../bin/darwin/release
    cp simpleAssert ../../bin/darwin/release
    /Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64  -gencode arch=compute_11,code=sm_11 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o simpleAtomicIntrinsics.o -c simpleAtomicIntrinsics.cu
    g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o simpleAtomicIntrinsics_cpu.o -c simpleAtomicIntrinsics_cpu.cpp
    g++ -arch x86_64 -o simpleAtomicIntrinsics simpleAtomicIntrinsics.o simpleAtomicIntrinsics_cpu.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart
    mkdir -p ../../bin/darwin/release
    cp simpleAtomicIntrinsics ../../bin/darwin/release
    /Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64  -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o simpleCallback.o -c simpleCallback.cu
    g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o multithreading.o -c multithreading.cpp
    g++ -arch x86_64 -o simpleCallback simpleCallback.o multithreading.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart -lpthread
    mkdir -p ../../bin/darwin/release
    cp simpleCallback ../../bin/darwin/release
    /Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64  -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o simpleCubemapTexture.o -c simpleCubemapTexture.cu
    g++ -arch x86_64 -o simpleCubemapTexture simpleCubemapTexture.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart
    mkdir -p ../../bin/darwin/release
    cp simpleCubemapTexture ../../bin/darwin/release
    /Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64  -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o simpleIPC.o -c simpleIPC.cu
    g++ -arch x86_64 -o simpleIPC simpleIPC.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart
    mkdir -p ../../bin/darwin/release
    cp simpleIPC ../../bin/darwin/release
    /Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64  -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o simpleLayeredTexture.o -c simpleLayeredTexture.cu
    g++ -arch x86_64 -o simpleLayeredTexture simpleLayeredTexture.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart
    mkdir -p ../../bin/darwin/release
    cp simpleLayeredTexture ../../bin/darwin/release
    Makefile:79: *** MPI not found, not building simpleMPI..  Stop.
    make: *** [0_Simple/simpleMPI/Makefile.ph_build] Error 2
    There is still an "Error 2" at the end, so something still appears to be wrong.

  • Hello I am on a macbook pro (retina IOS 9) i have installed xcodes and command line tools but codeblocks does not compile, terminal gives this message /Users/MacPc/Desktop/Untitled1: Permission denied      any one has a solution

    Hello I am on a macbook pro (retina IOS 9) i have installed xcodes and command line tools but codeblocks does not compile, terminal gives this message /Users/MacPc/Desktop/Untitled1: Permission denied      any one has a solution?? please...

    Back up all data before proceeding.
    This procedure will unlock all your user files (not system files) and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.
    Step 1
    If you have more than one user, and the one in question is not an administrator, then go to Step 2.
    Triple-click anywhere in the following line on this page to select it:
    sudo find ~ $TMPDIR.. -exec chflags -h nouchg,nouappnd,noschg,nosappnd {} + -exec chown -h $UID {} + -exec chmod +rw {} + -exec chmod -h -N {} + -type d -exec chmod -h +x {} + 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.
    Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.
    Start up in Recovery mode. When the OS X Utilities screen appears, select
              Utilities ▹ Terminal
    from the menu bar. A Terminal window will open. In that window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window will open. You’re not going to reset a password.
    Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
               ▹ Restart
    from the menu bar.

  • Command line tools for xcode mac os x 10.6.8

    Hi,
    Will the latest command line tool work for mac os x 10.6.8 also? If yes, I will go ahead and download them.
    If no, please help find a download location for command line tools for mac os x 10.6.8.
    Also, please let me know if that will support the development of latest ios apps.

    developing for "the latest iOS Apps" is supported by the latest X-code tools, which does NOT run under 10.6.8.
    Version 3.2.6 will run under 10.6.6 and later.
    Version 5.0.1 requires 10.8.4 or later.
    Version 6.1.1 (currently the latest) requires 10.9.4 or later.

Maybe you are looking for

  • Using spry select on multiple forms in same page

    Greetings- My apologies if this has already been answered but after a few searches I've not found my solution.... I have a web page with 2 different forms (completely different open form and close form tags) that I'm trying to get the Spry Select Wid

  • Competition with Business Catalyst and Sharepoint

    Do DW web developers have a future? Do business owners mistrust web developers so much that they are willing to settle for a cookie-cutter website? I find it interesting and somewhat unsettling that no matter what advances are made in technology, web

  • Proxy connection error sending big files

    Hello experts, I am sending a simple proxy to PI in order to generate an XML. When the XML that I get is less than 100MB big, it works fine and the XML gets generated. On the other hand, when I try to generate a file anything bigger, I get the follow

  • Characterstics for set of batches

    Hi For each Batch we maintain different cgaracterstics and its values are diffeent for different batches. Can we get characterstics for a set of batches. The batch characterstics in which table it will store. Regards, srihari.M

  • BAPI for reading capacity of a workplace/work center?

    Hi, I'm looking for a BAPI/RFC using SAP MII to read the capacity of a workplace/work center in a given time period (eg. one or more days/weeks/...). I would like to use the import parameters plant ( WERKS ), date from, date to, workplace/work center