PDA

View Full Version : Use Openssl function but meet "Expected ';', ',' or ')' before 'in' "




marsyanggo
Nov 17, 2009, 10:09 AM
Hi Dear all

I am trying to call some openssl function in my code.

I had add /Developer/SDKs/MacOSX10.5.sdk/usr/include/ in the search header path.

And add -lssl -lcrypto in link other flag.

Then I import the openssl header file
#include "openssl/dh.h"

Then I meet the compile error.

Did any one meet the problem before.:confused:



newb16
Nov 17, 2009, 10:45 AM
And add -lssl -lcrypto in link other flag.

Irrelevant to the compile error.

Post the part of include file above the line that caused error.

marsyanggo
Nov 17, 2009, 11:48 AM
#import <Cocoa/Cocoa.h>


@protocol test_def

#include "openssl/dh.h"

...

@end

robbieduncan
Nov 17, 2009, 12:04 PM
Try moving the #include above the @protocol declaration.

marsyanggo
Nov 17, 2009, 12:36 PM
Yes.
I change the @ header from @protocol to @interface

It is compiled.

I am an newbie for Mac programming.
Thanks for your helps.