gm2
[Top][All Lists]
Advanced

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

[Gm2] Re: still won't compile and link


From: Gaius Mulley
Subject: [Gm2] Re: still won't compile and link
Date: Wed, 02 Mar 2011 13:54:53 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

rob solomon <address@hidden> writes:

>>> gm2 -g -fmake-I=. -flibs=pim-coroutine -fmakeall -lncurses -lpth testwin.mod
>>
>> ok you need to install libpth-dev,
>>
>> $ sudo apt-get install libpth-dev
>>
>>
>>> I also tried
>>> ./Makefile.in post-install
>>> This also failed saying lots of commands were not found like srcdir,
>>> gm2dir, all, @echo, XGM2, etc
>>
>> ok to build examples from a Makefile.in you need to move to the
>> equivalent build directory and type 'make'.  The program 'configure'
>> will have created a 'Makefile' from the src 'Makefile.in' and
>> instantiated values based on your system ($srcdir, $prefix etc).
>>
>>
>> $ cd<build-dir>/gcc/gm2/examples/ncurses
>> $ make post-install
>>
>> where<build-dir>  is the root directory of your gm2 build tree.  It
>> assumes you have built gm2 from source (and the 'configure' command is
>> done right at the beginning of the complete compiler build).
>>
>
> After installing libpth-dev I'm now getting linking errors from WindowDevice
>
> gm2 -g -fonlylink -lncurses -lpth testwin.mod
>
> In function WindowDevice_InitWindow undefined reference to
> SYSTEM_TurnInterrupts
>
> Same error from KillWindow and SetWindow
>
> I don't know how to use make yet.  Doesn't it need a rule file of some type?

Hi,

it is probably easier to use make, as in:

build-4.1.2/gcc/gm2/examples/ncurses$ make pre-install
$ ./a.out

You can see what commands the 'make' spawns by:

build-4.1.2/gcc/gm2/examples/ncurses$ make pre-install -n

it will proceed to compile all dependencies and finally performs the
link.  On my system 'make' spawns the following internal processes:


rm -f *.o a.out *_m2.cpp
../../../xgm2 -B../../../x 
-fmake-I=../../../../../gcc-4.1.2/gcc/gm2/examples/ncurses \
                
-I../../gm2-libs-coroutines:../../../../../gcc-4.1.2/gcc/gm2/examples/ncurses/../../gm2-libs-coroutines:../../../../../gcc-4.1.2/gcc/gm2/examples/ncurses:../../../../../gcc-4.1.2/gcc/gm2/examples/ncurses/../../gm2-compiler:../../gm2-libs:../../../../../gcc-4.1.2/gcc/gm2/examples/ncurses/../../gm2-libs:../../../../../gcc-4.1.2/gcc/gm2/examples/ncurses/../../gm2-libs-iso
 \
                -fmakeall -g 
../../../../../gcc-4.1.2/gcc/gm2/examples/ncurses/testwin.mod -lncurses -lpth


which results in the creation of an ./a.out 

regards,
Gaius



reply via email to

[Prev in Thread] Current Thread [Next in Thread]