Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who's Online
1 user(s) are online (1 user(s) are browsing Forum)

Members: 0
Guests: 1

more...

Browsing this Thread:   1 Anonymous Users





System + stdlib.h....

Joined:
3/3 13:00
Group:
Member
Posts: 51
Offline
Simple question: what library have i to link if use "System()" function from "stdlib.h"?

libaros.a? libarosc.a? or what other?

Posted on: 3/20 13:45
Transfer the post to other applications Transfer


Re: System + stdlib.h....

Joined:
2016/8/16 0:09
Group:
Member
Posts: 321
Offline
Hi Pasquale,

I think you would have a hard time finding the answer to that question because afaik function System() does not exist, at least not as part of stdlib.h

I'm guessing you meant SystemTags() (or System() macro) from dos library or function system() from stdlib.

In case the first, i'm guessing you know the answer to your own question, and in case the latter ..

/*
    Copyright © 1995-2014, The AROS Development Team. All rights reserved.
    $Id: systemtagsslave.c 49667 2014-09-30 17:35:27Z neil $
*/

#include <proto/dos.h>

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    
BPTR oldlock CurrentDir(BNULL);
    
BPTR lock DupLock(oldlock);
    
CurrentDir(oldlock);
  
    
system("dir");
   
    
lock CurrentDir(lock);
    
UnLock(lock);
  
    return 
0;
}


... compiles with a simple "gcc systemtagsslave.c" so afaik no special linklibs required.

Posted on: 3/20 18:40
Transfer the post to other applications Transfer


Re: System + stdlib.h....

Joined:
3/3 13:00
Group:
Member
Posts: 51
Offline
Thanks, i have solved, system() and not System(), i remember that was
with an other old compiler i have used some time ago...

Posted on: 3/21 3:50
Transfer the post to other applications Transfer






You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4364
2 magorium
magorium
4095
3 phoenixkonsole
phoenixkonsole
3892
4 nikolaos
nikolaos
3694
5 deadwood
deadwood
2923
6 ncafferkey
ncafferkey
2648
7 mazze
mazze
2214
8 clusteruk
clusteruk
2111
9 Kalamatee
Kalamatee
2024
10 damocles
damocles
1789
© 2004-2017 AROS Exec