News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

The 07 January 2012 build (7678) is out.

Started by killerbot, January 07, 2012, 07:21:39 PM

Previous topic - Next topic

Suryavarman

#75
Quote
Force target re-link if any static library it depends on gets updated (i.e. no need to manually add an external dependency for static libraries anymore)
when checking for changed static library dependencies, look in compiler's linker search paths too
when checking for changed static library dependencies, include libraries referenced directly (w/out the use of linker's search path)

How stop this new comportement :

  • I modified cpp files from base dynamic lib.
  • Build all project
  • Codeblocks -> Re-link all solution's projects ( It's useless... it's a dynamic lib not a static lib ) before this Nightly build Codeblocks just  check all targets when i rebuild all

I have 30 projects in my solution. I use frequently rebuild all and now i lose more time.

Thanks a lot for your work.





oBFusCATed

Can you provide an example/test workspace?

What about your platform/gcc versions?
(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!]

Suryavarman

#77
This solution and my solution it's the same hierachy and compilation options. ( see the Attach 7zfile )

I use Mingw ( TDM ).

Example :
I rebuild-All :
my targets are all build.

I modified :
In Lib_Test1 -> Math.cpp
return !aResult ; -> return aResult ;

I build-all in Codeblocks :

-------------- Build: Debug in Lib_Test1 ---------------

[ 50,0%] Compiling: ..\..\..\Test\Math.cpp
[100,0%] Linking dynamic library: ..\..\..\..\Bin\Mingw\Lib_Test1_d_CB.dll
Creating library file: ..\..\..\..\Bin\Mingw\libLib_Test1_d_CB.a
Output size is 83,50 KB

-------------- Build: Release in Lib_Test1 ---------------

[ 50,0%] Compiling: ..\..\..\Test\Math.cpp
[100,0%] Linking dynamic library: ..\..\..\..\Bin\Mingw\Lib_Test1_CB.dll
Creating library file: ..\..\..\..\Bin\Mingw\libLib_Test1_CB.a
Output size is 80,50 KB

-------------- Build: Debug in Lib_Test2 ---------------

[100,0%] Linking dynamic library: ..\..\..\..\Bin\Mingw\Lib_Test2_d_CB.dll
Creating library file: ..\..\..\..\Bin\Mingw\libLib_Test2_d_CB.a
Output size is 49,90 KB

-------------- Build: Release in Lib_Test2 ---------------

[100,0%] Linking dynamic library: ..\..\..\..\Bin\Mingw\Lib_Test2_CB.dll
Creating library file: ..\..\..\..\Bin\Mingw\libLib_Test2_CB.a
Output size is 9,50 KB

-------------- Build: Debug in App_Test1 ---------------

[100,0%] Linking console executable: ..\..\..\..\Bin\Mingw\App_Test1_d_CB.exe
Output size is 976,25 KB

-------------- Build: Release in App_Test1 ---------------

[100,0%] Linking console executable: ..\..\..\..\Bin\Mingw\App_Test1_CB.exe
Output size is 461,00 KB

-------------- Build: Debug in App_Test2 ---------------

[100,0%] Linking console executable: ..\..\..\..\Bin\Mingw\App_Test2_d_CB.exe
Output size is 976,84 KB

-------------- Build: Release in App_Test2 ---------------

[100,0%] Linking console executable: ..\..\..\..\Bin\Mingw\App_Test2_CB.exe
Output size is 461,50 KB
Process terminated with status 0 (0 minutes, 1 seconds)
0 errors, 0 warnings (0 minutes, 1 seconds)


Codeblocks re-link all targets.

oBFusCATed

Creating library file: ..\..\..\..\Bin\Mingw\libLib_Test2_CB.a
This is the reason.
You are linking to a static lib.
Have you tried to link directly to the dlls?
Newer TDM/Ming gcc's support this.
(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!]

Suryavarman

#79
You have resolved my problem.

Thanks a lot.

I rename in the linker settings my libraries :
Lib_Test1_d_CB -> Lib_Test1_d_CB.dll
Lib_Test1_CB -> Lib_Test1_CB.dll
etc.



-------------- Build: Debug in Lib_Test1 ---------------

[ 50,0%] Compiling: ..\..\..\Test\Math.cpp
[100,0%] Linking dynamic library: ..\..\..\..\Bin\Mingw\Lib_Test1_d_CB.dll
Creating library file: ..\..\..\..\Bin\Mingw\libLib_Test1_d_CB.a
Output size is 83,50 KB

-------------- Build: Release in Lib_Test1 ---------------

[ 50,0%] Compiling: ..\..\..\Test\Math.cpp
[100,0%] Linking dynamic library: ..\..\..\..\Bin\Mingw\Lib_Test1_CB.dll
Creating library file: ..\..\..\..\Bin\Mingw\libLib_Test1_CB.a
Output size is 80,50 KB

-------------- Build: Debug in Lib_Test2 ---------------

Target is up to date.

-------------- Build: Release in Lib_Test2 ---------------

Target is up to date.

-------------- Build: Debug in App_Test1 ---------------

Target is up to date.

-------------- Build: Release in App_Test1 ---------------

Target is up to date.

-------------- Build: Debug in App_Test2 ---------------

Target is up to date.

-------------- Build: Release in App_Test2 ---------------

MortenMacFly

Quote from: oBFusCATed on March 07, 2012, 12:32:44 PM
You are linking to a static lib.
What makes you say so? This could also be an import library for the DLL - depending on the settings use to create.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

oBFusCATed

Morten: For me .a or .lib file is a static library. The current auto-relink mechanism in C::B thinks the same.

Gandi: I guess you can revert to the old lib names and uncheck the "Create import library" option in the Project->Properties
(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!]

Suryavarman

oBFusCATed : It's OK and i prefer this last solution.

ollydbg

Quote from: oBFusCATed on March 07, 2012, 12:44:16 PM
Morten: For me .a or .lib file is a static library.
For me, both import library and static library can have .a or .lib. :)
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.