Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

PaulS_UK

@PaulS_UK
About
Posts
6
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • C++ DLL Debugging - Visual Studio 2022
    P PaulS_UK

    Can someone please tell me how I can debug a C++ DLL from within Tradestation 10 by attaching VS2022 to the Tradestation process?

    I can compile a DLL successfully and call a function from it for display within a Tradestation workspace. After a LOT of time spent browsing around on various MicroSoft learning pages etc etc, I have arrived at the following method but cannot get Visual Studio 2022 to load symbols or recognize the required .PDB file(s).

    To complicate matters the DLL must be a release version and reside in the Tradestation system file for it to work with Tradestation. It is my understanding that this is ok so long as the relevent .pdb files are available to enable debugging. Here is my methodology so far:

    1. Compile the C++ DLL in Visual Studio 2022 in RELEASE mode as specified for use in tradestation.
    2. Set post build to copy MyDLL.dll and MyDLL.pdb to C:\Program Files (x86)\TradeStation 10.0\Program
    3. Indicator using function from MyDLL.dll plots ok - great!
    4. Set breakpoint in C++ code within function in Visual Studio 2022: breakpoint shows no errors.
    5. Attempt to debug in release mode in VS 2022 by attaching Tradestation process using indicator/MyDLL to be debugged: Debug -> Attach to Process... -> ORPlat.exe

    ++++ Now things do not go to plan ++++++++

    1. MyDLL.dll not listed in Modules window
    2. Numerous messages appear in the Modules window such as:
      ORPlat.exe C:\Program Files (x86)\TradeStation 10.0\Program\ORPlat.exe Cannot find or open the PDB file.
    3. MyDLL.dll shows up as being loaded ok using DebugView

    Compiler settings in VS2022 are:

    /ifcOutput "Release\" /GS /GL /analyze- /W3 /Gy /Zc:wchar_t /Zi /Gm- /Od /Fd"Release\vc143.pdb" /Zc:inline /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "GLOBALVARIABLE23_EXPORTS" /D "_WINDLL" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /Gd /Oy- /Oi /MT /FC /Fa"Release\" /EHsc /nologo /Fo"Release\" /Ot /Fp"Release\Future DLL.pch" /diagnostics:column

    Am I flogging a dead horse here? Is it impossible to debug MyDLL.dll from within Visual Studio by attaching it to the Tradestation process (ORPlat.exe)? If it is not possible (such as debugging only from within Tradestation; how do you attempt serious debugging in complex C++ code within your MyDLL.dll functions?

    Any help on this greatly appreciated!

    Cheers

    C / C++ / MFC visual-studio debugging announcement csharp c++

  • g++ Compiler not including header file
    P PaulS_UK

    Thanks Jochen I might not have given you enough information. The actual text of the linking error message is: In function `process(int, char*, ControlData*, char*, char*)': PROCESS.CPP: (.text+0x788): undefined reference to `readsig(MiscParams*, char*)' PROCESS.CPP: (.text+0xaac): undefined reference to `sig_save(Signal*, char*)' PROCESS.CPP: (.text+0xdd4): undefined reference to `display(Signal*, MiscParams*, int)'............. ......etc etc etc so there are many undefined references to functions from within the function 'process' contained in PROCESS.CPP however; all these functions are defined in funcdefs.h as follows:

    extern int readsig ( MiscParams *misc , char *namelist , int *nsigs ,
    Signal ***signals , char *error ) ;

    etc etc etc as I understand it, the various individual *.cpp files are referring to functions that are defined within funcdefs.h shouldn't these definitions be included from this file by the pre processor instruction and therefore be defined references? Or are you saying that it is the function 'process' in PROCESS.CPP that is calling other undefined references? The very first such call is 'readsig' which is defined in functions.h Or are you saying that I should just call functions.h functions.cpp? This is driving me nuts so thanks for your help! ++++++++++EDIT+++++++++++ Jochen - I think I'm beginning to get your drift! The fundefs.h file only contains function prototypes not definitions :)

    C / C++ / MFC c++ hardware question

  • g++ Compiler not including header file
    P PaulS_UK

    Hi I am using g++ to compile on a raspberry pi. using the following the project compiles:

    g++ -c file1.cpp file2.ccp .....filen.cpp

    however using the following I get numerous messages as follows: filen.cpp: (.text+0xb73c): undefined reference to `******* etc etc etc these functions are defined in a header file in each of the file*.cpp files thus:

    #include "funcdefs.h"

    this header file is located in the same directory as the *.cpp files the header file was originally entitled FUNCDEFS.H but I changed the name to lower case funcdefs.h to stop the compiler complaining. the funcdefs file contains the following code:

    //#if !defined(FUNCDEFS_H)
    //#define FUNCDEFS_H

    #if !defined(funcdefs_h)
    #define funcdefs_h

    extern double func1 ( double f ) ;
    extern void func2 ( double *input ) ;
    //etc etc etc

    #endif

    I have tried making the preprocessor directive in the funcdefs.h file lower case (didn't make any difference) and have checked the include path using -H and it seems to find the file but cannot get it to link. Any ideas? Thanks

    C / C++ / MFC c++ hardware question

  • g++ _fullpath compilation error
    P PaulS_UK

    Thanks - I really appreciate it!

    C / C++ / MFC c++ help hardware

  • g++ _fullpath compilation error
    P PaulS_UK

    Aha! Thanks Jochen I'll look into that: the clue was there with the underscore?

    C / C++ / MFC c++ help hardware

  • g++ _fullpath compilation error
    P PaulS_UK

    Hi I'm trying to compile a c++ project on a raspberry pi using g++. I get the following compilation error: PROCESS.CPP: In function ‘int process(int, char*, ControlData*, char*, char*)’: PROCESS.CPP:172:49: error: ‘_fullpath’ was not declared in this scope PROCESS.CPP:185:45: error: ‘_fullpath’ was not declared in this scope The file PROCESS.CPP has the header

    #include

    which I thought should contain this declaration. I have checked the header path using the g++ -H command and it gives /usr/include/stdlib.h so I presume it is finding the file. I don't want to start fiddling with my own declarations within the scope as there are many other files to include in this project. Any help would be appreciated

    C / C++ / MFC c++ help hardware
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups