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
 Compiling FileImport.c before every use

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
Alexander N Posted - 10/16/2009 : 09:53:12 AM
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
5   L A T E S T    R E P L I E S    (Newest First)
Alexander N Posted - 10/20/2009 : 04:27:52 AM
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
eparent Posted - 10/19/2009 : 4:26:07 PM
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

Alexander N Posted - 10/19/2009 : 03:15:40 AM
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!
Alexander N Posted - 10/19/2009 : 02:58:32 AM
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
Iris_Bai Posted - 10/18/2009 : 9:47:41 PM
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

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