Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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 which 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 this 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, this 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 this 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

0 Replies

· Add your reply
  • Sort: 

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.

Follow this Question

Answers Answers and Comments

87 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

Related Questions

How to add a custom module to Unity? 0 Answers

XInputDotNetPure plugin: Namespace could not be found. 1 Answer

Error loading a 3.0 framework dll (WFC) 1 Answer

How to use Google Apps Script with Unity and create a simple application that makes requests to the Google Apps Script Execution API 0 Answers

How to link to scripts in the Package Manager when building a dll. 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