Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: ret04 on January 05, 2007, 11:51:51 am

Title: DLL Project exports everything?
Post by: ret04 on January 05, 2007, 11:51:51 am
Project: dynamic link library
Compiler: MingW/GCC
C::B built: Nightly Build (yesterday)

I changed the built options to Release and built the dll. It seems like every function and all global variables where exported automatically. When I take a look onto the generated def file in my project folder, i'm right.

I have 2 questions:

1. How can I clear the whole export thing? (means the resulting dll has no exports)
2. How can I use my own def file?

At the moment "--def foo.def" unter other link options seems not to work properly.
Title: Re: DLL Project exports everything?
Post by: mandrav on January 05, 2007, 12:56:38 pm
1. try adding --Wl,no-export-all-symbols in other linker options
2. You can't because this would require C::B to use dlltool.exe (which it isn't). Unless you want to try and fiddle with the DLL linking command (in advanced compiler options) to adjust it for dlltool...
Title: Re: DLL Project exports everything?
Post by: ret04 on January 05, 2007, 07:36:24 pm
1. try adding --Wl,no-export-all-symbols in other linker options

Nothing changed.

I think I found a bug. When I change the Compiler from GCC to Borland Compiler 5.5, and tried to compile the project, the following error is reported:

Error E2075: Incorrect command line option: -Wall

This option is only valid for GCC, not Borland. I checked my settings and it is no where set.
Is there a way to change or view the commandline manually?
Title: Re: DLL Project exports everything?
Post by: mandrav on January 05, 2007, 10:38:52 pm
Quote
I checked my settings and it is no where set.

Check again. It's there...