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

SOLVED: V prog com[piles fine with BC5.01, but odd errorws under Linux (v. 1.22)



OK - I finally got this one sorted. I was declaring Mydlgtxt in the header file rather than the source (.cpp) file. Changing it to the source file and the problems went away under Linux.

I don't understand though why the error messages for this were a) so obscure or b) non-existent under BC5.01. Is it something about C++ I'm naive about? Why can't I declare this in my header file rather than the source file:

struct TextIn{
  char some_input[10];
  .
  .

}Mydlgtxt;

?

Anyway, happy to have it sorted.


When I compile a program I'm writing under Linux (debian 2.1, gcc >version egcs-2.91.60 Debian 2.1 (egcs-1.1.1 release)) I get the >following errors:

c++ -g -O2 -L/usr/X11R6/lib -L/usr/local/v/lib -lXm -lXmu -lXt -lXext -lX11 -lV
-o tryit  dde.o chiroddecanvas.o chiroddecmdwin.o main_interface.o play1.o
chirodlgs.o
collect2: ld terminated with signal 11 [Segmentation fault]
main_interface.o: In function `ChiroddeApp::NewAppWin(vWindow *, char *, int,
int, vAppWinInfo *)':
/home/polytope/chiro_dde1/main_interface.cpp:74: multiple definition of
`Mydlgtext'
chiroddecmdwin.o(.bss+0x0):/usr/include/g++-2/stl_uninitialized.h: first
defined here
chirodlgs.o: In function `make: *** [tryit] Error 1



______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


Reply to: