getting started with the projectwise sdk using c++

This is probably already well covered with a wiki or previous question post or something like that.

If so, I apologise, please refer me to the URL and we can delete this duplication.

C++ with Visual Studio Pro 2013

I start a new CLR Empty Project.

Then I think I have gone totally off track, trying to reference the SDK. I believe I should be referencing the DLL's - but how is that done with C++?

I used Project Properties > Configuration Properties > Linker

... General > Additional Library Directories to add a library directory (was that the correct one?)

... Input > Additional Dependencies to add the LIB's (dmsgen, dmawin etc.) (maybe this cannot be done until a correct path is included somewhere?)

Any help is always greatly appreciated, Kevin.

Parents
  • Kevin, I have never used a CLR project for ProjectWise integration. I have always used a MFC DLL project. I believe that the samples are also MFC DLLS. To my knolwedge PW is unmanaged code. Take a look at the projects in the Samples directory under your SDK. 

        C++ is different from C# in that you use header files found in the Include directory for the function definitions and then the Linker uses the .lib files in the libwin32 or libx64 directory to tie the program to the DLL files that it calls. 

  • Still no luck.

    When you open the samples you can see the hooks already under External Dependencies
    (aadmsdef.h , aawindms.h etc.)

    I started a new MFC Project (VS 2013 Pro).

    I added folders: C:\Program Files (x86)\Bentley\ProjectWise\SDK\include (where the hook files are) and
    C:\Program Files (x86)\Bentley\ProjectWise\SDK\libwin32 (where the lib files are)
    to: Linker > General > Additional Library Directories

    I added: dmsgen.lib, dmscli.lib, dmactrl.lib, dmawin.lib
    to: Linker > Input > Additional Dependencies

    These 2 linker settings did not add the hooks under External Dependencies (as shown in samples)
    How do I get the PW SDK hooks (aa*.h) to be included in my new Projects External Dependencies?

    Thanks for your patience.

    Kevin.
  • Aha! . . . . : ) some progress . . . .

    Under Project Properties > C/C++ > General
    added the C:\Program Files (x86)\Bentley\ProjectWise\SDK\include folder
    to additional include directories

    Now the hook files are included in the Projects External Dependencies...

    This post is not 100% answered yet ... I must still get this new project to complete a task first...
  • Aha! another big step forwards...

    Project Properties > Configuration Properties > Debugging > Environment ..
    PATH=%PATH%;C:\Program Files (x86)\Bentley\ProjectWise\bin

    .. but I repeat ...

    This post is not 100% answered yet ... I must still get this new project to complete a task first...
  • Getting started with the Project Wise SDK (VS 2013 Pro, C++)

    Project Properties > Configuration Properties >
    ... Debugging
    ... ... Environment: PATH=%PATH%;C:\Program Files (x86)\Bentley\ProjectWise\bin
    ... C/C++
    ... ... Additional include Directories: C:\Program Files (x86)\Bentley\ProjectWise\SDK\include
    ... Linker
    ... ... General
    ... ... ... Additional Library Directories: C:\Program Files (x86)\Bentley\ProjectWise\SDK\libwin32
    ... ... Input
    ... ... ... Additional Dependencies: dmsgen.lib, dmscli.lib, dmactrl.lib, dmawin.lib

    My test project simply initialized, logged in to data source and copied out a document ... that's enough for me to get started.
    It was so cool to be able to select from list while writing code, conquering c++ however may take some time ... : (

    Answer Verified By: Kevin 

Reply
  • Getting started with the Project Wise SDK (VS 2013 Pro, C++)

    Project Properties > Configuration Properties >
    ... Debugging
    ... ... Environment: PATH=%PATH%;C:\Program Files (x86)\Bentley\ProjectWise\bin
    ... C/C++
    ... ... Additional include Directories: C:\Program Files (x86)\Bentley\ProjectWise\SDK\include
    ... Linker
    ... ... General
    ... ... ... Additional Library Directories: C:\Program Files (x86)\Bentley\ProjectWise\SDK\libwin32
    ... ... Input
    ... ... ... Additional Dependencies: dmsgen.lib, dmscli.lib, dmactrl.lib, dmawin.lib

    My test project simply initialized, logged in to data source and copied out a document ... that's enough for me to get started.
    It was so cool to be able to select from list while writing code, conquering c++ however may take some time ... : (

    Answer Verified By: Kevin 

Children