dllexport Questions
3
Solved
When I try to export the following function as a dll:
extern "C" __declspec(dllexport) void some_func()
{
throw std::runtime_error("test throwing exception");
}
Visual C++ 2008 gives me the fol...
Hysterical asked 25/1, 2010 at 19:35
2
Solved
I have an executable written in C that has some functions in it that I would like to use from a c# application. I have written plenty of dlls before and was able to use functions in them by prepend...
Eddington asked 3/6, 2014 at 20:19
5
Solved
In VS C/C++ you could use extern "C" __declspec(dllexport) -function declaration-.
How do I accomplish this in a C# dll? Is there C# code equivalent to the above code?
Edit: More info
I am tryi...
6
Solved
I have a DLL which contains a class with static members. I use __declspec(dllexport) in order to make use of this class's methods. But when I link it to another project and try to compile it, I get...
Geminate asked 19/3, 2010 at 18:43
5
Solved
Is there, a perhaps undocumented way to prevent linker from creating IMPLIB for a DLL or an EXE, despite having __declspec(dllexport) directives within the source code?
Specifying no /IMPLIB resul...
Rufescent asked 2/4, 2012 at 16:22
2
I want to define a derived class based on a dll exported class. The base class is defined in Project A, and the derived class is in Project B.
Firstly, in Project A, preprocessor MYDLL_BUILD is d...
Adamo asked 17/3, 2012 at 4:19
3
Is there any way to automatically generate the DEF file for a DLL in Visual Studio? I've always just manually created them before, but there's gotta be an easier way.
Blumenthal asked 1/2, 2010 at 16:26
3
Solved
Assuming I have these two files:
Header.h
class DLL ExportClass{
public:
ExportClass();
static int test;
};
Source.cpp
#ifdef EXPORT
#define DLL __declspec(dllexport)
#else
#define DLL __d...
Febrifugal asked 12/11, 2013 at 10:32
1
Solved
To build a C library with Visual Studio, the CMake command
set(WINDOWS_EXPORT_ALL_SYMBOLS ON)
saves me from adding __declspec(dllexport) or __declspec(dllimport) in front of function declaration...
0
I have found the DllExport Project on GitHub while searching for a way to use C# .NET Core 3 Code from Plain C/C++. My goal is being able to compile the C# to any dynamic library and use it on both...
Vampire asked 30/9, 2019 at 17:38
2
I have the following scenario in MSVC2017:
A static library with the function bool foo()
A dynamic link library that links to the static library above
An application that loads the dynamic link l...
Bellbella asked 27/5, 2019 at 18:28
2
Solved
I have a running Inno Setup script, wherein I use innocallback.dll by Sherlock Software.
This DLL wraps a procedure of mine so that it can be passed to a C# DLL.
I don't want to use this DLL, I w...
Stevana asked 18/12, 2014 at 15:17
5
Solved
For security purpose, I want to save my macros from VBA in Excel workbook to DLL library file I'd be calling from the file later.
This way it is possible to deploy any version of my macros to com...
Variscite asked 8/2, 2011 at 14:3
3
Solved
foo.cpp(33918) : fatal error C1854: cannot overwrite information formed
during creation of the precompiled header in object file: 'c:\somepath\foo.obj'
Consulting MSDN about this gives me the fo...
Physicist asked 3/6, 2009 at 12:22
1
I am trying to build a shared library (dll for Windows) using Clang++.
I have run the following commands:
clang++ -c -o hello.o hello.cpp
clang++ -shared -v -o hello.dll hello.o
The first comma...
1
Solved
Hi I'm little bit confused with dllexport.When I use __declspec( dllexport ) for example in class
#define DllExport __declspec( dllexport )
class DllExport C {
int i;
virtual int func( void ...
0
I have an Inno Setup script where the desired form was too complicated to build entirely in Inno Setup itself, so I created a helper class library in .NET which contains a WinForms window with the ...
Radie asked 18/11, 2018 at 18:38
2
Solved
I've got two files:
Header.h
#pragma once
#ifdef UNIQUEPTRISSUE_EXPORTS
#define UNIQUEPTRISSUE_API __declspec(dllexport)
#else
#define UNIQUEPTRISSUE_API __declspec(dllimport)
#endif
Uniqu...
2
Solved
At the moment of creating a project of type "Library of Classes, usually one can generate a dll when compiling, but how could I generate a dll without losing others that I already have included?
I...
Heaver asked 3/4, 2018 at 3:14
1
Solved
I am trying to create a C++ DLL that I can import in c#, but my code won't compile.
Here is the code:
//main.cpp
#include "C:\Users\Mihai\Desktop\body.cpp"
#include "C:\Users\Mihai\Desktop\header...
3
Solved
I have a problem with make a dll on Visual Studio 2013. This code works on Code::Blocks. The error was definition of dllimport function not allowed" on line void DLL_EXPORT prim(map<string, vect...
1
Solved
I want to build a DLL version of libjpeg 9b. According to the document here, it seems that we need to add a preprocessor __declspec(dllexport) or __declspec(dllimport) before the declaration of eac...
Moat asked 9/6, 2017 at 6:32
2
Solved
I create a DLL (say CORE.DLL) ,I have classes/functions declared as follows:
#ifdef RINZOCORE_SHARED
#define RINZO_LIB __declspec(dllexport)
#else
#define RINZO_LIB __declspec(dllimport)
#endif
...
1
The project (in cpp) we are working on exports enum types from the dll. In exporting we are having some issues so I wanted to ask something related to exporting enum type.
I think that enum's beha...
0
In a DLL I am working on, I have following class I'd like to export:
class A {
public:
class B
{
std:string placeholder;
};
boost::shared_ptr<B> sp;
};
With that code I need to dlle...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.