• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by MathiasDG · May 25, 2017 at 02:28 PM · errorplugindllpluginslinux

EntryPointNotFoundException - .so plugin (Linux)

I'm trying to use a .so plugin w$$anonymous$$ch I compiled using Linux but i keep getting EntryPointNotFoundException

Here's a sample of the c++ code.

cpp:

 #include <rosgraph_msgs/Clock.h>
 #include <unistd.h>
 #include <thread>
 #include "ros_interface.hpp"
 #include "node.hpp"
 
 // Default initializer
 ros_interface::ros_interface() {
     // NOP
 }
 
 // Initialize the ROS communication interface
 ros_interface::ros_interface(int argc, char** argv, string node_name) {
     // ROS initialization
     ros::init(argc,argv,node_name);
 
     // Set the time simulation as in "/clock"
     system("rosparam set /use_sim_time true");
 
     // Initialize the pointer to clocker
     c = new clocker;
 
     // Set publisher on clocker
     c->pub_clock = c->nh.advertise<rosgraph_msgs::Clock>("/clock",1);
 
 }
 
 // Destructor
 ros_interface::~ros_interface() {
     // Delete all node pointers in nodes_ptr
     for(auto x : nodes_ptr) delete *((node**) x);
 
     // Delete clock struct pointer
     delete(c);
 }
 
 extern "C" void initialize() {
     instance = new ros_interface(0, 0, "instance");
 }
 
 // Lots of other stuff

And the hpp:

 #ifndef ROS_INTERFACE_H
 #define ROS_INTERFACE_H
 
 #include <string>
 #include <vector>
 
 // Position data type
 struct position {
     double x;       // position in x
     double y;       // position in y
     double z;       // position in z
     double roll;    // lateral axis (X)
     double pitch;   // longitudinal axis (Y)
     double yaw;     // vertical axis (Z)
 };
 
 // Velocity data type
 struct velocity {
     double x;       // velocity in x
     double y;       // velocity in y
     double z;       // velocity in z
     double roll;    // lateral axis angular velocity
     double pitch;   // longitudinal axis angular velocity
     double yaw;     // vertical axis angular velocity
 };
 
 extern "C" void initialize(); 
 extern "C" void addNode(int id, int type, std::string target, position init_pose); 
 extern "C" void setVelocity(int id, velocity msg); 
 extern "C" position getPos(int id); 
 extern "C" void setClock(float dt); 
 extern "C" bool rosOk(); 
 
 // Node class to ROS interface
 class ros_interface {
 public:
     // Default initializer
     ros_interface();
 
     // Initialize the ROS communication interface
     ros_interface(int argc, char** argv, std::string node_name);
 
     // Destructor
     ~ros_interface();
 
 // And more stuff...


And here's the c# code used in unity:

     [DllImport("ros_interface")]
     private static extern void initialize();
 
     [DllImport("ros_interface")]
     private static extern void addNode(int id, int type, string target, Pose init_pose);
 
     [DllImport("ros_interface")]
     private static extern void setVelocity(int id, Pose p);
 
     [DllImport("ros_interface")]
     private static extern bool rosOk();
 
 
     // Use t$$anonymous$$s for initialization
     void Start()
     {
         initialize();
     }

I build it sucessfully with unity and then run it on linux, but i get the following error when calling the initialize method:

EntryPointNotFoundException: initialize

I did some research, t$$anonymous$$s error means that the initialize method was not found on the plugin, but the method seems to be there and I haven't found a solution. The same error will pop if I try to call any of the methods from the .so plugin.

What can I do to make t$$anonymous$$s plugin work?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by mahadevanv · Aug 26, 2022 at 01:34 PM

Did you resolve t$$anonymous$$s? I also got the same error.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

88 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to link to scripts in the Package Manager when building a dll. 0 Answers

How do you use a class from a .dll file? 1 Answer

Dll not found exception: unable to load dll 0 Answers

EntryPointNotFoundException, when trying to import DLL. Help please :) 1 Answer

FileNotFoundException: Could not load file or assembly 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges