User forums > Using Code::Blocks

C::B linker option generation issue

<< < (2/3) > >>

oBFusCATed:
ollydbg:
So, what is the problem?
If you add "something.dll" in the settings, then "-lsomething.dll" is used for linking.
No automagic needed.

Also why do you have .dll.a files, as far as I know they are useless for GCC?

MortenMacFly:

--- Quote from: oBFusCATed on April 24, 2013, 05:33:27 pm ---Also why do you have .dll.a files, as far as I know they are useless for GCC?

--- End quote ---
Uff... Why?

AFAIK there are libs (like FreeGLUT) that build two types of libs like described. For both builds different #defines are used, i.e. for the generation of the exported functions. Therefore, you have two completely different libs - and if you link against the static lib instead of the dynamic its definitely no what you want?! ???

oBFusCATed:
Because you need libfoo.a (the static lib) and libfoo.dll (the dynamic lib).

What is the purpose of the libfoo.dll.a?

MortenMacFly:

--- Quote from: oBFusCATed on April 24, 2013, 06:03:33 pm ---Because you need libfoo.a (the static lib) and libfoo.dll (the dynamic lib).
What is the purpose of the libfoo.dll.a?

--- End quote ---
Well either some of my project setups are wrong... but... I assumed (maybe until today) that I am linking against libfoo.dll.a if I want to use (and depend on) libfoo.dll and libfoo.a if I won't.

As I said: Their sizes are different and to my knowledge linking against libfoo.dll.a works just fine...

ollydbg:

--- Quote from: MortenMacFly on April 24, 2013, 06:15:47 pm ---
--- Quote from: oBFusCATed on April 24, 2013, 06:03:33 pm ---Because you need libfoo.a (the static lib) and libfoo.dll (the dynamic lib).
What is the purpose of the libfoo.dll.a?

--- End quote ---
Well either some of my project setups are wrong... but... I assumed (maybe until today) that I am linking against libfoo.dll.a if I want to use (and depend on) libfoo.dll and libfoo.a if I won't.

As I said: Their sizes are different and to my knowledge linking against libfoo.dll.a works just fine...

--- End quote ---
I use OpenCV library, and it supplies dynamic import libraries like libcxcore210.dll.a for cxcore210.dll (mingw build)


--- Quote from: oBFusCATed on April 24, 2013, 05:33:27 pm ---ollydbg:
So, what is the problem?
If you add "something.dll" in the settings, then "-lsomething.dll" is used for linking.
No automagic needed.

--- End quote ---
It looks like there is no problem. But when user see an command line option "-lsomething.dll", they may thought that it will let the LD to directly link to a DLL file, not a dynamic import library. ;D (linking to a dynamic import library is preferred way than direct link to DLL)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version