The proper way to link separate projects?

I coded a platform independant layer for my library which all my other libraries will use. Everything was going fine and I compiled its implementation into a shared library (dll + .a files). Then came the issue of the library that used the forementioned layer (library). It was just an abstract interface library with no implementation so it was more or less a shell, but it formed a high level layer itself. Basically my project is just a component wise collection of folders with source code in them. For each project I have a header that groups all the headers in that project and I have a header that calls on any dependancies the project has.

But I'm not sure this scheme will work because even when I link the needed libraries Codeblocks won't compile the code. I hope I'm not being vague but since this is a private project I'm working on I cannot offer any "Detailed" source code expression. So I will be extremely greatful if some of you experienced guys give me a knowledge dump of how you link your projects (dependancies and users).

My library is complete at a high-level design wise, but I'm having problems connecting them in my preferred IDE.

For example this is what is going on in my library, or at least what I attempted to do in Codeblocks. For each project I instructed the IDE to include
the appropriate library and set the appropriate search directories:

  //each project is a folder with source code
   project A -dependancy (independant of any others but others depend upon it
      -products: {.dll, .a file, .export file}
      project B-uses A (has dependance upon A)
        -products: same as a
      project C-uses A (...)
        -products: same as a
           project D-uses B AND C
             -product(s): USER's main.cpp (driver implementation) 

Basically I am using a shared library instead of a bare DLL library because I would like to just supply the dll and link to the .a (object file) since I don't want to write a routine to load the dll.
In short I reached the stage of "project D" where its time to actually compile and link the object code into an executable but it fails, I suspect its a bug with the compiler/lexer/and or ide since the Compiler gets snagged infinitely when I do compile. I get a strange error: stray '\374 or stray '\375. I suspected those numbers to be line numbers but I didn't even have that number of lines in the part of the project of the project I was working in.
Last edited on
If D uses B and C and they compile to shared libs then just link to those libs in code::blocks linker settings, maybe this will help you will probably also need to copy the dlls into the executables directory.

I get a strange error: stray '\374 or stray '\375. I suspected those numbers to be line numbers
I'm guessing unicode character codes, but not sure.
Topic archived. No new replies allowed.