Author Topic: xfbuild (DMD) and import-paths in CB  (Read 3995 times)

Offline nrgyzer

  • Single posting newcomer
  • *
  • Posts: 2
xfbuild (DMD) and import-paths in CB
« on: January 09, 2011, 02:51:34 pm »
Hey guys,

I installed CodeBlocks on linux and it works great with the default Digital Mars D Compiler settings. But... it seems that CodeBlocks always ignore my import paths. I changed the default dmd compiler executable to xfbuild (which includes and compiles all which have anything to do with the project), thus that imported projects/files or modules are automatically compiled.

When I add a directory like /home/user/Desktop/MyProjectToImport to the folder paths (in Settings > Compiler and debugger > Search directories > Compiler), CodeBlocks does not apply the path to the compiler. I always get a "undefined reference to"-error which means that the compiler can't find symbols which are defined in other (imported) projects. Does anyone know what I'm doing wrong?


Thanks in advance!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: xfbuild (DMD) and import-paths in CB
« Reply #1 on: January 09, 2011, 03:38:55 pm »
Read this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F'

p.s. you've posted to the wrong subforum, this one is for development of C::B, not for using C::B to develop your app...
(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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: xfbuild (DMD) and import-paths in CB
« Reply #2 on: January 09, 2011, 03:40:15 pm »
It's not enough to set the "import paths" to the other projects (libraries) to use, but you also need to link against the libraries that actually provide the symbols.

BTW: I am not sure what you mean by "import paths" btw. - I only know "include paths" fr the compiler / linker.
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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: xfbuild (DMD) and import-paths in CB
« Reply #3 on: January 09, 2011, 04:05:40 pm »
In D import is something like include in C/CPP
(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 nrgyzer

  • Single posting newcomer
  • *
  • Posts: 2
Re: xfbuild (DMD) and import-paths in CB
« Reply #4 on: January 15, 2011, 05:13:16 pm »