|
Post by dave99 on Jan 11, 2015 18:15:53 GMT 1
Hi Peter
Up to now I normally compile my BaCon programs in Puppy but decided to try it on Porteus Linux (Slackware based). I copied bacon.bash (just to try it and decided to use the bash version instead of having to compile it) and hug.bac
It complained that io.h could not be found. I looked in the "usual" place ( /usr/include/sys) and io.h was there, however in bacon.bash (line 4693), it looks for it in /usr/include).
I then looked to see where in Puppy io.h resides and sure enough it was in /usr/include/sys however Puppy also has io.h in /usr/lib/gcc/i486-t2-linux-gnu/4.2.2/include which the compiler finds.
Changing line 4693 in bacon.bash solved the problem.
So my question is, which is the normal place for io.h?
Thanks. Dave.
|
|
|
Post by dave99 on Jan 11, 2015 19:51:47 GMT 1
UPDATE:
What I have done is modify bacon.bash
Deleted line 4693 and replaced it with this:
TheHeaderFile="/usr/include/io.h"
if [ -f "$TheHeaderFile" ]
then echo "#include <io.h>" >> $g_HFILE else echo "#include <sys/io.h>" >> $g_HFILE fi
Now it's working nicely and I don't have to worry in which of the two places io.h resides.
Dave.
|
|
|
Post by Pjot on Jan 11, 2015 19:53:05 GMT 1
Hi dave99,
The file 'io.h' is not used by BaCon itself. So it must be used by one of the programs you are compiling. Most likely it occurs in some PRAGMA statement?
But you can specify a path here also. For example:
PRAGMA INCLUDE sys/io.h
This would specify an include file '/usr/include/sys/io.h'. Of course, you can specify any other path.
HTH Peter
|
|
|
Post by dave99 on Jan 11, 2015 20:02:48 GMT 1
Hi Peter
I updated my post before you posted yours. My program is not using any PRAGMA statements. The only possible reason could be I'm using an EXEC$ ?
I have never used PRAGMA with BaCon but it's nice to know that I can specify the path to an include file using it.
I will change bacon.bash back to how it was (and use PRAGMA rather) as I prefer to have a single file that I can use on Puppy and Porteus.
Thank you. Dave.
|
|