Hello all,
I link the libdxflib.so into my project with
void *handle;
// open dll-handle
handle = dlopen("/home/pstark/workspace/TestDxfLib/src/libdxflib.so", TLD_LAZY);
if (!handle) {
std::cerr << "Cannot open library: " << dlerror() << '\n';
return 1;
}
Unitl here everything is working well,
but how can i now acces to the function in(const char*, DL_creationInterface*)
I try to do it with the following Code snippet:
//create the MyDxf which is from the DL_creationInterface
MyDxf* dxf;
dxf = new MyDxf();
// define return type
typedef bool (*in_t)(const char*, MyDxf*);
// reset errors
dlerror();
// open handle
in_t in = (in_t) dlsym(handle, "in");
const char *dlsym_error = dlerror();
if (dlsym_error) {
std::cerr << "Cannot load symbol : " << dlsym_error << '\n';
dlclose(handle);
return 1;
}
// call procedure
if(!in("/home/pstark/workspace/TestDxfLib/Debug/MP_spirale-0.dxf", dxf)){
std::cout<<"konnte file nicht laden!"<<"\n";
return 1;
}
// close dll-handle
dlclose(handle);
The error is that he cannot found the in() funktion.
Has anybody done/try that bevor?
the source files where compiled with g++-4.2
on a Ubuntu 9.04 System
greets Peter
link the libdxflib.so
Please use this forum to post feedback and suggestions related to dxflib.
Moderator: andrew
-
- Registered Member
- Posts: 1
- Joined: Thu Aug 19, 2010 10:59 am
Return to “dxflib Suggestions and Feedback”
Jump to
- General
- ↳ Announcements
- ↳ Chat
- ↳ Site Feedback
- ↳ Pre-sales Questions
- ↳ Introduce Yourself
- QCAD Professional Version
- ↳ QCAD 'How Do I' Questions
- ↳ QCAD Suggestions and Feedback
- ↳ QCAD Voting Corner
- ↳ QCAD Troubleshooting and Problems
- ↳ QCAD Installation and Upgrades
- ↳ QCAD Programming, Script Programming and Contributing
- ↳ QCAD 'Script Add-On & Plug-in challenge' - Work in Progress
- ↳ Finished 'Ready to go' Scripts/Plug-in's
- ↳ QCAD Tips and Tutorials
- ↳ QCAD/CAM
- ↳ What do you use QCAD/CAM for?
- QCAD Community Edition
- ↳ QCAD Community Edition
- International Forums
- ↳ Français
- ↳ QCAD Professional
- ↳ QCAD/CAM
- ↳ QCAD Community Edition (Version 3)
- ↳ Deutsch
- ↳ QCAD Professional
- ↳ QCAD/CAM
- ↳ QCAD Community Edition
- ↳ Italiano
- ↳ QCAD Professional
- ↳ QCAD/CAM
- ↳ QCAD Community Edition
- ↳ Español
- ↳ QCAD Professional
- ↳ QCAD/CAM
- ↳ QCAD Community Edition
- ↳ Português
- ↳ QCAD Professional
- ↳ QCAD/CAM
- ↳ QCAD Community Edition
- QCAD Book
- ↳ QCAD - An Introduction to Computer-Aided Design
- ↳ QCAD - Una Introducción al Diseño Asistido por Ordenador
- ↳ QCAD - Eine Einführung in computerunterstütztes Zeichnen (CAD)
- QCAD Part Libraries
- ↳ General
- ↳ Creating DXF/DWG items
- ↳ Creating SVG items
- ↳ Meta Data
- dxflib
- ↳ dxflib Suggestions and Feedback
- ↳ dxflib 'How Do I' Questions
- ↳ dxflib Troubleshooting and Problems
- Archive
- ↳ vec2web Format Converter
- ↳ vec2web Suggestions and Feedback
- ↳ vec2web 'How Do I' Questions
- ↳ vec2web Troubleshooting and Problems
- ↳ QCAD Development
- ↳ Translations
- ↳ QCAD Professional (2.1/2.2)
- ↳ QCAD 2.1/2.2 Suggestions and Feedback
- ↳ QCAD 2.1/2.2 'How Do I' Questions
- ↳ QCAD 2.1/2.2 Troubleshooting and Problems
- ↳ QCAD 2.1/2.2 Installation and Upgrades
- ↳ QCAD 2.1/2.2 Developers
- ↳ QCAD Community Edition (2.0)
- ↳ QCAD Community 'How Do I' Questions
- ↳ QCAD Community Patches
- ↳ CAM Expert
- ↳ Announcement
- ↳ CAM Expert Suggestions and Feedback
- ↳ CAM Expert 'How Do I' Questions
- ↳ CAM Expert Troubleshooting and Problems
- ↳ Annonces
- ↳ Ankündigungen
- ↳ Annunci
- ↳ Noticias