Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. execl and spawnl problems

execl and spawnl problems

Scheduled Pinned Locked Moved C / C++ / MFC
c++graphicsgame-devhelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hi folks, I'm having problems when using the _execl() and _spawnl() functions - the compiler/linker can't find their definitions (undeclared identifier, i.e. not seeing the function prototype). Basically, what I hope to do is to run a simple DOS application via my app without having the MS-DOS prompt popping up. I've looked in the MSDN help and have included all the correct headers (process.h and errno.h). As far as I can tell I'm doing it correctly. My application is an MFC App (for an OpenGL app) running on Windows 98. Hope you can help and thanks for your time. Cheers, Stephen McGeown.

    T 1 Reply Last reply
    0
    • L Lost User

      Hi folks, I'm having problems when using the _execl() and _spawnl() functions - the compiler/linker can't find their definitions (undeclared identifier, i.e. not seeing the function prototype). Basically, what I hope to do is to run a simple DOS application via my app without having the MS-DOS prompt popping up. I've looked in the MSDN help and have included all the correct headers (process.h and errno.h). As far as I can tell I'm doing it correctly. My application is an MFC App (for an OpenGL app) running on Windows 98. Hope you can help and thanks for your time. Cheers, Stephen McGeown.

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      It works on my machine (VC6 SP5). Check if your include paths are set correctly. BTW: you may want to call ::CreateProcess instead of exec/spawn if you don't want visible console window - this call gives you much more control over child process. exec/spawn are implemented using CreateProcess. Tomasz Sowinski -- http://www.shooltz.com.pl

      S 1 Reply Last reply
      0
      • T Tomasz Sowinski

        It works on my machine (VC6 SP5). Check if your include paths are set correctly. BTW: you may want to call ::CreateProcess instead of exec/spawn if you don't want visible console window - this call gives you much more control over child process. exec/spawn are implemented using CreateProcess. Tomasz Sowinski -- http://www.shooltz.com.pl

        S Offline
        S Offline
        Stephen McGeown
        wrote on last edited by
        #3

        Thanks for your help Tomasz. I'm *pretty* sure my include paths are correct. Just wondering whether it makes a difference because it's a *.cpp file, not *.c ? Anyway, the CreateProcess call looks better so I'll give it a bash. Cheers!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups