Mail Archives: djgpp/1996/12/23/22:19:26
Hello everyone,
I did read the faq to try and find this out, but:
The following error is seen ...
c:/djgpp/tmp\ccdaaaaa(.text+0x1a):test.cc: undefined reference to `cout'
c:/djgpp/tmp\ccdaaaaa(.text+0x1f):test.cc: undefined reference to `ostream::operator<<(char const *)'
when trying to compile the following file:
#include <iostream.h>
void main()
{
cout << "hello world";
}
Pretty simple, I know. Just testing the compiler. Now, the following code
with an extension of .cpp or .c works fine:
#include <stdio.h>
void main()
{
printf("hello world");
}
This is using standard <stdio.h> routiens (no c++). Any clues.
My djgpp environment variable is set to c:\djgpp\djgpp.env (I even tried
c:/djgpp/djgpp.env). This is my djgpp.env file:
#= 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=%DJDIR%/tmp
+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%/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
...
...
Any ideas??? BTW, I am posting here first to see if it is a problem with
djgpp setup. Sorry if it turns out to be a language problem. I did try
replacing djgpp.env, re-unzipping djdev201.zip, re-unzipping lgp271b.zip, and
re-typing the lines of the program.
Jeff
- Raw text -