CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: 2kaud

Page 1 of 80 1 2 3 4

Search: Search took 0.18 seconds.

  1. Re: Critical section begin end() changing the auto value

    Then the original issue is a threading one as it looks like that cpTddCell pointer is changed somewhere so that the ref to cpTddCell->GetID() becomes invalid and hence has 'garbage' data.
  2. Re: Critical section begin end() changing the auto value

    You need to make sure that the char* pointer is valid throughout the execution of that section of code and isn't being changed (or contents overwritten) somewhere on a different thread.

    In post #1...
  3. Re: Critical section begin end() changing the auto value

    That change would only be applicable if all changes to cpTddCell() were protected with a critical section.

    What is the type of cpTddCell->GetID()? Why is sDecouplingId a ref - for performance...
  4. Re: Critical section begin end() changing the auto value

    sDecouplingId is a ref - so to what it references has to be valid throughout its life. This is obviously multi-threaded code - so I suspect that the problem is not related to the critical section...
  5. Replies
    7
    Views
    295

    Re: WSL (Windows Subsystem for Linux)

    Sorry, no.
  6. Thread: C++20

    by 2kaud
    Replies
    3
    Views
    7,157

    Sticky: Re: C++20

    Draft standard documentation relating to C++20:

    21 Jan 2019 N4800 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/n4800.pdf
    15 March 2019 N4810...
  7. Replies
    49
    Views
    6,953

    Re: Problem with cmath/gsl

    PS. I don't see anywhere in the code I've seen where testing is done for failed memory allocation? Normally, in c after every allocation there would be a test that the allocation was successful - or...
  8. Replies
    49
    Views
    6,953

    Re: Problem with cmath/gsl

    1. Without a study of the code, I couldn't say. If it works...... What's the value of sizeof(mwSize) ? if 4 * sizeof(mwSize) is > 3 * sizeof(int), then discounting possible 'wasted' memory...
  9. Replies
    49
    Views
    6,953

    Re: Problem with cmath/gsl

    That file contains just one function mexFunction(). If you provide a main() wrapper that calls mexFunction(), I'll have a look.
  10. Replies
    49
    Views
    6,953

    Re: Problem with cmath/gsl

    You're going to have to debug the code to see where is the problem.

    What happens when you compile for 32 bit?

    If it runs OK for 32 bit, then I suspect you have an allocation error somewhere....
  11. Replies
    49
    Views
    6,953

    Re: Problem with cmath/gsl

    If you are having memory allocation/access issues, then I would try compiling for 32 bit. Not all 32 bit code compiles/executes properly for 64 bit without changes.

    Also, are you compiling/linking...
  12. Replies
    49
    Views
    6,953

    Re: Problem with cmath/gsl

    Are you compiling as 32 or 64 bit? If 64, have you tried compiling/running as 32 bit?
  13. Replies
    49
    Views
    6,953

    Re: Problem with cmath/gsl

    The attached image is unreadable!

    d_in is initialised with the result of the call to mxMatrix3Double() on line 182. Any value of d_in prior to line 182 is random, but as it's value isn't used...
  14. Replies
    49
    Views
    6,953

    Re: Problem with cmath/gsl

    I only compiled examples within VS - not mex. The example that required cblas.lib was your example from post #18 - as per the attached zip in post #31.

    I know nothing about mex/matlab - and can't...
  15. Thread: C++20

    by 2kaud
    Replies
    3
    Views
    7,157

    Sticky: Re: C++20

    For compiler support, see https://en.cppreference.com/w/cpp/compiler_support
  16. Replies
    49
    Views
    6,953

    Re: Problem with cmath/gsl

    Using a gsl.lib file from a dll folder looks wrong - especially when you are also using gsl.lib file from the lib folder.

    You might also need to use cblas.lib as well. One of the test examples I...
  17. Replies
    49
    Views
    6,953

    Re: Problem with cmath/gsl

    Yes. From the mrcdata site, download the gsl zip file for VS2015 (click on VS2015 where it says Download The GSL binaries). Then unzip to the suggested VSGSL folder (or any other folder you want - in...
  18. Replies
    49
    Views
    6,953

    Re: Problem with cmath/gsl

    The mrcdata gsl VS2015 zip file contains all the required gsl .lib, .dll and include files (for x64/86 and debug/release) to enable code using gsl functions to be compiled and linked OK with VS. The...
  19. Replies
    49
    Views
    6,953

    Re: Problem with gsl

    [Title changed to reflect issue with gsl so that users of this forum looking for help with gsl fund this thread]
  20. Replies
    49
    Views
    6,953

    Re: Problem with cmath

    The mrcdata VS2015 lib/dll files work fine with VS2019! The test code on the mrcdata link compiles, links and works fine.

    So does your test code in post #18! :) :thumb:
  21. Replies
    49
    Views
    6,953

    Re: Problem with cmath

    I've had a look at compiling gsl within VS without using the GNU make system. Unfortunately it's an absolute nightmare - so I won't be able to help further with this.
  22. Replies
    49
    Views
    6,953

    Re: Problem with cmath

    That was me asking if any other codeguru reading this thread could provide further info. :)
  23. Replies
    49
    Views
    6,953

    Re: Problem with cmath

    I compiled within MSVC when testing the cmath issue using the provided files. Once I'd sorted the compile errors, I still got plenty of linker errors (that you're getting). For the issue of the cmath...
  24. Replies
    49
    Views
    6,953

    Re: Problem with cmath

    The TYPE macro (and probably others) can't be found by the compiler (3rd error line) as the file in which they are defined (??) isn't being included as part of the compile.

    The link in post #15...
  25. Replies
    49
    Views
    6,953

    Re: Problem with cmath

    This link https://solarianprogrammer.com/2020/01/26/getting-started-gsl-gnu-scientific-library-windows-macos-linux/

    describes how to install gsl for Visual Studio 2019
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)