This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: isalnum not declared CODE

Hi Nikolai,

>My Linux filesystem is case sensitive, Cygwin is not.

Just checking.

It is possible to have a case insensitive file system with Linux. Weird, but possible.

>Did you try make?

Yes, I did the compile using make.

>Did not it give you the 'isalnum' error?

No, it gave me a bunch of other errors because my file structure is not identical to yours. Hence, I had to tweak the makefile you provided to refer to locations on my machine.

>Tweaking is not a good solution for me, because the code is rather complicated.

It will be a hard problem to fix if you don't want to make changes.

I had to make some tweaks to get your toy application to compile. In part because your example was incomplete and not compilable. In part because my environment is different from yours, and your make file has hardcoded some environmentals.

>I suspect that my problem is related to the problem discussed in the thread (I did not participate in it)

Could very well be. But since your main.ii indicates that the isalnum is present, that doesn't seem likely.

>Below are the lines related either to ctype.h or isalnum that I found in main.ii in Cygwin (extern int isalnum (int) throw () was absent).

Interesting. That /usr/include/ctype.h has the isalnum that should be referenced in /usr/include/c++/3.3.1/cctype header.

The /usr/include/c++/3.3.1/bits/locale_facets.h isalnum has the signature (char,locale), not (int), and resides in the std:: namespace.

Side note:  in your agstring.h file, you have...
#define _String_h 1
...that's a reserved identifier.

Try this...

------ foo.cpp ------
extern "C" {
int __attribute__((__cdecl__)) isalnum (int __c);

namespace std
using ::isalnum;

int foo(int ch)
return isalnum(ch);

No #include directives.

g++ -c foo.cpp

Does that compile?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]