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
 Compiling FileImport.c before every use
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Alexander N

Germany
18 Posts

Posted - 10/16/2009 :  09:53:12 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System: 8.0SR6

Hi,

after I managed to use file_import(), I have another problem:

Everytime before I execute my X-function, I have to execute the compiler like in the help file: run.LoadOC(Originlab\FileImport.c, 16);
After that my own function is executable.

Why do I have to compile it each time before use? Normally Origin compiles one time, then uses the files compiled next time... But not for FileImport.c

On my WinXP SP3 system I'm only a normal user. My user files with the FileImport.OCB is also in the right place. The strange thing the folder names being written in capital letters: OriginLab\Origin8\User Files\OCTemp\ORIGINC\ORIGINLAB

Iris_Bai

China
Posts

Posted - 10/18/2009 :  9:47:41 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

run.LoadOC(Originlab\FileImport.c, 16); command used to load FileImport.c and other source fiels to workspace and compile them. If want to access functions in FileImport.c, you must load all relative source files to workspace and compile by manually or use run.LoadOC command.

In Code Builder, choose File -> New Workspace..., check Origin C Workspace View Template folder, there is no file or only ScriptWindow.C file if Script Window is open.
Then run "run.LoadOC(Originlab\FileImport.c, 16);", check Template folder again, more 6 files are included and compiled done.


Iris
Go to Top of Page

Alexander N

Germany
18 Posts

Posted - 10/19/2009 :  02:58:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Iris,

I thought the parameter = 16 is intended to compile all dependencies without extra work?

Can you explain your solution in more words? I could not follow all your instructions. By templates folder you meant OCTemp, didn't you?

In my user folder there's a file FILEIMPORT.OCB - but in the origin folder it is missing. Do I have to add the OCB-Files to my network package in order to allow other users to use my X-function?

Regards,

Alexander
Go to Top of Page

Alexander N

Germany
18 Posts

Posted - 10/19/2009 :  03:15:40 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
ok,

again I compiled all the files. Under Workspace > Temporary I can see those 6 files. But if I search for them in the Origin folder, there's no version of today. All OCB-files are dated to the installation date.

If I now restart Origin, I get again the same error while executing my X-function (translated into English):

compiling...
FileImport.C
Linking...
C:\Programs\OriginLab\Origin8\OriginC\Originlab\FILEIMPORT.C(1089) :error, function ConvFilter@CAAAAAAAOGAAAAAAOGAAAAAA was called. During linking the function body was not found.
Linking Failed!
Compile Failed!
Go to Top of Page

eparent

118 Posts

Posted - 10/19/2009 :  4:26:07 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Alexander,

Try the following:

Turn on Auto Compile Dependent Files for your X-Function:
1. Open your X-Funciton in X-Function Builder (F10)
2. Switch to Tree View (right-most toolbar button)
3. Make sure "Auto Compile Dependent Files" is checked.

When including the FileImport.h header do it as follows:
#ifdef _FOR_SMART_LOADING_ONLY
#include <..\Originlab\FileImport.h>
#endif

Go to Top of Page

Alexander N

Germany
18 Posts

Posted - 10/20/2009 :  04:27:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi epart,

auto-compile was already turned on. This was not the reason. Then I found a bug squash in FileImport.c from 05-12-2009. I included those lines in my XFC and then I could get rid of the described problem (checked it after a restart):

///---Sim 05-12-2009 QA80-13594 MAKE_USER_IMPORT_OC_CODE_COMPATIBLE
#include <origin.h>
#ifdef _FOR_SMART_LOADING_ONLY
#include "AscImpOptions.h" ///---Sim 10-23-2008 QA80-12422 DRAG_AND_DROP_USE_SHEET_THMEM_WHEN_FROM_SYS_FILTER
#include "IWBase.h"
#include "fu_utils.h"
#endif
#include "import_utils.h"
#include "dragNdrop.h"
#include "FileImport.h"
///---END QA80-13594 MAKE_USER_IMPORT_OC_CODE_COMPATIBLE
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