Author Topic: how to let "project dependencies" work?  (Read 5253 times)

Offline creatxr

  • Multiple posting newcomer
  • *
  • Posts: 28
how to let "project dependencies" work?
« on: November 19, 2011, 04:20:06 pm »
codeblcoks version 10.05

i have two projects: a and b.
b depend a,
i 've set b 's "projects' dependencies".
but it cannot work.
i 've searched forum , it seems it's a bug.
but how to let it work before fix?
thanks

Offline Folco

  • Regular
  • ***
  • Posts: 343
    • Folco's blog (68k lover)
Re: how to let "project dependencies" work?
« Reply #1 on: November 19, 2011, 04:32:37 pm »
"It doesn't work" is not a correct bug report.

What do you expect ? What did you do exactly to get it ? What goes wrong ?
Kernel Extremist - PedroM power ©

Offline creatxr

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: how to let "project dependencies" work?
« Reply #2 on: November 20, 2011, 01:53:31 am »
e.g.
i created a project socket to encapsule socket class;
i created other project named server to check it.
so i let project "server" depend on project "socket" and set server's "projects' dependencies".

compile msg:
/home/creatxr/WORK/server/main.cpp|2|error: ServerSocket.h: No such file or directory|

so, i added "socket/include" path to "server" and compiled:
msg:
/home/creatxr/WORK/server/main.cpp|8|undefined reference to `ServerSocket::ServerSocket()'|

i added "socket/src" and "socket/obj" paths to "server" and compiled.
it has the same message above.


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: how to let "project dependencies" work?
« Reply #3 on: November 20, 2011, 02:12:43 am »
1. the socket project should have type shader lib or static lib
2. you should link produced lib in the server project

http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_I_would_like_to_compile_a_project_using_some_non-standard_libraries._How_can_I_indicate_to_CodeBlocks_that_these_libraries_and_include_files_exist.3F

C::B never does some magic behind the back of the user like VStudio does, so you have to add the libs yourself.
(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!]