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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 fail to compile the file import programme

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jimstar Posted - 04/09/2013 : 02:39:31 AM
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System: 8.0724

hi,
I am trying to write an Origin C program to fit my data. I started with importing data into worksheet. I copied the example from Origin C wiki, which was as follows:

#include <..\Originlab\FileImport.h>
void load_import_filter_ex()
{
Page pg = Project.Pages(); // Active Page

// Get page book name
string strPageName = pg.GetName();

// Get Origin sample folder
string strPath = GetAppPath(TRUE) + "Samples\\Import and Export\\";

// List all file names need to imported
StringArray saFileNames;
saFileNames.Add(strPath + "pCLAMP\\93310C08.DAT");
saFileNames.Add(strPath + "pCLAMP\\93310C10.DAT");
saFileNames.Add(strPath + "pCLAMP\\93311C01.DAT");

// specify .oif filter name, location see the setting of nLocation below.
string strFilterName = "pCLAMP";

// import filter tree
// about filter settings, refer to imppClamp xfunction tree variable "options"
Tree trFilter;

int nLocation = 1; // Origin exe folder, more options see the document of load_import_filter function.

int nRet;
nRet = load_import_filter(strFilterName, saFileNames[0], strPageName, nLocation, trFilter);

if ( 0 == nRet )
out_str("Success to load import filter!");
else
out_str("Failed to load import filter!\nPlease check strFilterName and nLocation if assigned correctly");
}

And of cause I changed the file path and name. Before compiling, I ran "run.LoadOC(Originlab\FileImport.c, 16)" in the command window. But an error occurred "Error, function or variable load_import_filter not found".

Would you please help me to found out why?
Thank you very much!
9   L A T E S T    R E P L I E S    (Newest First)
jimstar Posted - 05/03/2013 : 04:56:55 AM
I tried but no good.

quote:
Originally posted by rlewis

By trial and error I found that posted code will compile (and execute) only if the the following Originlab files are included in the system WorKspace

FileImport.c
dragNdrop.c
fu_utils.c
IWBase.c
AscImpOptions.c
import_utils.c

Why not give it a try ...

rlewis Posted - 04/25/2013 : 6:53:26 PM
By trial and error I found that posted code will compile (and execute) only if the the following Originlab files are included in the system WorKspace

FileImport.c
dragNdrop.c
fu_utils.c
IWBase.c
AscImpOptions.c
import_utils.c

Why not give it a try ...
jimstar Posted - 04/24/2013 : 10:47:08 PM
quote:
Originally posted by Laurie

Ok, this is a bit trickier, and I think I got lucky when I first tested this, meaning that the necessary header files were already loaded by some other operation I had done in Origin.

Please try the following: You need to exclude your C file from the CodeBuilder workspace when you run the "run.LoadOC(Originlab\FileImport.c, 16)" script. Then this file will compile and link successfully. You can then add back your C file and Build it.

OriginLab Technical Support



I did as you say but no good. Can you help me to find out why? Thanks a lot.
jimstar Posted - 04/18/2013 : 9:41:17 PM



jimstar Posted - 04/18/2013 : 08:27:26 AM
I have tried as you guided, but the problem remained the same. What the hell is going on?
Laurie Posted - 04/17/2013 : 10:19:16 AM
Ok, this is a bit trickier, and I think I got lucky when I first tested this, meaning that the necessary header files were already loaded by some other operation I had done in Origin.

Please try the following: You need to exclude your C file from the CodeBuilder workspace when you run the "run.LoadOC(Originlab\FileImport.c, 16)" script. Then this file will compile and link successfully. You can then add back your C file and Build it.


OriginLab Technical Support
jimstar Posted - 04/15/2013 : 10:29:04 PM
I just try the Origin 9 SR2 evaluation version. The problem remained the same.
Is there any problem with the install directory and user directory? I installed the origin on D drive and the user directory on C drive.
Laurie Posted - 04/15/2013 : 1:49:40 PM
I was successful here. The only difference is that I was running Origin 8.0 SR6. Maybe you can try selecting Help:Check for Updates to get the latest update.

You actually do not need the run.loadOC( ) as that is what the #include <..\Originlab\FileImport.h> statement is for.

OriginLab Technical Support
jimstar Posted - 04/09/2013 : 04:51:08 AM
An error message occurred when running the script run.LoadOC("OriginLab\FileImport.c",16)"

"D:\Program Files\OriginLab\Origin8\OriginC\ORIGINLAB\IW_FILTER.C(1784) :Error, Function fuGetImportMode@IAAAAAAAOGAAAAAA was called, but its body could not be located during linking."

Any idea?

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000