Welcome, Guest. Please login or register.

Author Topic: Compiling C Source code (smbfs) with SAS/C 6.58  (Read 5224 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Orphan264Topic starter

Compiling C Source code (smbfs) with SAS/C 6.58
« on: November 16, 2018, 01:44:45 AM »
I am hoping someone can lend some help to this lost soul. I am trying to become familiar with C programming on the Amiga. I have written some simple code and compiled it without problems.

I wanted to go a step further so I set up the source code for a program I have been using (smbfs) and I am trying to compile the project. I am using SAS/C 6.58 freshly installed on an Amiga 4000/40 with Workbench 3.1.4. I believe I have followed the instructions provided in the smakefile which mention copying over netinclde from roadshow. Here is what I get when I type SMAKE:

extern struct Library * DOSBase;
smbfs.h 100 Error 72: conflict with previous declaration
                      See line 4 file "include:proto/dos.h"

I gather from the error that the smbfs.h file is declaring something previously declared in dos.h. How do I resolve this problem? Is there some setting in sas/c that I have not changed but should have? Everything is default to the way it was installed.

I am looking for some guidance so I may better understand how the compilation process works and normal expectations of Amiga developers using the software.

Any insights appreciated.

- signed "Software Genius, NOT!"
 

Offline Orphan264Topic starter

Re: Compiling C Source code (smbfs) with SAS/C 6.58
« Reply #1 on: November 19, 2018, 02:53:28 PM »
Thank you Thomas!

I initially took the approach of modifing the source code to remove the double definition, but this created more problems. Then I modified the "proto/dos.h" code by commenting out line 4 and that allowed me to compile successfully.

I suppose my question now is: Is there a compiler setting/flag/switch I should have used to prevent the build process from looking at my "proto/dos.h" file? (I managed to figure out how to change the smakefile so I could add NODEBUG.) I get the feeling I should not have touched my "proto/dos.h" file, at least until I know what I am doing.