Thread: linkage with ada???

  1. #1
    Registered User xds4lx's Avatar
    Join Date
    Nov 2001
    Posts
    630

    Lightbulb linkage with ada???

    I was wondering if it is possible to load in some ada packages and possibly use them in C++. If so could someone give me an example or a link to a tutorial or something. Thanx.
    "only two things are infinite, the universe and human stupidity, and im not sure about the former." - albert einstein

  2. #2
    Registered User
    Join Date
    Feb 2002
    Posts
    8

    Hint: Object Ada, VC

    Don't have an exact answer
    but Object Ada has files that convert from Ada to c++
    types like the one excerpted below:
    -- ================================================== ==========================
    --
    -- JSW Technology
    -- Ada Binding to Win32 (WinAPI)
    -- Version 0.5 Software Release 2
    -- Copyright (c) 1997 John Walker & JSW Technology
    -- All Rights Reserved
    --
    -- Generated by C++ to Ada Tool Version 0.5 Software Release 2
    --
    -- Options: AddressOf, ArrayOf, IgnoreConstInArgument
    -- Underline string: a
    -- Libraries (from pragma comment(lib, ...)):
    -- libcmt.lib
    -- kernel32.lib
    -- user32.lib
    -- gdi32.lib
    -- winspool.lib
    -- comdlg32.lib
    -- advapi32.lib
    -- shell32.lib
    -- ole32.lib
    -- oleaut32.lib
    -- uuid.lib
    -- odbc32.lib
    -- odbccp32.lib
    -- comctl32.lib
    -- glu32.lib
    -- IMM32.lib
    -- mapi32.lib
    -- mgmtapi.lib
    -- mpr.lib
    -- msacm32.lib
    -- nddeapi.lib
    -- netapi32.lib
    -- oledlg.lib
    -- olepro32.lib
    -- opengl32.lib
    -- penwin32.lib
    -- pkpd32.lib
    -- rasapi32.lib
    -- rpcns4.lib
    -- rpcrt4.lib
    -- urlmon.lib
    -- uuid2.lib
    -- version.lib
    -- vfw32.lib
    -- winmm.lib
    -- wsock32.lib
    --
    -- ================================================== ==========================

    with System, Unchecked_Conversion;
    with VC;
    use type VC.Int;
    package WinAPI is

    pragma Elaborate_Body;

    -- ================================================== =======================
    -- Global Types and Data
    -- ================================================== =======================

    subtype wchar_t is VC.Unsigned_Short;
    subtype AddressOfwchar_t is VC.AddressOfUnsigned_Short;
    subtype AddressOfAddressOfwchar_t is VC.AddressOfAddressOfUnsigned_Short;
    subtype AddressOfAddressOfAddressOfwchar_t is VC.AddressOfAddressOfAddressOfUnsigned_Short;


    ........................... etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linkage question
    By DL1 in forum C++ Programming
    Replies: 6
    Last Post: 01-13-2009, 07:56 PM
  2. Quantum Random Bit Generator
    By shawnt in forum C++ Programming
    Replies: 62
    Last Post: 06-18-2008, 10:17 AM
  3. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  4. error: template with C linkage
    By michaels-r in forum C++ Programming
    Replies: 3
    Last Post: 05-17-2006, 08:11 AM
  5. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 08:13 PM