Use Openssl function but meet "Expected ';', ',' or ')' before 'in' "

Discussion in 'Mac Programming' started by marsyanggo, Nov 17, 2009.

  1. marsyanggo macrumors newbie

    Joined:
    Nov 17, 2009
    #1
    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:
     
  2. newb16 macrumors regular

    Joined:
    Feb 27, 2008
    #2
    Irrelevant to the compile error.

    Post the part of include file above the line that caused error.
     
  3. marsyanggo thread starter macrumors newbie

    Joined:
    Nov 17, 2009
    #3
    #import <Cocoa/Cocoa.h>


    @protocol test_def

    #include "openssl/dh.h"

    ...

    @end
     
  4. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #4
    Try moving the #include above the @protocol declaration.
     
  5. marsyanggo thread starter macrumors newbie

    Joined:
    Nov 17, 2009
    #5
    Yes.
    I change the @ header from @protocol to @interface

    It is compiled.

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

Share This Page