Author Topic: How to link to dynamic library.  (Read 3653 times)

Offline EntityReborn

  • Single posting newcomer
  • *
  • Posts: 7
How to link to dynamic library.
« on: March 22, 2009, 10:06:18 pm »
While I know this forum is dedicated to C::B, and this topic may fall out of scope in that regard, I think it doesn't because I can't figure out how to get C::B to do what I want.
I have my app, and a dynamic library. How do I get my App to reference to the Library, without the Library being static.

On another note, I have code I would like someone to look at in depth. It's causing me a headache with segfaults, and if anyone has the time, we'll connect elsewhere, just gimme a heads up.

Please note, I'm new to C++ (not to general coding tho), so be patient :)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: How to link to dynamic library.
« Reply #1 on: March 23, 2009, 02:41:22 am »
While I know this forum is dedicated to C::B, and this topic may fall out of scope in that regard, I think it doesn't because I can't figure out how to get C::B to do what I want.
I have my app, and a dynamic library. How do I get my App to reference to the Library, without the Library being static.
which version? Which OS? I can only explain some stuff on Windows.
This is the sample project which as a target of an exe  and a DLL as shared library.
http://forums.codeblocks.org/index.php?action=dlattach;topic=4896.0;attach=1707
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline EntityReborn

  • Single posting newcomer
  • *
  • Posts: 7
Re: How to link to dynamic library.
« Reply #2 on: March 23, 2009, 06:32:30 am »
Sorry, I solved it! Thanks!