FirmaSAT Manual

C++ (STL) Programming

The C++ (STL) interface to FirmaSAT is an interface to diFirmaSat2.dll for C++ programmers using STL (C++11 or above).

Required files to compile in a C++ project:
firmasat.hpp
diFirmaSat2.h
firmasat.cpp
  #include "diFirmaSat2.h"
  #include "firmasat.hpp"
{main}.cpp
  #include "firmasat.hpp"
  int main() { ... }
You must link to diFirmaSAT2.lib. In MSVC++ IDE, use Project > Properties > Linker > Input > Additional Dependencies and add the full path to diFirmaSAT2.lib. E.g.
Additional Dependencies = $(OutDir)diFirmaSAT2.lib;%(AdditionalDependencies)
Using the command-line with MSVC:
CL test.cpp firmasat.cpp /link ..\Debug\diFirmaSAT2.lib
Using GCC (make sure the DLL has been compiled for target X64):
g++ -std=c++11 test.cpp firmasat.cpp "C:\fullpath\to\x64\Debug\diFirmaSAT2.lib"

Here is a simple C++ (STL) program for testing.

#include <iostream>
#include "firmasat.hpp"
int main()
{
    std::cout << "Gen::Version=" << firmasat::Gen::Version() << std::endl;
}
[PREV: Pre-dimensioning szOut...]   [Contents]   [Index]   
   [NEXT: VB6/VBA Programming...]

Copyright © 2007-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-04-08T04:07:56Z.