[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C problem



heb.c:
-------------------------------------------------------------------------------
struct marzo
{

                char info;
                struct marzo *nxt;
}
;

struct marzo_dock
{

                struct marzo *first_link;
}
;

main()
{
        char *p;
        struct marzo_dock *g;
        printf("test");
        p=Marzo_Reverse_String("hello");
        Marzo_list_to_string(g,"hi",2);
        printf(p);
}
-------------------------------------------------------------------------------
gcc -g -lmarzo -o heb heb.c


GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (i586-debian-linux), Copyright 1996 Free Software Foundation,
Inc...
(gdb) run
Starting program: /home/idan/fpc/./heb

Program received signal SIGSEGV, Segmentation fault.
_dl_lookup_symbol (undef_name=0x400122ec "Marzo_list_to_string",
    ref=0xbffffcf0, symbol_scope=0x4000b150,
    reference_name=0x4000bb08 "/usr/lib/libmarzo.so.0", flags=2)
    at dl-lookup.c:91
dl-lookup.c:91: No such file or directory.
(gdb) bt
#0  _dl_lookup_symbol (undef_name=0x400122ec "Marzo_list_to_string",
    ref=0xbffffcf0, symbol_scope=0x4000b150,
    reference_name=0x4000bb08 "/usr/lib/libmarzo.so.0", flags=2)
    at dl-lookup.c:91
#1  0x40005ea1 in fixup (l=0x4000bb30, reloc_offset=1073789744)
    at ../sysdeps/i386/dl-machine.h:252
#2  0x40006015 in _dl_runtime_resolve () at dl-runtime.c:138
#3  0x804856d in main () at heb.c:23
(gdb)

???