Results 1 to 4 of 4
Hi everyone
I am doing a simple SSL server program using OpenSSL. I just initialize the OpenSSL library and i compile. Then the GCC return a warning message "data definition ...
- 08-03-2009 #1Just Joined!
- Join Date
- Dec 2007
- Posts
- 19
warning: data definition has no type or storage class
Hi everyone
I am doing a simple SSL server program using OpenSSL. I just initialize the OpenSSL library and i compile. Then the GCC return a warning message "data definition has no type or storage class. The snippet is as below :-
Hope that anyone of you can help me. My OpenSSL version is 0.9.8g 19 Oct 2007.Code:#include <stdio.h> #include <openssl/bio.h> #include <openssl/ssl.h> #include <openssl/err.h> OpenSSL_add_all_algorithms(); //This is where the warning message returned SSL_load_error_strings(); //This is where the warning message returned int main() { return 0; }
Thanks
- 08-03-2009 #2Just Joined!
- Join Date
- Jul 2009
- Posts
- 58
You can pre-declare your functions, but you can't call them outside of function.
I hope that's just a cut-n-paste mistake and you see your problem, otherwise I think you need to start with a "hello world" and a couple of programming books. Programming isn't something you can just copy-n-paste from sources on the web.
- 05-23-2011 #3Just Joined!
- Join Date
- Dec 2010
- Posts
- 15
The same warning
I try to use ANSI C hash-table implementation and also get the same warning (and 1 error and 1 note).
The following snippet is from YACC declarations part:
Besides the warning (in the thread title), I also getPHP Code:#include "strmap.h" // ANSI C hash-table implementation (definitions are in "strmap.c")
// ...
StrMap *SYMTAB;
SYMTAB = sm_new(10);
// ...
What am I doing wrong?Code:asm.y:(2nd line): error: conflicting types for ‘SYMTAB’ asm.y:(1st line): note: previous declaration of ‘SYMTAB’ was here
- 05-23-2011 #4forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,095
Hello, courteous!
Please start a fresh thread of your own with the details on any problems you are having because this one is 2 years old.
Thanks.oz
→ new members/users: read this first | new member faq
→ no private messages requesting computer support - post them on the forums!
→ please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.


