The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 unable to use <stdlib.h> library
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

MaggotsBrain

Japan
4 Posts

Posted - 08/31/2014 :  10:42:15 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

I am working on an Origin C script and need the malloc function for my program. It is part of the stdlib library, however, when I try to include its header:

#include <stdlib.h>

the compiler invariably returns me the error message:
"C:\Program Files\OriginLab\Origin91\OriginC\system\stdlib.h:Error, include file not found"

I tried to copy the stdlib.h file from my Visual Studio folder to the folder: "C:\Program Files\OriginLab\Origin91\OriginC\system\" but this does not change anything, the same error message is returned.

I am clueless now, what should I do?

Castiel

343 Posts

Posted - 09/02/2014 :  09:02:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You don't need to include stdlib.h so long as #include <origin.h>.

Why do you want malloc()#65311; Do you know vector is available in origin c#65311;

c   ȥ  fuc  c    Τ  c/     
 cʥ       ' ̩   /  թf
                            `    
                              
Go to Top of Page

greg

USA
1378 Posts

Posted - 09/02/2014 :  12:01:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
To be clear...
malloc and free are both included in Origin C.
See Origin C Reference \ Global Functions \ Memory Management
http://www.originlab.com/doc/OriginC/ref/Memory-Management
Go to Top of Page

MaggotsBrain

Japan
4 Posts

Posted - 09/02/2014 :  10:15:15 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you, I did not know that.

I have managed to do what I wanted in another way, without the malloc function.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000