News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Using .def files

Started by user101, June 04, 2011, 09:53:59 PM

Previous topic - Next topic

user101

Hello. I am working on cross platform C library, which defines a group of functions, however it doesn't need to export all of them. AFAIK using .def file is a right way since __declspec (dllexport) is microsoft specific. The problem is that I cannot make C::b using this .def file in linking settings via --def=export.def or -Wl,-def=export. Is there c::b specific way of using .def files?

MortenMacFly

Quote from: user101 on June 04, 2011, 09:53:59 PM
Is there c::b specific way of using .def files?
No. If in doubt, you should first try at the command line to find the right syntax and then transfer the settings to the C::B project. Most likely you are using a wrong syntax, your working directory might be wrong or you have put the flag in the wrong place (take care to differ between linker and compiler options!).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]