cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MBLance
Level 4

Getting "can't open include file" upon InstallScript compile.

I am using InstallShield 2009 on an InstallScript project. I have a utility script, SetFileAssociations.rul, in a common directory. I have the main Setup.rul, and at the top I have:

#include "ifx.h"
#include "SetFileAssociations.rul"

I am getting "fatal error F8511: can't open include file"

Background - this is a new project, and I have 10 other InstallScript projects where I am doing exactly the same thing (same file in same location, inserted into Files). Those 10 are all working. I do remember there was something tricky about getting it to work, but I inserted the file, and the path variable is defined properly in the project.

If I import the file, it of course works. However, I do not want to carry a copy of the file in multiple places.

If I use a relative path in the include statement, it works. That seems clunky, and should not be necessary.

It seems like the project is not resolving the path variable at compile time. I have compared the setup.rul files as well as project files from projects that work, and cannot see anything obvious that would cause it not to work.

Ideas? Why is it working 10 out of 11 times?
Labels (1)
0 Kudos
(3) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

You should be able to add the path variable reference to the include paths in Build->Settings to ensure the path is used by the compiler to search for files referenced by #include.
0 Kudos
MBLance
Level 4

Josh - All I can say is "Doh!"

That was the "trick" I figured out last time, and I have no idea how I stumbled into it then. Maybe it is too obvious - using an include, need to set the path! It would be nice if the help mentioned it in the area where it compares and contrasts "Insert" and "Import" for script files.

Thanks for the help!
0 Kudos
CChong
Level 11 Flexeran
Level 11 Flexeran

An almost funny addendum:

As soon as I add to the compiler include path, the master include file "ifx.h" cannot be found anymore, i.e. the standard "default include directory" seems to be somehow overwritten or removed from the path. Is this known? :rolleyes:

Since ..\ instead - being relative to the other standard include folder only works as long the current directory points to the location of the .ism I'd like to use but it isn't possible that way.
0 Kudos