??? I can't understand.
Before committing any change I compile all demo and source in my RH7.1 and MSVC. Also 1.9.3 compile succefully on RH7.2.
Which code are you trying to compile?
Perhaps your code without installing CommonC++??
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Let me tell you what I have found .
c++ -DHAVE_CONFIG_H -Wall -D_THREAD_SAFE -D__DEBUG__ -c -g -o DDNS DDNS.cpp
In file included from DDNS.cpp:7:
/usr/include/cc++/thread.h:339: syntax error before `;'
make: *** [all] Error 1
#include <stdio.h>
#include <cc++/config.h>
#include <cc++/strchar.h>
#include <cc++/exception.h>
#include <cc++/thread.h>
#include <cc++/socket.h>
#include <cstdlib>
and
when i change to
#include <cc++/config.h>
#include <cc++/strchar.h>
#include <cc++/exception.h>
#include <cc++/thread.h>
#include <cc++/socket.h>
#include <cstdlib>
#include <stdio.h>
no error .
what about you ?
I can not tell why . Who can tell me ?
under Redhat 6.2 and Common C++ 1.9.3
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
without stdio.h
i got
c++ -DHAVE_CONFIG_H -Wall -D_THREAD_SAFE -D_REENTRANT -D__DEBUG__ -c -g -o DDNS DDNS.cpp
DDNS.cpp: In method `void DNSSERVER::Run()':
DDNS.cpp:67: `FILE' undeclared (first use this function)
sorry , i'm not good at c++ , so i have to use some c sytle codes with common c++ .
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am using Common C++ 1.9.3 with GCC 2.96 compiling a code including:
cc++/config.h,cc++/strchar.h,cc++/exception.h,
cc++/thread.h,cc++/socket.h,cc++/iostream.h
cc++/cstdlib,string,map
Any idea what's happening? I tried to include
pthread without any results.
Thank You
Sebastian Wain
maybe you should add -DHAVE_CONFIG_H when you complie your program .
The same error happened.
Thanks
Sebastian Wain
??? I can't understand.
Before committing any change I compile all demo and source in my RH7.1 and MSVC. Also 1.9.3 compile succefully on RH7.2.
Which code are you trying to compile?
Perhaps your code without installing CommonC++??
I tried to compile my own code. I tried before with an old version of common c++.
May be the gcc 2.96?
Thank You
Sebastian Wain
Well... I didn't change the compiler, I use 2.96 too... perhaps is a strange bug of 1.9.3... have access to cvs ??
Let me tell you what I have found .
c++ -DHAVE_CONFIG_H -Wall -D_THREAD_SAFE -D__DEBUG__ -c -g -o DDNS DDNS.cpp
In file included from DDNS.cpp:7:
/usr/include/cc++/thread.h:339: syntax error before `;'
make: *** [all] Error 1
#include <stdio.h>
#include <cc++/config.h>
#include <cc++/strchar.h>
#include <cc++/exception.h>
#include <cc++/thread.h>
#include <cc++/socket.h>
#include <cstdlib>
and
when i change to
#include <cc++/config.h>
#include <cc++/strchar.h>
#include <cc++/exception.h>
#include <cc++/thread.h>
#include <cc++/socket.h>
#include <cstdlib>
#include <stdio.h>
no error .
what about you ?
I can not tell why . Who can tell me ?
under Redhat 6.2 and Common C++ 1.9.3
Perhaps is a CommonC++ problem with config.h
But you shouldn't use new header (cstdlib) and old (stdio.h) together !!!
freddy77
without stdio.h
i got
c++ -DHAVE_CONFIG_H -Wall -D_THREAD_SAFE -D_REENTRANT -D__DEBUG__ -c -g -o DDNS DDNS.cpp
DDNS.cpp: In method `void DNSSERVER::Run()':
DDNS.cpp:67: `FILE' undeclared (first use this function)
sorry , i'm not good at c++ , so i have to use some c sytle codes with common c++ .
Perhaps is a CommonC++ problem with config.h
But you shouldn't use new header (cstdlib) and old (stdio.h) together !!!
freddy77
I get the same error. I tried rearranging the header #inludes like you did, and do not have a problem. Did anyone ever solve this problem?
same here, this compiles:
#include <cc++/thread.h>
#include <iostream>
but this won't:
#include <iostream>
#include <cc++/thread.h>
Not a big deal, but it would be nice for this to be posted somewhere in documentation, so I would have to bang my head for hours.
This only is a problem in linux for me. It is not a problem in msvc++