User forums > Using Code::Blocks

Can't link object file from another project

<< < (4/4)

Aleksandr:

--- Quote from: oBFusCATed on June 18, 2014, 08:45:57 pm ---But no it is not implemented.

--- End quote ---

But I've added the library (.a) through dialog "Add files..." and when linking got the same error. Something tells me that the fix will affect on it too.


--- Quote from: oBFusCATed on June 18, 2014, 08:45:57 pm ---You can add the object file manually in the other linker options, but I don't see how this is a problem or how this is confusing.
No one is forcing you to put anything there, but if you need to pass something special to the linker you can do it.

--- End quote ---

I also added the object files (.o), along with the libraries (.a) in the List of libraries in the Linker settings tab, and all is well be linked. Without the use of Other linker options.

More and more I begin to think that I'm the one who does some things are not as expected. ;-)

MortenMacFly:
The library case was not implementeby me on purpose.instead a warning message will occur if you try. Libraries have to be added through the linker options as the order matters here which cannot be correctly computed otherwise. Adding libraries via"add file"simply makes no sense.

scarphin:

--- Quote from: eMan.Lived on June 18, 2014, 06:28:56 pm ---
--- Quote from: scarphin on June 17, 2014, 10:44:19 pm ---Why don't you just add the corresponding source files from the library sources to your project? Then you will have only the needed part of your library in your project.
--- End quote ---

As I wrote before, it does not need to compile. Why do the same job twice?
Well, your proposal is just another way. You can come up with some exotic such as symlinks or something more sophisticated. But ask a question. Why when linking, you think some objects as a given, and others as wrong? Are they bad or guilty? ;-)

--- End quote ---
Why compiling a SINGLE source file twice bothers you so much considering it won't even be compiled again when there is no change to it?

Aleksandr:

--- Quote from: MortenMacFly on June 18, 2014, 10:16:54 pm ---The library case was not implementeby me on purpose.instead a warning message will occur if you try. Libraries have to be added through the linker options as the order matters here which cannot be correctly computed otherwise. Adding libraries via"add file"simply makes no sense.

--- End quote ---

Ok.


--- Quote from: scarphin on June 18, 2014, 10:24:03 pm ---Why compiling a SINGLE source file twice bothers you so much considering it won't even be compiled again when there is no change to it?

--- End quote ---

I do not know whether the translator will pick the correct idiom. It's something like cockroaches in my head. Pointless to fight them. Forget it, it's offtopic. :-)

Navigation

[0] Message Index

[*] Previous page

Go to full version