Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6918889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:55:03+00:00 2026-05-27T09:55:03+00:00

I am getting compile error candidate function(s) not accessible when calling certain members, although

  • 0

I am getting compile error candidate function(s) not accessible when calling certain members, although I declared them as public.
I only get the error when some class from vtk is involved (as return type or as argument) and when the class to be called is not in the same VS-project as the calling code. I also tried other vtk types with no luck 🙁

Here is some test code:

// A.h, in a seperate class library
#include <vtkActor.h>
public ref class A
{
public:
    A(void);

    void test1(vtkActor* actor);
    vtkActor* test2();
    void test3(char* actor);
    char* test4();
};


// B.h, Same as A but in the same project as the calling code 
#include <vtkActor.h>
ref class B
{
public:
    B(void);

    void test1(vtkActor* actor);
    vtkActor* test2();
    void test3(char* actor);
    char* test4();
};

I tried to call the functions from the same project B is in like this:

// calls to class library
A^ testA = gcnew A();    
testA ->test1(vtkActor::New());  // error
testA ->test2();                 // error
testA ->test3("");               // ok
testA ->test4();                 // ok

// calls to this project
B^ testB = gcnew B();
testB ->test1(vtkActor::New());  // ok
testB ->test2();                 // ok
testB ->test3("");               // ok
testB ->test4();                 // ok

In the two lines with //error this is the exact message:

error C3767: 'A::test1': candidate function(s) not accessible

How I can resolve this error? Why does it occur only on vtk-types?

kind regards,
richn

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:55:04+00:00Added an answer on May 27, 2026 at 9:55 am

    A short look at C3767 documentation and the community comments shows:

    Another error-generating scenario

    Another thing that seems to generate this error is using a native type
    in the signature of a public method, and then trying to call that
    method from a different assembly.

    The solution here is to add a #pragma make_public on the native type,
    after defining the native type but before defining the managed method
    that uses it. The docs for #pragma make_public imply you’re supposed
    to get a compiler warning when a non-public native type is exposed by
    a public managed type, but (at least with the default warning levels)
    that does not seem to be the case.

    Did you check that suggestion?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am getting the compile error: Error 7 error C2084: function 'Boolean IsPointInRect(...)' already
Im getting this linker error that won't let me compile. It only happens on
I keep getting the error: Type was not found or was not a compile-time
I'm getting a compile error Unable to convert int to short. Any ideas? public
I am getting a compile error from the following property. The error is: The
I am getting a compile error, saying that the copy constructor of the scoped_ptr
Can anyone explain why I'm getting this compile error? Duplicate 'Rad.Core.Aop.MethodArgumentValidation' attribute E:\Scripting\Rad.Core\Properties\AssemblyInfo.cs This
I'm getting a totally bizzare error trying to compile a C program using GCC.
I’m getting system error when I try to compile the code below on Visual
I'm getting a nothing to repeat error when I try to compile this: search

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.