Results 1 to 16 of 16

Thread: 'test' is not recognized as an internal or external command

  1. #1
    Join Date
    Feb 2007
    Posts
    81
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default 'test' is not recognized as an internal or external command

    I'm trying to compile a program with Qt 4.3.0 on Windows Vista, and after a million issues of trying to even get Qt installed, I am now getting this error:

    Qt Code:
    1. 'test' is not recognized as an internal or external command,
    2. operable program or batch file.
    3. The syntax of the command is incorrect.
    4. C:\mingw\bin\mingw32-make.exe: *** [vecmat//Makefile] Error 1
    To copy to clipboard, switch view to plain text mode 

    there are two lines in the generated makefile that say CHK_DIR_EXISTS = test -d

    but i'm not really sure what that does or why it's never given me an error on Windows XP. It's also really difficult to search for a common word like "test" on google. Thanks for the help. This is frustrating. I'm using mingw32 4.3.2 and all my environment variables are supposedly correct.

    thanks for the help,
    dave

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: 'test' is not recognized as an internal or external command

    Supposedly or correct? Are you using the "Qt command prompt"?

  3. #3
    Join Date
    Feb 2007
    Posts
    81
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: 'test' is not recognized as an internal or external command

    I'm just using powershell and the regular command prompt, and also trying to do it from within eclipse IDE. Other than an error with my environment variables, what might be the problem?

    What is the qt command prompt? i've never heard of it before.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: 'test' is not recognized as an internal or external command

    Quote Originally Posted by dvmorris View Post
    What is the qt command prompt? i've never heard of it before.
    It's a script that starts cmd.exe with environment variables set up correctly. You can find it in the Start menu in the same place where links to Qt Assistant and Qt Designer are.

  5. #5
    Join Date
    Feb 2007
    Posts
    81
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: 'test' is not recognized as an internal or external command

    ok, i tried again and i still get the error about 'test' not being recognized as a command. i can't find anything in the qmake documentation about this. any ideas.?

  6. #6
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: 'test' is not recognized as an internal or external command

    For windows it should be:
    CHK_DIR_EXISTS= if not exist
    Are you sure you used the right QMAKESPEC?
    Anyway, it was weird from the beginning because there is no test command(by default). Maybe there is one that comes bundled with mingw, in which case you must have the path to the mingw binaries in PATH.

    Regards

  7. #7
    Join Date
    Feb 2007
    Posts
    81
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: 'test' is not recognized as an internal or external command

    it's using win32-g++

    is that correct?

  8. #8
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: 'test' is not recognized as an internal or external command

    Anyway, this is pretty much how it should look like:
    Qt Code:
    1. first: release
    2. install: release-install
    3. uninstall: release-uninstall
    4. MAKEFILE = Makefile
    5. QMAKE = qmake
    6. DEL_FILE = del
    7. CHK_DIR_EXISTS= if not exist
    8. MKDIR = mkdir
    9. COPY = copy /y
    10. COPY_FILE = $(COPY)
    11. COPY_DIR = xcopy /s /q /y /i
    12. INSTALL_FILE = $(COPY_FILE)
    13. INSTALL_PROGRAM =
    14. INSTALL_DIR = $(COPY_DIR)
    15. DEL_FILE = del
    16. SYMLINK =
    17. DEL_DIR = rmdir
    18. MOVE = move
    19. CHK_DIR_EXISTS= if not exist
    20. MKDIR = mkdir
    21. SUBTARGETS = \
    22. release \
    23. debug
    To copy to clipboard, switch view to plain text mode 

  9. #9
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: 'test' is not recognized as an internal or external command

    Quote Originally Posted by dvmorris View Post
    it's using win32-g++

    is that correct?
    That is correct.

    Then do a search in the mingw install dir for "test"...
    See if anything comes up.

    EDIT: make that "test.exe"

    Regards

  10. #10
    Join Date
    Feb 2007
    Posts
    81
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: 'test' is not recognized as an internal or external command

    there is a sample app called test, but i placed it in the bin directory and when it runs vista gets an error that says test.exe crashes every time i run make.

    on windows xp my makefiles are correct, that's strange. that is the only test.exe on my entire hard drive so i don't know where it is getting that from. it says

    CHK_DIR_EXISTS = test -d

  11. #11
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: 'test' is not recognized as an internal or external command

    Well, it's Vista...
    Try running test.exe as Adminstrator.
    Or, better yet, just disable UAC for 10 minutes and see if it works ( but remember to run it manually - something like test c:\windows ).

    Regards

  12. #12
    Join Date
    Feb 2007
    Posts
    81
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: 'test' is not recognized as an internal or external command

    it just keeps crashing. but even still. test.exe is in the sample programs directory for mingw, so it wouldn't make sense that it would do anything important. i disabled UAC and tried it again as well.

    i don't understand how no one else has had this problem yet. i just installed qt 4.3.0 from the trolltech website with mingw. maybe i should just delete everything and try again.

  13. #13
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: 'test' is not recognized as an internal or external command

    I am now 100% sure that test.exe comes with mingw. And it is normal, because test can be found only on Linux( and other Unix flavors ). It is used mainly for shell scripting.

    Regards

  14. #14
    Join Date
    Feb 2007
    Posts
    81
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: 'test' is not recognized as an internal or external command

    ok, thanks for your help, i will try some other things.

  15. #15
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: 'test' is not recognized as an internal or external command

    Well, I am almost sure this is a compatibility issue( permissions, etc ).

    When you run make, it will look at the exit code of test.exe. This is how it knows a dir exists or not.

    Maybe you can find something relevant on other sites.

    Regards

  16. #16
    Join Date
    Feb 2007
    Posts
    81
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: 'test' is not recognized as an internal or external command

    i deleted absolutely everything related to qt and mingw, and redownloaded it from trolltech, and it seems to be working now. for some reason i have a knack for finding ways to make qt break on all my os's. i always have weird problems on os x as well.

    anyways, thank you so much for your help.
    dave

Similar Threads

  1. Replies: 16
    Last Post: 23rd May 2008, 10:12
  2. 'make' is not recognized as an internal or external command
    By jivanr in forum Installation and Deployment
    Replies: 1
    Last Post: 9th June 2007, 15:55
  3. Link Errors
    By magikalpnoi in forum Qt Programming
    Replies: 5
    Last Post: 25th September 2006, 22:04

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.