Login Page - Create Account

Support Board


Date/Time: Mon, 12 May 2025 10:42:28 +0000



Post From: Problem for linking two CPPs with an .H and compiling it

[2017-02-13 10:20:06]
User210074 - Posts: 63
Oops I forget the good libraries

Test.cpp

#include <windows.h>
#include <math.h>
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <iomanip>
#include <algorithm>
#include <iterator>
#include "sierrachart.h"
using namespace std;
SCDLLName("Test")
SCSFExport scsf_Test(SCStudyInterfaceRef sc) {
SCSubgraphRef Red = sc.Subgraph[0];
if (sc.SetDefaults){
    sc.GraphName = "Test 2 CPP";
    sc.GraphRegion = 0;
    sc.AutoLoop = true;
sc.FreeDLL = 1;
    Red.Name= "Red";
    Red.DrawStyle = DRAWSTYLE_VALUE_ON_HIGH;
    Red.LineWidth = 1;
    Red.PrimaryColor = RGB(0,128,255);
    Red.DrawZeros = true;
    return;
   }//End defaults
double A = 2.0f;
double B = 3.0f;
double C = 4.0f;
double D = 5.0f;
double E = 6.0f;
double F = 7.0f;
Mem(A, B, C, D, E, F);
Red[sc.Index]=Mem;
}//End Function
error

C:\WINDOWS\system32\cmd.exe /C "C:\SierraChart\ACS_Source\VisualCCompile.Bat"


C:\SierraChart\ACS_Source>call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
Test.cpp
C:\SierraChart\ACS_Source\Test.cpp(33): error C3861: 'Mem': identifier not found
C:\SierraChart\ACS_Source\Test.cpp(34): error C2065: 'Mem': undeclared identifier
-- End of Build -- 11:16:51