This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Error 8014 - help!
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 19, 2010
12:59 PM
Error 8014 - help!
I'm in a Basic MSI project and have several functions in my setup.rul InstallScript file. I created a separate logging.rul file to contain any custom logging related functions.
But whenever I compile I get the c8014 error saying the function "writeLogFile" is defined elsewhere. I know it's not in any of the other script files, I've checked. I don't understand where this error is coming from or why it's happening?
Any help, please?
prototype writeLogFile(NUMBER, STRING);
function writeLogFile(nvFileHandle, svOutput)
STRING svDate, svTime;
NUMBER nIgnore;
begin
GetSystemInfo(DATE, nIgnore, svDate);
GetSystemInfo(TIME, nIgnore, svTime);
svOutput = svDate + svTime + " " + svOutput;
WriteLine(nvFileHandle, svOutput);
end;
But whenever I compile I get the c8014 error saying the function "writeLogFile" is defined elsewhere. I know it's not in any of the other script files, I've checked. I don't understand where this error is coming from or why it's happening?
Any help, please?
(13) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 19, 2010
02:17 PM
does it go away if you use a different function name?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 19, 2010
02:42 PM
Nope. I changed the name and still the same error.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 24, 2010
09:57 AM
anybody know what's going wrong here? This is preventing me from doing logging.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 25, 2010
08:56 PM
Double clicking the error in the output window should take you to a troublesome part of the script; does commenting out the prototype make any difference? If you do that, does the script compile?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 26, 2010
09:50 AM
I just tried commenting out the prototype declarations. But then instead I get an error saying my functions have no prototype declarations.
Here is my code. LOGFILE_PATH and LOGFILE_NAME are defined in a separate file that is included.
I really don't understand why InstallShield is giving me errors for this.
Here is my code. LOGFILE_PATH and LOGFILE_NAME are defined in a separate file that is included.
prototype NUMBER openLogFile();
prototype writeLogFile(NUMBER, STRING);
function NUMBER openLogFile()
NUMBER nvFileHandle;
begin
OpenFileMode(FILE_MODE_APPEND);
if(ExistsDir(LOGFILE_PATH) < 0) then
CreateDir(LOGFILE_PATH);
endif;
if(OpenFile(nvFileHandle, LOGFILE_PATH, LOGFILE_NAME) < 0) then
MessageBox("Failed to open " + LOGFILE_PATH ^ LOGFILE_NAME, 0);
endif;
return nvFileHandle;
end;
function writeLogFile(nvFileHandle, svOutput)
STRING svDate, svTime;
NUMBER nIgnore;
begin
GetSystemInfo(DATE, nIgnore, svDate);
GetSystemInfo(TIME, nIgnore, svTime);
svOutput = svDate + svTime + " " + svOutput;
WriteLine(nvFileHandle, svOutput);
end;
I really don't understand why InstallShield is giving me errors for this.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 26, 2010
10:49 AM
I moved the functions and declarations to another file, which also has the functions that are calling these logging functions. It compiles fine then. But for some reason it gets an already defined error when I have them in the file logging.rul. I don't understand what the problem is there, but it would be nice if someone has any idea.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 26, 2010
03:21 PM
Nothing in the code posted seems to be an issue. Likely, there is something else in the file causing this behavior, or the file is being included multiple times.
Without any additional context (such as all the .rul/.h files needed to compile this code), we can't offer any specific suggestions. You may try recreating the file that includes this code, and also verify that the file is not #include'd multiple times from other .rul files. If you can send us your script files, we may be able to provide some additional guidance.
Without any additional context (such as all the .rul/.h files needed to compile this code), we can't offer any specific suggestions. You may try recreating the file that includes this code, and also verify that the file is not #include'd multiple times from other .rul files. If you can send us your script files, we may be able to provide some additional guidance.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 27, 2010
01:08 PM
Finally found the culprit! I missed an include statement in my main script file. But since I had already included the logging.rul in another script also being included in the main file, it was causing the problem. Thanks for the help.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 27, 2010
02:07 PM
I think I spoke too soon. The script was compiling fine, but now I get an undefined identifier error when I added the function call. Here is the way my script files are set up.
I have 3 script files, call them FileA, FileB, and FileC. FileC has logging functions which need to be used in all of my script files. So in FileB I include FileC, because I need access to its functions. In FileA I include FileB, because it has helper functions that get called in FileA.
If I try to include FileC in FileA, I get an error saying the functions in FileC are already defined, I assume because they are already included in FileB which is included in FileA.
But if I remove the include FileC statement from FileA and try to use those logging functions, I get an undefined identifier error for those functions when called in FileA.
So how do I get access to the functions in FileC?
I have 3 script files, call them FileA, FileB, and FileC. FileC has logging functions which need to be used in all of my script files. So in FileB I include FileC, because I need access to its functions. In FileA I include FileB, because it has helper functions that get called in FileA.
If I try to include FileC in FileA, I get an error saying the functions in FileC are already defined, I assume because they are already included in FileB which is included in FileA.
But if I remove the include FileC statement from FileA and try to use those logging functions, I get an undefined identifier error for those functions when called in FileA.
So how do I get access to the functions in FileC?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 01, 2010
02:31 PM
You may want to consider moving your function prototypes to a common header file that can be included by any script that needs to call the functions. To ensure the header prototypes are only processed once, use the following pattern in your header file:
#ifndef __HEADER_NAME
#define __HEADER_NAME
// add prototypes here
#endif
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 02, 2010
09:49 AM
Okay, so I have LoggingUtility.h which looks like this
I include LoggingUtility.h and LoggingUtility.rul (containing the function definitions) in my other script files, but I'm still getting the same error. It says the functions in LoggingUtility are already defined. If I remove the .rul include statement, I get the functions are not defined error.
This still doesn't seem to be working, and I'm sure other people would have run into this problem before but I can't seem to find the solution.
#ifndef LoggingUtility.h
#define LoggingUtility.h
prototype NUMBER openLogFile();
prototype writeLogFile(NUMBER, STRING);
#endif
I include LoggingUtility.h and LoggingUtility.rul (containing the function definitions) in my other script files, but I'm still getting the same error. It says the functions in LoggingUtility are already defined. If I remove the .rul include statement, I get the functions are not defined error.
This still doesn't seem to be working, and I'm sure other people would have run into this problem before but I can't seem to find the solution.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 03, 2010
01:02 PM
There are a couple of things that need to be changed slightly to get the script to compile:
- The function prototypes need to use the 'external' keyword to indicate they are implemented in some other script file.
- The logging.rul file needs to be included from one other .rul file (preferably setup.rul).
- Logging.rul should #include logging.h.
Here's some code that logging.h should resemble:
- The function prototypes need to use the 'external' keyword to indicate they are implemented in some other script file.
- The logging.rul file needs to be included from one other .rul file (preferably setup.rul).
- Logging.rul should #include logging.h.
Here's some code that logging.h should resemble:
#ifndef __LOGGING_H
#define __LOGGING_H
external prototype NUMBER openLogFile();
external prototype writeLogFile(NUMBER, STRING);
#endif
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 04, 2010
08:50 AM
okay, I think I got it working. thanks!
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)