unresolved external during _spawnl

This is a discussion on unresolved external during _spawnl within the C++ Programming forums, part of the General Programming Boards category; when I compile this code: ------------------begin code-------------------------- #include <stdio.h> #include <conio.h> #include <process.h> void main() { _spawnl( _P_OVERLAY, "baldor.exe", "baldor.exe", ...

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    3

    Question unresolved external during _spawnl

    when I compile this code:
    ------------------begin code--------------------------
    #include <stdio.h>
    #include <conio.h>
    #include <process.h>

    void main()
    {
    _spawnl( _P_OVERLAY, "baldor.exe", "baldor.exe", NULL);
    return 0;
    }
    ------------------end code--------------------------

    using Microsoft Visual C++ 1.0
    I get these errors:

    Compiling...
    warning C4013: '_spawnl' undefined; assuming extern returning int
    warning C4098: 'main' : 'void' function returning a value

    Linking...
    error L2029: '__p_overlay' : unresolved external
    error L2029: '__spawnl' : unresolved external

    Can anyone help?
    Thanks.

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    >warning C4098: 'main' : 'void' function returning a value

    Solve this first, it's easy.


    Then, goto www.msdn.microsoft.com and look for spawnl.
    When you find the page, it lists the headerfiles you need.
    Use them.

    Make sure Version 1.0 supports this function. It looks right for Version 6.0.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  3. #3
    Registered User
    Join Date
    Feb 2002
    Posts
    3
    Thanks, fixing warning C4098 was easy, my bad.

    Version 1.0 must not support spawn, exec, or system. I've tried them all with the same result (unresolved external). Microsoft online & my Visual C++ help say only <process.h> & <stdio.h> are required, but the program still does not compile (or Link). I will need to upgrade.

  4. #4
    Seņor Member
    Join Date
    Jan 2002
    Posts
    561
    Why are you using 1.0?

  5. #5
    Registered User
    Join Date
    Feb 2002
    Posts
    3
    I picked it up in the discount bin at a bookstore a few years ago. It's what I had at the time I wanted to write this program so I used it. I'm not writing anything fancy, people have been executing programs for decades, I thought it would work. The help files even say it should, the header file includes spawn & exec. I still think I'm missing something, but I'll try getting the Borland 5.5 working on me system.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 01:13 AM
  3. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM
  4. debug to release modes
    By DavidP in forum Game Programming
    Replies: 5
    Last Post: 03-20-2003, 03:01 PM
  5. Unresolved external symbols in OGL
    By Shadow12345 in forum Game Programming
    Replies: 4
    Last Post: 08-04-2002, 10:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21