delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/16/12:02:33

From: espenwa AT c2i DOT net (Espen Wang Andreassen)
Newsgroups: comp.os.msdos.djgpp
Subject: RSXNTDJ and C++?
Message-ID: <3971d5e8.12382699@news.c2i.net>
X-Newsreader: Forte Free Agent 1.11/32.235
Lines: 96
Date: Sun, 16 Jul 2000 15:47:40 GMT
NNTP-Posting-Host: 193.217.207.9
X-Complaints-To: abuse AT tele2 DOT no
X-Trace: juliett.dax.net 963762460 193.217.207.9 (Sun, 16 Jul 2000 17:47:40 MET DST)
NNTP-Posting-Date: Sun, 16 Jul 2000 17:47:40 MET DST
Organization: Tele2 Norway AS Public Access
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

(OS: Win98, gcc version 2.95.2 19991024, RSXNTDJ 1.6 Beta2)

Anyone compiling C++ programs with RSXNTDJ?

I suppose I make it pretty obvious by posting this, but I haven't the
biggest understanding of the differences in programming C and C++, and
the following program just won't compile when named .cc/.cpp. (As a
c-file it works perfectly), and I get the following error message:

--------
C:\[...]\test>gcc -Zwin32 -o test.exe test.cpp
C:\DJGPP\BIN/ld.exe: warning: cannot find entry symbol start;
defaulting to 00401000
C:\DJGPP\BIN/ld.exe: test.exe: illegal symbol index 314 in relocs
--------

-- test.cpp ---
#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)

{
MessageBox (NULL, "Hello Win32", "First App", MB_OK);
return 0;
}
-- test.cpp --

This happends when I compile it directly from the command line, or
when using rhide or rsxide. In fact, as long as the "-Zwin32" option
is given to gcc together with a C++-file, the linker (ld) barfs with
the "entry point" message. (Even with a "int main () {}" program).
 
Any ideas as to why RSXNTDJ don't like C++, or what I do wrong?

(Below is the error when compiling/linking with the "-v"-option):

Thanks, 

C:\[...]\test>gcc -v -Zwin32 -o test.exe test.cpp
Reading specs from c:/rsxntdj/lib/specs
gcc version 2.95.2 19991024 (release)
 c:/djgpp/lib/gcc-lib/djgpp/2.952/cpp.exe -lang-c++ -v -D__GNUC__=2
-D__GNUG__=2
 -D__GNUC_MINOR__=95 -D__cplusplus -Dunix -Di386 -DGO32 -DMSDOS
-DDJGPP=2 -DDJGP
P_MINOR=2 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2
-D__DJGPP_M
INOR__=2 -D__unix -D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2
-D__DJGPP_MINOR=2 -D__
EXCEPTIONS -I/rsxntdj/include -I/rsxntdj/include/win32 -D__WIN32__
-D_WIN32 -D__
RSXNT__ test.cpp c:/djgpp/tmp\ccBvUYxS.ii
GNU CPP version 2.95.2 19991024 (release) (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 /rsxntdj/include
 /rsxntdj/include/win32
 c:/djgpp/lang/cxx
 c:/djgpp/include
 c:/djgpp/lang/cxx
 c:/djgpp/lib/gcc-lib/djgpp/2.952/include
 c:/djgpp/include
End of search list.
The following default directories have been omitted from the search
path:
 $DJDIR/lib/gcc-lib/djgpp/2.952/../../../../djgpp/include
End of omitted list.
 c:/djgpp/lib/gcc-lib/djgpp/2.952/cc1plus.exe c:/djgpp/tmp\ccBvUYxS.ii
-m486 -ma
lign-jumps=2 -malign-loops=2 -malign-functions=2 -m486 -malign-jumps=2
-malign-l
oops=2 -malign-functions=2 -quiet -dumpbase test.cc -version -o
c:/djgpp/tmp\cco
66Qu1.s
GNU C++ version 2.95.2 19991024 (release) (djgpp) compiled by GNU C
version 2.95
.2 19991024 (release).
 c:/djgpp/bin/as.exe -o c:/djgpp/tmp\ccpTZFlj.o
c:/djgpp/tmp\cco66Qu1.s
 c:/djgpp/bin/ld.exe -o test.exe c:/rsxntdj/lib/crt0w32.o
-Lc:/rsxntdj/lib -Lc:/
djgpp/lib -Lc:/djgpp/lib -Lc:/djgpp/sfl
-Lc:/djgpp/lib/gcc-lib/djgpp/2.952 -Lc:/
djgpp/bin -Lc:/djgpp/lib c:/djgpp/tmp\ccpTZFlj.o -r -Trsxnt.djl -lgcc
-lalias -l
crt2 -lex2 -lcrt -lkerne -luser3 -lgdi32 -lcomct -lcomdl -lgcc
 coff2pe -v -r test.exe
 ld -o c:/djgpp/tmp/dj300000 test.exe -T/rsxntdj/lib/rsxnt.djl
C:\DJGPP\BIN/ld.exe: warning: cannot find entry symbol start;
defaulting to 0040
1000
C:\DJGPP\BIN/ld.exe: test.exe: illegal symbol index 314 in relocs

-- 
espen w. andreassen | http://home.c2i.net/espenwa | This is propaganda....

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019