deadpixi / sam

An updated version of the sam text editor.
Other
433 stars 47 forks source link

Problem compilation: error string.c #66

Closed jubei85 closed 6 years ago

jubei85 commented 6 years ago

string.c:60:1: error: conflicting types for 'Straddc'Straddc(String p, wchar_t c) ^~~ In file included from string.c:2:0: sam.h:254:9: note: previous declaration of 'Straddc' was here void Straddc(String, int); ^~~ make: *** [string.o] Error 1

If I change the type (in file: string.c) of wchar_t to int then compilation complite. All function work except for viewing more than 2 dots. example: 1p - work 1,2p - crashed :( Please help, p.s. I use only "sam -d" (Compiled in cygwin)

deadpixi commented 6 years ago

Hello @jubei85

Please try the latest code in master. I believe it will work now. If so, please close this ticket.

jubei85 commented 6 years ago

When I enter the commans still crashed But anyway thanks for the help $ cat sam.exe.stackdump Exception: STATUS_ACCESS_VIOLATION at eip=61120A60 eax=FFFFFFFF ebx=FFFFFFFF ecx=800A1400 edx=FFFFFFF7 esi=612A2DF2 edi=612A2DF3 ebp=80000000 esp=0028CB50 program=D:\SOFT\cygwin\usr\local\bin\sam.exe, pid 1196, thread main cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B Stack trace: Frame Function Args End of stack trace

deadpixi commented 6 years ago

Hello @jubei85

Hm. I'll reopen this and see if I can figure it out. I don't have a Windows box though, so I'll need to figure out how to debug it...

erezschatz commented 6 years ago

Can't reproduce here (win7, cygwin64)

$ sam -d app.psgi -. app.psgi ,p my $app = sub { my $env = shift; return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello World' ] ]; }; 1,2p my $app = sub { my $env = shift; 1,4p my $app = sub { my $env = shift; return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello World' ] ]; }; 1,23p ?address range 1p my $app = sub {

On 20 September 2017 at 17:11, Rob King notifications@github.com wrote:

Hello @jubei85 https://github.com/jubei85

Hm. I'll reopen this and see if I can figure it out. I don't have a Windows box though, so I'll need to figure out how to debug it...

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/deadpixi/sam/issues/66#issuecomment-330863924, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJq8E9J-oDXy2CO-VNzKHERDR3aLtimks5skR0QgaJpZM4Pbct4 .

-- Erez 🤓

jubei85 commented 6 years ago

Now compiled on cygwin64, and all work :/ Earlier compiled on cygwin32 and was getting crash. Now all work and thanks for help.