Thread: trying to compile a dll

  1. #1
    Hobo
    Guest

    trying to compile a dll

    I am trying to compile my first dll file. at home I tried with Borland Free Compiler, but do not know the options to specify and can't find, if someone could tell me this also please let me know.

    Now at uni, i try to compile with visual C and am getting an error:

    :\temp\myproj\testdll.h(15) : error C2059: syntax error : 'string'

    this is the offending code

    #define MYLIBAPI extern "C" __declspec(dllexport)

    MYLIBAPI DWORD g_nResult;

    this is the method according to 'programming apps for windows' by Richter, p 689

    any help appreciated

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    156
    It all looks fine. Do you have "windows.h" included do declare DWORD ?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. need help to compile this into dll
    By monxxx in forum C Programming
    Replies: 1
    Last Post: 10-09-2006, 02:41 PM
  2. C++ .NET - "inconsistent dll linkage" - What's that?
    By BrianK in forum Windows Programming
    Replies: 2
    Last Post: 03-16-2004, 10:16 AM
  3. Calling a VB DLL w/ forms from C++ DLL
    By UW_COOP in forum C++ Programming
    Replies: 8
    Last Post: 06-30-2003, 08:04 AM
  4. really, really basic DLL use
    By geophyzzer in forum Windows Programming
    Replies: 6
    Last Post: 09-24-2002, 06:09 PM
  5. Dll question again. Reference to No-One
    By G'n'R in forum C Programming
    Replies: 0
    Last Post: 10-24-2001, 03:52 AM