User forums > Using Code::Blocks
Include a static lib into another ?
Kalith:
I'm using the latest nightly build.
About the option I set, it doesn't matter : whatever I type doesn't appear on the command line. I don't really get it.
But what really matters to me is that I can't link a static library with another.
I can link a static lib to a dynamic lib or to an executable, but not to another static library. Is this the way it is supposed to work ?
stahta01:
[quote author=Kalith link=topic=11522.msg78754#msg78754 date=1259185988
But what really matters to me is that I can't link a static library with another.
I can link a static lib to a dynamic lib or to an executable, but not to another static library. Is this the way it is supposed to work ?
[/quote]
I have no idea; never tried to embed one static library inside another using MinGW GCC.
If you do not know if it is possible or the command line that does do it, I see no reason to think it is a Code::Blocks issue. Without a way to duplicate the problem with Code::Blocks forgetting options it is not worth my time to even try to see if the problem exist. I tried it with the Nov 11 Nightly build from file CB_20091111_rev5911_win32.7z
Tim S.
stahta01:
--- Quote from: Kalith on November 25, 2009, 10:53:08 pm ---I'm using the latest nightly build.
--- End quote ---
This is NOT an answer!!!
An SVN or Date is needed for it to be an answer that I can trust!
I wasted too much time in the past where the user missed an nightly build. I want real data.
Tim S.
It saves options for me. Using SVN 5911 Date: Nov 11 2009
--- Code: ---mingw32-gcc.exe -Wall -testtim4 -g -c C:\TimS\testc\main.c -o obj\Debug\main.o
mingw32-gcc.exe: unrecognized option '-testtim4'
mingw32-g++.exe -o bin\Debug\testc.exe obj\Debug\main.o -testtim5
mingw32-g++.exe: unrecognized option '-testtim5'
--- End code ---
Kalith:
Wow, I appreciate your help and understand your point, but there's no need to be so rude :)
I do have the latest nightly (rev 5911), and from the example you give, it seems I've been very unclear about my problem...
Here is a simplified view of my situation :
[*]Main Project : compiles "test.exe", requires "mylib.a"
[*]MyLib Project : compiles "mylib.a", requires "otherlib.a"[/list]
If I want to build "Main Project", I need to include both "mylib.a" (which is perfectly normal) and "otherlib.a", which is not a direct dependency.
I'd like to avoid this problem by including "other.a" directly into "mylib.a", and I simply don't know how... because if I add "otherlib.a" to the "Link library" of "MyLib Project", Code::Blocks ignores it.
I know I'm not trying to do something crazy, because it can be done in Visual C++.
Maybe this can't be done with the GNU compiler/linker ?
Thanks again for your help anyway !
Edit : and whoops, I overlooked your first post.
I wasn't saying this is a Code::Block issue, I'm just asking if it can be done or not ;)
oBFusCATed:
.a files are just an archive with bunch of objects files (.o), there is no dependency info in them, unfortunately.
This one can be fixed if CB is modified to add -l/-L options to the final executable's/sharedlib's link commands.
But there might be problems with the order of the libs :(
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version