Comments (5)
Nope.. it should detect the dependency without Requires
..
from scons-examples.
@ThakeeNathees - what if you don't name the lib lib
but say abc
?
from scons-examples.
Here's the output I get when I name the shared library lib
..
$ python ~/devel/scons/git/as_scons/scripts/scons.py
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o app.o -c app.c
gcc -o lib.os -c -fPIC lib.c
gcc -o lib.so -shared lib.os $( -L. $)
gcc -o app app.o -L.
app.o: In function `main':
app.c:(.text+0xf): undefined reference to `add'
collect2: error: ld returned 1 exit status
scons: *** [app] Error 1
scons: building terminated because of errors.
That's because SCons does some magic in removing the SHLIBPREFIX from the list libs before recreating and ends up removing it all together.
Here's the output if I name the library abc
$ python ~/devel/scons/git/as_scons/scripts/scons.py
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o libabc.so -shared lib.os $( -L. $)
gcc -o app app.o -L. -labc
scons: done building targets.
And if I name xyz
$ python ~/devel/scons/git/as_scons/scripts/scons.py
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o libxyz.so -shared lib.os $( -L. $)
gcc -o app app.o -L. -lxyz
scons: done building targets.
So there's nothing wrong with the example..
Just don't name your lib lib
..
For further discussion come to the users mailing list, IRC channel, or preferably the discord server
from scons-examples.
@ThakeeNathees - can you file an issue for this on https://github.com/SCons/scons/issues. You can note that @bdbaddog said to file it.
The issue is libname = 'lib'...
from scons-examples.
or more verbosely, if the lib name is the same as $SHLIBPREFIX
then the name will be sliced down to an empty string. Which, umm, breaks stuff...
from scons-examples.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scons-examples.