Hello,

I am trying to compile an old pascal code with gpc. There was a problem with the autolinker, symbols collided between ncurses and grx (I think) ,so I removed it and build a command line manually in a makefile. I turned off the graphics and everything worked fine, it compiled linked and produced the desired output. Now I am trying to turn the graphics on again. The problem is that the linker complains that the following symbols could not be found.

 

__gr_setcolor'

`setlinestyle'

`outtextxy'

`setwritemode'

`setviewport'

`clearviewport'

`__gr_getfillsettings'

`setfillstyle'

`settextstyle'

`__gr_closegraph'

 

So I edited the graph unit and replaced the references to these symbols by impleamantations that do nothing. No everything compiles again, a graphics window appears, but nothing is drawn into it.

Here is my compile and link command line:

 

    c:\dev_gpc\bin\gpc c:\dev_gpc\examples\gbr\brichten.pas -oc:\dev_gpc\examples\gbr\richt.exe -lgrx20 c:\dev_gpc\units/graph.o -lgrx20 -lgdi32 c:\dev_gpc\units/dos.o c:\dev_gpc\units/grx.o c:\dev_gpc\units/gpc.o c:\dev_gpc\units/system.o c:\dev_gpc\units/mathe.o c:\dev_gpc\units/crt.o c:\dev_gpc\units/crtc.o -lpanel -lpdcurses c:\dev_gpc\units/math_nst.o c:\dev_gpc\units/br_var1.o c:\dev_gpc\units/br_var2.o c:\dev_gpc\units/br_proz.o c:\dev_gpc\units/br_plan.o c:\dev_gpc\units/geometri.o c:\dev_gpc\units/br_bili.o c:\dev_gpc\units/br_dio.o c:\dev_gpc\units/br_ko_g.o c:\dev_gpc\units/grafikpl.o   -fno-inline  -s  -fno-io-checking  -fno-range-checking  -fimplicit-result  -O1  -Wno-warnings  -fno-assertions  -fextended-syntax -fignore-function-results -fcstrings-as-strings -fpointer-arithmetic -march=i486  --no-autolink  --no-automake  -funit-path=c:\dev_gpc\units;c:\dev_gpc\examples\GBR\UNIT  -funit-destination-path=c:\dev_gpc\units  -Bc:\dev_gpc\lib\ -Bc:\dev_gpc\lib\gcc\mingw32\3.4.5\  -funit-path=C:\dev_gpc\examples\GBR\INC;C:\dev_gpc\examples\GBR\UNIT --no-autolink  -LC:\dev_gpc\lib

 

Note that –lgrx20 is given and that –no-autolink is given.

 

I also analyed libgrx20.a with nm. It told me that a symbol. `_setlinestyle' does existis. But replacing `setlinestyle' with `_setlinestyle' in the graph library caused the linker to complain that the symbol `_setlinestyle' was not resolved.

 

So my basic question is how can I turn on the graphics.

 

Yours Dirk