User forums > Using Code::Blocks
DLL Exported function list - is too exhaustive - things I don't want in there!
adder6:
Hi!
Quick one (I hope!). I'm using a DLL file all is working fine but I really want to do it using a .DEF file. At the moment even if I include a .DEF file in the project specifying say only two functions, CB exports absolutely everything in the DLL including some global variables and class member functions by the looks.
I don't want this. I only want it to consult the .DEF file and then export only the functions I want it to export. I'm sure there is or will be a setting in the project options which can force this behaviour, but I've no idea where it is?
I searched for DLL stuff but mostly it was asking about how to get DLL's to work, not how to achieve this particular aim.
I'd appreciate any help, anyone can offer - thanks :D
**Note I don't even need to have the .DEF file included in the project for it to export all of this stuff either. CB seems to be doing it's own thing at the moment.
oBFusCATed:
Wrong forum mate...
Read this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_What_Code::Blocks_is_not.3F
BTW, there was a topic about the same problem, not long ago...
adder6:
Thanks for the reply. I've tried searching again to not much avail, some of the topic titles are too short and not descriptive enough perhaps.
It seems this is more a linker/compiler issue perhaps. I assume proper research into the stuff CB leverages might reveal how to do this. I assume some of those blank option fields in the project settings menus are commands you can give to the compiler/linker?
stahta01:
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Learn the name of your Compiler and OS; post the name of your Compiler and OS.
Post compiler questions on a site the supports your compiler; this is NOT a compiler support site.
If you figure out the right command to send to YOUR compiler; ask on this forum how to add the commands to Code::Blocks.
Or, if you find a command Code::Blocks is sending to the compiler that you think is should not; ask how to remove the command.
Tim S.
adder6:
Thanks for the reply. Makes much sense. Here is the type of C++ compiler and dynamic library compiler I am using:
mingw32-g++.exe
I noticed there are places in the project options for build options. Seems you can pass specific instructions to the compiler from here. I believe CB is currently setup to request all available functions and global data items to be subject to exportation. If possible I would like to know what special build options to add to only make it export those found in the .DEF file. If this is even possible. Maybe someone on here will know, but I think first I will ask on mingw forum site.
At the moment it looks like standard compiler build option for DLL files uses following type of commands:
g++ -c -DBUILDING_EXAMPLE_DLL example_dll.cpp
g++ -shared -o example_dll.dll example_dll.o -Wl,--out-implib,libexample_dll.a
for a file/project named example_dll. -DBUILDING part of the commands I believe causes all found functions to be exported using dllexport. This is probably what my problem is.
I will ask on mingw forum for more information then reply here again. Thanks :D
Navigation
[0] Message Index
[#] Next page
Go to full version