what is meant by segment not defined ?

I

iceColdFire

Hi,
I am using edgcc to compile some c++programs..
everything goes smooth...
However when I try to compile programs with objects (any type maybe
int,char* ,class,struct ect) defined OUTSIDE main, compilation error
occurs...

as
test.int.c
test.c(48) : warning C4068: unknown pragma
test.c(49) : error C2341: '.CRT$XCU' : segment must be defined using
#pragma
dat
a_seg or code_seg prior to use

Kindly suggest what does it mean...

test.c has code outside main as
class X {
public:
int ix;
X(int ii=0) : ix(ii) {}
};

X ox;
int X::*pmi = &X::ix;
X *px = &ox;

main(){...}

Thanks,
a.a.cpp
 
V

Victor Bazarov

iceColdFire said:
I am using edgcc to compile some c++programs..
everything goes smooth...
However when I try to compile programs with objects (any type maybe
int,char* ,class,struct ect) defined OUTSIDE main, compilation error
occurs...

as
test.int.c
test.c(48) : warning C4068: unknown pragma
test.c(49) : error C2341: '.CRT$XCU' : segment must be defined using
#pragma
dat
a_seg or code_seg prior to use

Kindly suggest what does it mean...
[..]

It's not possible to answer this in terms of C++ language. You need to
speak with your compiler technical support or look in the documentation.
There is nothing in C++ *language* about "segments" and #pragma directive
is compiler-specific.

V
 
L

Larry I Smith

iceColdFire said:
Hi,
I am using edgcc to compile some c++programs..
everything goes smooth...
However when I try to compile programs with objects (any type maybe
int,char* ,class,struct ect) defined OUTSIDE main, compilation error
occurs...

as
test.int.c
test.c(48) : warning C4068: unknown pragma
test.c(49) : error C2341: '.CRT$XCU' : segment must be defined using
#pragma
dat
a_seg or code_seg prior to use

Kindly suggest what does it mean...

test.c has code outside main as
class X {
public:
int ix;
X(int ii=0) : ix(ii) {}
};

X ox;
int X::*pmi = &X::ix;
X *px = &ox;

main(){...}

Thanks,
a.a.cpp

Perhaps your compiler is getting confused as to the
language, C or C++ - since it's probably trying
to compile 'test.c' as 'C' code.

Regards,
Larry
 
I

iceColdFire

Hi,

Thanks for the support...I have tried to compile the same with .cpp
....however it dosent seem t work...Now I am heading straight to
compiler technical support team.

thanks again..
a.a.cpp
 
S

sam

iceColdFire said:
Hi,

Thanks for the support...I have tried to compile the same with .cpp
...however it dosent seem t work...Now I am heading straight to
compiler technical support team.
Is there C++ compiler team exist in a company?

Sam.
 
I

iceColdFire

::Sam

I am not sure...compiler I am using is edgcc...and dont know '
what@where ' is its technical support team...

<-> a.a.cpp
 
V

Victor Bazarov

iceColdFire said:
I am not sure...compiler I am using is edgcc...and dont know '
what@where ' is its technical support team...

Start with the place where you got the compiler. If it's the same
place where you got the computer, go to your computer vendor. They
should know how to get in touch if you have a software issue.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top