Author Topic: Using .def files  (Read 3333 times)

user101

  • Guest
Using .def files
« on: June 04, 2011, 09:53:59 pm »
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?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Using .def files
« Reply #1 on: June 05, 2011, 10:39:24 am »
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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ