Thread: Problem in exporting a function

  1. #1
    Registered User
    Join Date
    Nov 2006

    Problem in exporting a dll function

    Hi all,

    I have a win32 dll workspace. In this workspace i have most of the files as .c files. I want to export one of the function from this dll. The function is a static function. so for that function if i export it in this way

    __declspec(dllexport) static rdiff_sig(const char *BasisPath, const char *SigPath);

    i am getting one error message as below.

    error C2201: 'rdiff_sig' : must have external linkage in order to be exported/imported

    What should i do to solve this problem.


    Datta K.
    Last edited by dattaforit; 12-01-2006 at 05:29 AM.

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Rishon LeZion, Israel
    remove static as asked by the compiler
    and providing the return type will be also useful
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. wxWidgets link problem
    By cboard_member in forum C++ Programming
    Replies: 2
    Last Post: 02-11-2006, 02:36 PM
  2. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  3. Problem with function pointers
    By vNvNation in forum C++ Programming
    Replies: 4
    Last Post: 06-13-2004, 06:49 AM
  4. Replies: 5
    Last Post: 02-08-2003, 07:42 PM
  5. I need help with passing pointers in function calls
    By vien_mti in forum C Programming
    Replies: 3
    Last Post: 04-24-2002, 10:00 AM