05 August 2017, 21:12 | #1 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
SAS/C and C++
this really is beyond any explaination to me:
SAS/C 6.58 or SAS/C 6.59 i have a cpp source, with class defintions and such stuff, so if I build this thing, there is not a single of SAS/C's sccxx libraries invoked. i removed/renamed all those scxx* libs and while building the c++ source, I dont get any related error about a missing sccxx lib. the binary gets linked with sc.lib and scm881.lib instead of sccxx.lib sccxxm881.lib the resulting plugin just crashs lightwave. the only thing I can see is this: Code:
C++ Translator for "vmixer.cpp" SAS/C C++ 9.99.99 (Mar 4 1998) Copyright (c) 1996 SAS Institute Inc. Code:
ls -l sc:lib/ -----rwed 16-04-29 08:51:42 276 141288 sccxx.lib -----rwed 16-04-29 08:51:42 67 34304 sccxxm.lib -----rwed 16-04-29 08:51:50 62 31468 sccxxm881.lib -----rwed 16-04-29 08:51:48 66 33456 sccxxmieee.lib -----rwed 16-04-29 08:51:44 68 34792 sccxxmnb.lib -----rwed 16-04-29 08:51:44 281 143740 sccxxnb.lib ls -l sc:lib.701/ -----rwed 98-01-23 20:59:12 128 65256 sccxx.lib -----rwed 98-01-23 20:59:12 38 19248 sccxxm.lib -----rwed 98-01-23 20:59:12 31 15864 sccxxm881.lib -----rwed 98-01-23 20:59:12 37 18456 sccxxmieee.lib -----rwed 98-01-23 20:59:12 39 19612 sccxxmnb.lib -----rwed 98-01-23 20:59:12 132 67392 sccxxnb.lib ls -l sc:libs/sccxx.library -----rwed 98-03-04 18:54:46 2106 1078096 sccxx.library Code:
sccxx.library is required to compile any C+ + files, it does this c++ to c translating, producing non working code. while manualy rewriting the same code to C ( with help by alkis ) - i can build a working binary. so from my understanding there is a c++ compiler, with some big c++ support libs, which will never get used. what is wrong here ? Last edited by emufan; 05 August 2017 at 21:53. |
06 August 2017, 00:03 | #2 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,801
|
C++ was experimental see https://www.warped.com/amiga/
Kamelito |
06 August 2017, 00:31 | #3 | |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
Quote:
Code:
vmixer.o: sc cxxsrc $(CFLAGS) vmixer.cpp SAS/C Amiga Compiler 6.59 Copyright (c) 1988-1995 SAS Institute Inc. C++ Translator for "vmixer.cpp" Error : can't open sc:libs/sccxx.library sc failed returncode 10 the first time it want sccxx.library #1) one option keeps the converted c source. still not touching the scxx libs. even experimental, they cannot deliver that lot of libs and they wont get used. there must be something i'm doing wrong :/ Last edited by emufan; 06 August 2017 at 01:22. |
|
06 August 2017, 07:45 | #4 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
|
SAS/C doesn't support inheritance. The C++ support was not completed.
|
06 August 2017, 15:05 | #5 | |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
Quote:
when building from a c++ src. allways linking the sc.lib. there must be some switch to let the binary build using those c++ link libs. but i cannot find any example doing so. |
|
06 August 2017, 17:05 | #6 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,801
|
The last SAS I have is 6.58, I can see that you've 6.59 is it available somewhere?
Kamelito |
26 September 2017, 19:18 | #7 | |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
Quote:
#1) Unofficial Official SAS/C Compiler Support Page - Experimental releases. 6.59 with template support #2) on aminet Experimental SAS/C++ (requires SAS/C) - same as above #3) there is an older version also on aminet. but make a backup of your old sc folder, before patching. |
|
26 September 2017, 19:36 | #8 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
does anyone know how to set a global definition with sas/c, sort of -DAMIGA done with gcc?
maybe something in SCOPTIONS file: "DEFINE AMIGA" ? #1) another one: there is an already defined variable, i try to #undef but #undef is ignored: Code:
// Platform-Specific Filename Strings #ifdef AMIGA #undef DRIVE_SEPERATOR_CHAR #undef DIR_SEPERATOR_CHAR #undef DIR_SEPERATOR_STRING static const char DRIVE_SEPERATOR_CHAR = ':'; static const char DIR_SEPERATOR_CHAR = '/'; static const char * DIR_SEPERATOR_STRING = "/"; #endif #2) found in the SCOPTIONS file of WCS amiga source code: DEFINE AMIGA so this seems to be the solution. Last edited by emufan; 26 September 2017 at 20:32. |
26 September 2017, 22:25 | #9 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,801
|
@emufan,
thanks Kamelito |
27 September 2017, 00:40 | #10 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
np.
#1) I've another c++ src , does build but linking fails. maybe I forgot how to do it, but I cannot remember: Code:
Undefined symbols First Referenced ___vtbl_1__7filebuf File 'Process.o' Enter a DEFINE value for ___vtbl_1__7filebuf (default ___stub): _DoProcess File 'AllKeyer.o' Enter a DEFINE value for _DoProcess (default ___stub): ___vtbl_0__9streambuf File 'Process.o' Enter a DEFINE value for ___vtbl_0__9streambuf (default ___stub): includes fstream, iobase, iostream, stdiostream. but the failure persists. DoProcess is a function in Process.cpp , which is called in Allkeyer.c. there seems to be missing a definition/prototype in Allkey.c ? i tried with extern int DoProcess (); but this does not work :/ #2) I put the code from AllKeyer.c into Process.cpp , so I got rid of the missing DoProcess definition. but I still get: Code:
___vtbl_1__7filebuf File 'Process.o' Enter a DEFINE value for ___vtbl_1__7filebuf (default ___stub): ___vtbl_0__9streambuf File 'Process.o' Enter a DEFINE value for ___vtbl_0__9streambuf (default ___stub) #3) i've attached the whole src, in original state. there must be some simple step to fix the linking stuff. alkis ?! #4) the thing here seems to be missing functions from additonal object files. below I try to compile the plugin version, here we have the cli tool. below I've allready added 10 different object files to the project. adding some does build the plugin ( with _stubs), adding another one, gives the above error. Last edited by emufan; 29 September 2017 at 12:53. |
28 September 2017, 17:15 | #11 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
is there a SCOPTIONS value to suppress all warning, only list errors?
I tried with WARN=111, to only show warning number 111, but this does not work. |
28 September 2017, 19:56 | #12 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
another one I do not understand, well, sas/c does not:
Code:
// at the begin of the src file: const char *path; ... [bool DirStrings::IsPathOnly( const char *path ) { 523: int end = strlen( path )-1; 524: if ( (path[end] == ':' ) || (path[end] == '/' ) || (path[end] == '\\') ) 525: { 526: return true; 527: } 528: return false; 529:} and sas/c says this: DirStrings.cc 524 Error 1200: Syntax error in declaration: found unexpected 'if'. DirStrings.cc 524 Error 1200: Syntax error in declaration: found unexpected '=='. DirStrings.cc 524 Error 1200: Syntax error in declaration: found unexpected '=='. DirStrings.cc 524 Error 1200: Syntax error in declaration: found unexpected '=='. #1) a related error , also with path and strlen is here: Code:
457: char * DirStrings::RemoveTrailingDirSeperator( char *path, bool any ) { 458: int len = strlen( path ); 459: 460: if( path[len-1] == '/' ) 461: { 462: path[len-1] = '\0' ); 463: } 464: return path; 465:} DirStrings.cc 462 Error 1200: Syntax error: semi-colon expected. btw. these things build with AmiDevCpp (gcc 3.5) ... but i have to use sas/c to build another plugin for lw - build with gcc does not work :/ #2) is there a function to find the last char in a string? string::find_last_of is unknown to sas/c ... #3) example in C#: Code:
str = str.Remove(str.Length -1, 1) + ","; #4) *woah* "unexpected 'if' was caused by a comment line above the code: Code:
// Returns true if there is no :, / or \ Last edited by emufan; 28 September 2017 at 20:46. |
03 December 2017, 20:20 | #13 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
is there a SAS/C option which equals to gcc's -fpermissive?
#1) in sasc there is a link option ... startup=serv_s.o ... how can I achieve the same with gcc? I link the whole thing with the following line: Code:
$(CC) $(LFLAGS) $(ULIB)serv_s.o $(OBJECTFILES) -o plugin.p \ -L$(ULIB) $(ULIB)server.lib Last edited by emufan; 04 December 2017 at 14:33. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SAS/C 6.58 on 1.3 | marduk_kurios | Coders. C/C++ | 25 | 29 July 2018 18:17 |
SAS C 6.58 (again) | nyteshade | request.Other | 2 | 15 December 2016 17:18 |
Sas/c | Tiddlypeeps | Coders. General | 15 | 08 February 2010 00:32 |
Sas C 6.58 | AmiCoder | request.Apps | 3 | 06 February 2010 01:19 |
SAS/C v6.50 | zerostress | request.Apps | 3 | 08 October 2007 10:35 |
|
|