Author Topic: How to use dllwrap with code blocks?  (Read 4818 times)

Offline Haziq999

  • Single posting newcomer
  • *
  • Posts: 2
How to use dllwrap with code blocks?
« on: February 18, 2011, 06:40:07 pm »
Hi, I was trying to prevent the linker from exporting all symbols from my dll. I found a solution at this link: http://stackoverflow.com/questions/2810118/how-to-tell-the-mingw-linker-not-to-export-all-symbols.

As you can see, I need to use dllwrap with code blocks.
Is that possible?
Please help.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: How to use dllwrap with code blocks?
« Reply #1 on: February 18, 2011, 06:58:20 pm »
Yes you can call dllwrap as a post build step (but if you read carefully the comment mentioning it - it is deprecated/non supported from 2006 onwards).
But you're not reading: http://stackoverflow.com/questions/2810118/how-to-tell-the-mingw-linker-not-to-export-all-symbols/2812162#2812162
So making a DLL without exported functions is useless, why would you want to do so?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Haziq999

  • Single posting newcomer
  • *
  • Posts: 2
Re: How to use dllwrap with code blocks?
« Reply #2 on: February 18, 2011, 08:22:09 pm »
I have found that mingw exports every function from the dll, even the functions that are not protyped with  __declspec(dllexport) and without using a .def file. This means that even the functions that you want to use locally in the dll are exported. That is the problem. See this link for details:
http://stackoverflow.com/questions/5040342/my-dll-is-exporting-every-function-without-my-consent

Could you please guide me on how to use dllwrap through the post build script? Thanks.
« Last Edit: February 18, 2011, 09:29:45 pm by Haziq999 »