473,326 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Problem with compiling c++ sources for windows

Hi,

I tried to compile the following :
http://www.almaden.ibm.com/software/...ssoc.gen.tar.Z
from
http://www.almaden.ibm.com/software/...l#assocSynData

I tried it on a unix machine and received the following error message:

zivunix:compile> make
xlC -+ -O -c -o ran1.o ran1.c
xlC -+ -O -c -o expdev.o expdev.c
xlC -+ -O -c -o gammln.o gammln.c
xlC -+ -O -c -o gasdev.o gasdev.c
xlC -+ -O -c -o poidev.o poidev.c
xlC -+ -O -c -o dist.o dist.c
xlC -+ -O -c -o gen.o gen.c
"gen.h", line 183.30: 1540-0063 (S) The text "StringSet" is unexpected.
make: *** [gen.o] Error 1
zivunix:compile>

How can I solve the problem? I also tried borlands bcc32 but also failed.
(I'm absolutely new to this topic).

Who can help? (Or better: Compile the files for windows and send it via
mail. Could not be much work - I think ?)

Regards - Michael

Jul 23 '05 #1
6 5852
Michael Höing wrote:
I tried to compile the following :
http://www.almaden.ibm.com/software/...ssoc.gen.tar.Z
from
http://www.almaden.ibm.com/software/...l#assocSynData

I tried it on a unix machine and received the following error message:

zivunix:compile> make
xlC -+ -O -c -o ran1.o ran1.c
xlC -+ -O -c -o expdev.o expdev.c
xlC -+ -O -c -o gammln.o gammln.c
xlC -+ -O -c -o gasdev.o gasdev.c
xlC -+ -O -c -o poidev.o poidev.c
xlC -+ -O -c -o dist.o dist.c
xlC -+ -O -c -o gen.o gen.c
"gen.h", line 183.30: 1540-0063 (S) The text "StringSet" is unexpected.
It's probably a type and happens to be undefined. There is no standard
symbol 'StringSet', so we here can't really help you.
make: *** [gen.o] Error 1
zivunix:compile>

How can I solve the problem? I also tried borlands bcc32 but also failed.
(I'm absolutely new to this topic).
Well... learn. Get some books, contact IBM for support. If you don't
want to learn (I am not blaming you if this is for one time only), then
you need to hire somebody who's not "new to this topic".
Who can help? (Or better: Compile the files for windows and send it via
mail. Could not be much work - I think ?)


I charge $250/hr for remote compilation. And my modem is reaaaaaallllyyy
sssllooowwww... I am sure there is someone who's got nothing better to do
than to download and compile stuff for you, make sure they know how to
contact you directly. This newsgroup is about C++ _language_ not a match-
making service.

V
Jul 23 '05 #2
Hi,
I charge $250/hr for remote compilation. And my modem is reaaaaaallllyyy
sssllooowwww... IBAN, please:)

Ok - I tried cl (Visual C++) and bcc32 (Borland):

What I got using cl is:

_____________________________________ cl /TP *.c


Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

command.c
e:\Eigene Dateien\SS05\MA\tool\gen.h(3) : fatal error C1083: Cannot open
include file: 'stream.h': No such file or directory
dist.c
dist.c(2) : fatal error C1083: Cannot open include file: 'values.h': No such
file or directory
expdev.c
gammln.c
gasdev.c
gen.c
e:\Eigene Dateien\SS05\MA\tool\gen.h(3) : fatal error C1083: Cannot open
include file: 'stream.h': No such file or directory
main.c
main.c(1) : fatal error C1083: Cannot open include file: 'fstream.h': No
such file or directory
poidev.c
ran0.c
ran1.c
Generating Code...
_____________________________________

So I looked for the missing files like stream.h and added them to the
include folder of the c++-compiler. But that also does not work (got more
and more errors). My next approach was using fstream.h instead of stream.h
in the #include statement of gen.h 'cause I found s.th. near it in the web.
But that also does not work.

So my question: What do I have to do in the case of missing "*.h"s ? (Every
compiler has its own *.h-files? And the files differ?)
regards - Michael
Jul 23 '05 #3
Michael Hoing wrote:
[..]
Ok - I tried cl (Visual C++) and bcc32 (Borland):

What I got using cl is:

_____________________________________
cl /TP *.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for
80x86 Copyright (C) Microsoft Corporation 1984-2002. All rights
reserved.
command.c
e:\Eigene Dateien\SS05\MA\tool\gen.h(3) : fatal error C1083: Cannot
open include file: 'stream.h': No such file or directory
dist.c
dist.c(2) : fatal error C1083: Cannot open include file: 'values.h':
No such file or directory
expdev.c
gammln.c
gasdev.c
gen.c
e:\Eigene Dateien\SS05\MA\tool\gen.h(3) : fatal error C1083: Cannot
open include file: 'stream.h': No such file or directory
main.c
main.c(1) : fatal error C1083: Cannot open include file: 'fstream.h':
No such file or directory
poidev.c
ran0.c
ran1.c
Generating Code...
_____________________________________

So I looked for the missing files like stream.h and added them to the
include folder of the c++-compiler. But that also does not work (got
more and more errors). My next approach was using fstream.h instead
of stream.h in the #include statement of gen.h 'cause I found s.th.
near it in the web. But that also does not work.

So my question: What do I have to do in the case of missing "*.h"s ?


Look for a reasonably old compiler.

Apparently the code you're trying to compile needs pre-standard headers
('fstream.h' etc.) That means about 7 years old.
(Every compiler has its own *.h-files? And the files differ?)


C++ compilers have C++ _headers_ (which are not necessarily files) and C
headers. Only old-style C headers have the .h in them. The C++ headers
do not have .h.

You indicated before that you downloaded this code from 'ibm.com'. Why
not ask IBM about that code?

V
Jul 23 '05 #4
Hi,

thx for your help!
You indicated before that you downloaded this code from 'ibm.com'. Why
not ask IBM about that code?

I already did and still waiting for an answer.

Please allow me to ask again cause I tried again several things with the xlC
because IBM delivered a makefile which shouldn't make any trouble.

Everything seems to work fine - except one thing (as mentioned above in the
thread):
________________________________________
zivunix:compile> make
xlC -+ -O -c -o gen.o gen.c
"gen.h", line 183.30: 1540-0063 (S) The text "StringSet" is unexpected.
make: *** [gen.o] Error 1
zivunix:compile>
________________________________________

The error occurs at *** in the following class "extract":
________________________________________
class String
{
friend class StringSet;
LINT nitems; // number of items
Item *items; // list of the items
// FLOAT *rval; // random value (used to get random ordering of the items)
// Item *ritems; // randomly chosen items
FLOAT prob; // probability that this string is chosen
FLOAT conf; // probability that this string is corrrupted
// void shuffle(void); // shuffles items in string
public:
String(LINT nitems);
~String(void);
void display(ofstream &fp, LINT prob_comp = 1);
void display(ofstream &fp, StringSet &lits, LINT prob_comp = 1);
<-- ***
// prob is multiplied by prob_comp before being writeed
LINT size(void) { return nitems;}
Item item(LINT n) { return items[n];} // return nth item of the string
FLOAT conf_lvl(void) { return conf; }
void set_size(LINT newsize) { nitems = newsize;}
void set_item(LINT n, Item itm) { items[n] = itm;}
void set_conf_lvl(FLOAT newconf) { conf = newconf; }
// void shuffle(LINT k); // allows selection of k random items from the
string
// Item rand_item(LINT n) { return ritems[n];} // works with shuffle
};
________________________________________

"StringSet &lits" is the unexpected text. What can be the possible reason?

c u - Michael
Jul 23 '05 #5
Michael Hoing wrote:
Hi,

thx for your help!
You indicated before that you downloaded this code from 'ibm.com'. Why
not ask IBM about that code?

I already did and still waiting for an answer.

Please allow me to ask again cause I tried again several things with
the xlC because IBM delivered a makefile which shouldn't make any
trouble.
Everything seems to work fine - except one thing (as mentioned above
in the thread):
________________________________________
zivunix:compile> make
xlC -+ -O -c -o gen.o gen.c
"gen.h", line 183.30: 1540-0063 (S) The text "StringSet" is
unexpected. make: *** [gen.o] Error 1
zivunix:compile>
________________________________________

The error occurs at *** in the following class "extract":
________________________________________
class String
{
friend class StringSet;
LINT nitems; // number of items
Item *items; // list of the items
// FLOAT *rval; // random value (used to get random ordering of the
items) // Item *ritems; // randomly chosen items
FLOAT prob; // probability that this string is chosen
FLOAT conf; // probability that this string is corrrupted
// void shuffle(void); // shuffles items in string
public:
String(LINT nitems);
~String(void);
void display(ofstream &fp, LINT prob_comp = 1);
void display(ofstream &fp, StringSet &lits, LINT prob_comp = 1);
<-- ***
// prob is multiplied by prob_comp before being writeed
LINT size(void) { return nitems;}
Item item(LINT n) { return items[n];} // return nth item of the string
FLOAT conf_lvl(void) { return conf; }
void set_size(LINT newsize) { nitems = newsize;}
void set_item(LINT n, Item itm) { items[n] = itm;}
void set_conf_lvl(FLOAT newconf) { conf = newconf; }
// void shuffle(LINT k); // allows selection of k random items from
the string
// Item rand_item(LINT n) { return ritems[n];} // works with shuffle
};
________________________________________

"StringSet &lits" is the unexpected text. What can be the possible
reason?


Whoever wrote it relied on 'class StringSet' to either have been defined
before this class or that 'friend class StringSet' defines it. The latter
is not true. Try writing

class StringSet;

before

class String {

V
Jul 23 '05 #6
Hi,
class StringSet;


Works! :) Thx for the tip!

Regards - Michael
Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: RJS | last post by:
Hi all, I can't get a py2exe compiled app to run with numarray (numarray-0.5.win32- py2.2). Also wxPythonWIN32-2.3.3.1-Py22 and ActivePython-2.2.1-222. In the sample below, commenting out...
1
by: A. B., Khalid | last post by:
Hello all. After a search on Google it would seem that the users of Mingw have not had good results in compiling the python sources natively. See at least: ...
0
by: Michael Höing | last post by:
Hi, I tried to compile the following : http://www.almaden.ibm.com/software/quest/Resources/datasets/data/assoc.gen.tar.Z from...
0
by: the.frapster | last post by:
HI, I hope you all can help me, or at least point me in the right direction. I am not a programmer, I am just trying to help some students in a programming class with this issue, I am the lab...
3
by: Sebastian Bassi | last post by:
I was trying to install Python 2.5 compiling from sources. I used: ../compile It run OK. Then: make altintall After a lot of output, got this: Listing /usr/local/lib/python2.5/xml/sax ......
0
by: james.mcdonagh | last post by:
Hi I am a newbie using nAnt for .net 2.0. As such I have not come across this bug before, and I would be happy of any help that you may be able to provide. In order to help I have included the...
1
by: jamesmcdonagh | last post by:
Hi newbie using nAnt for .net 2.0. I would be happy of any help that you may be able to provide. The weird thing is that VS.net builds without a problem. And the intellisense within the object...
3
by: Rene | last post by:
Hello to all! For a long time I have been "fighting" a problem compiling an OpenGL program which uses GLUT. First I have put a question in a Watcom group (I want to use this compiler) to which I...
6
by: Oliver Graeser | last post by:
Ok, stupid question.... I used to write programs all into one text files and compile them. Works, fine. Then I discovered XCode (or IDEs in general) which appear to be really increasing my...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.