View previous topic :: View next topic |
Author |
Message |
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Thu Dec 18, 2014 3:51 pm Post subject: Using C and C++ with FTN95 |
|
|
I have a large body of code to produce printed output, and cannot get it to compile successfully. The issue appears to be with the "bool" data type.
Is bool not allowed in SCC?
Also, function overloading does not appear to be possible.
Thanks,
Bill |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Thu Dec 18, 2014 7:15 pm Post subject: |
|
|
Bill,
The SCC.hlp file ought to answer this, it's supposed to be accessible from PLATO or it is in the FTN95 install directory. HLP has not been the default helpfile format for a very long time, and Microsoft in its wisdom decided not to support it in Windows 7 (and presumably, later).
Worth keeping an old XP machine going!
Eddie |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Thu Dec 18, 2014 8:48 pm Post subject: |
|
|
The HELP file was not any help. I did find an option (by doing a CONFIG) that might have worked. I got past this error by defining a bool, and both true and false.
Now, can't get the C code to link with the FTN code. Much more obscure what the problem is there. If I include the C code for the interface routine in the FTN list of files, it gets linked in. But, if I create a library with this routine, there is a name difference that the linker is not picking up.
I posted a different forum post for this with some additional information.
I still like the product. But, if I can't get the "C" code incorporated via a library call, ...... |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Thu Dec 18, 2014 10:10 pm Post subject: Re: Using C and C++ with FTN95 |
|
|
wahorger wrote: | Is bool not allowed in SCC?
Bill |
Whether bool is a standard type or not depends on the version of the C standard in effect. The following code works with SCC.
Code: | #include <stdio.h>
#include <bool.h>
int main(){
int i=3,j=4;
bool x;
x=i > j;
printf("%s\n",x ? "TRUE" : "FALSE");
} |
Eddie, you need not resurrect XP just to use WinHelp; see http://www.microsoft.com/en-us/download/details.aspx?id=91 |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Thu Dec 18, 2014 10:13 pm Post subject: |
|
|
Thanks for the bool.h tip.
Bill |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Thu Dec 18, 2014 11:02 pm Post subject: |
|
|
I need XP to run my slide scanner: in Windows 7 its drivers conflict with my NAS!
Eddie |
|
Back to top |
|
|
|