Trouble with GPC_(re)

Wed, 23 Oct 96 17:20:50 CST


On Sun, 20 Oct 1996 17:26:58 +0100, 
Niels Heirbaut   wrote:

>
>
>
>Hi,
>
>I want to thank everybody who has helped me getting GPC started, but
>another problem came up:
>
>I get the following messages when I try to compile my program:
>
>_main.c(.text+0x1a): undefined reference to `djgpp_last_ctor'
>_main.c(.text+0x1f): undefined reference to `djgpp_first_ctor'
>_main.c(.text+0x2f): undefined reference to `djgpp_first_ctor'
>exit.c(.text+0x29): undefined reference to `djgpp_last_dtor'
>exit.c(.text+0x2e): undefined reference to `djgpp_first_dtor'
>exit.c(.text+0x3f): undefined reference to `djgpp_first_dtor'
>
>I couldn't find any reference to these error messages in the GPC info files
>or DJGPP FAQ. Could some please help me (again)?
>

Reread the faq. especially section 8.13 (18.3?) which is all about this 
problem. You have probably edited your djgpp.env file and screwed up the 
library path. This is my djgpp.env, which works. The sections [gpc] and 
[gpc-cpp] are important here. They are copied from [gcc] and [cpp] resp.
Hope this helps,

JanJaap

         ----------------- djgpp.env ---------------

#= Don't edit this line unless you move djgpp.env outside
#= of the djgpp installation directory.  If you do move
#= it, set DJDIR to the directory you installed DJGPP in.
#=
DJDIR=%:/>DJGPP%

+USER=dosuser
+TMPDIR=%TEMP%
+EMU387=%DJDIR%/bin/emu387.dxe
+LFN=n

[bison]
BISON_HAIRY=%DJDIR%/lib/bison.hai
BISON_SIMPLE=%DJDIR%/lib/bison.sim

[cpp]
CPLUS_INCLUDE_PATH=%/>;CPLUS_INCLUDE_PATH%%DJDIR%/lang/cxx;%DJDIR%/lang/cxx/tvision;%DJDIR%/include;%DJDIR%/contrib/grx20/include
C_INCLUDE_PATH=%/>;C_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/contrib/grx20/include
OBJCPLUS_INCLUDE_PATH=%/>;OBJCPLUS_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/lang/objc
OBJC_INCLUDE_PATH=%/>;OBJC_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/lang/objc

[gcc]
COMPILER_PATH=%/>;COMPILER_PATH%%DJDIR%/bin
LIBRARY_PATH=%/>;LIBRARY_PATH%%DJDIR%/lib;%DJDIR%/contrib/grx20/lib

[info]
INFOPATH=%/>;INFOPATH%%DJDIR%/info

[gpc-cpp]
C_INCLUDE_PATH=%/>;C_INCLUDE_PATH%%DJDIR%/lang/pascal;%DJDIR%/include;%DJDIR%/contrib/grx20/include

[gpc]
COMPILER_PATH=%/>;COMPILER_PATH%%DJDIR%/bin
LIBRARY_PATH=%/>;LIBRARY_PATH%%DJDIR%/lib;%DJDIR%/contrib/grx20/lib

         -------------------------------------------

---
"Nothing shocks me, I'm a scientist", Indiana Jones


J.J. van der Heijden (j.j.vanderheijden@student.utwente.nl)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es