Problem with bjam and external library

Hallo, for Win32GUI Lib I need to link shlwapi.lib. Since the library is built with bjam I tried to follow the advice given at http://lists.boost.org/boost/2004/05/6103.php and searched a bit in the internet. unfortunately it doesn't work - when building Win32GUI I still get Linker errors (SHCreateStreamOnFile() can't be resolved) here is the relevant code of the jamfile: ... lib win32gui : ../../src/$(SOURCES).cpp : [ common-names ] <include>../../.. <define>WIN32GUI_NO_LIB <define>WIN32GUI_BUILDING_LIB <threading>multi <library-path>"C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib" : debug release <debug><find-library>shlwapi<runtime-link>static <release><find-library>shlwapi<runtime-link>static ; I added the <library-path> and <find-library> instructions. what am I doing wrong? mfg Steven

Steven Weiß <steven11@gmx.de> writes:
Hallo, for Win32GUI Lib I need to link shlwapi.lib. Since the library is built with bjam I tried to follow the advice given at http://lists.boost.org/boost/2004/05/6103.php and searched a bit in the internet. unfortunately it doesn't work - when building Win32GUI I still get Linker errors (SHCreateStreamOnFile() can't be resolved)
Only one symbol can't be resolved? That's a likely indicator of a mismatch between the library headers and the library file itself.
here is the relevant code of the jamfile:
... lib win32gui : ../../src/$(SOURCES).cpp : [ common-names ]
<include>../../.. <define>WIN32GUI_NO_LIB <define>WIN32GUI_BUILDING_LIB <threading>multi <library-path>"C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib"
: debug release <debug><find-library>shlwapi<runtime-link>static <release><find-library>shlwapi<runtime-link>static
Those last two lines should be in the previous section. They describe requirements, not which variants should be built by default. I assume the library file is called shlwapi.lib and located in C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib ?? -- Dave Abrahams Boost Consulting www.boost-consulting.com

Hi Dave, thanks for your reply. David Abrahams wrote:
Steven Weiß <steven11@gmx.de> writes:
Hallo, for Win32GUI Lib I need to link shlwapi.lib. Since the library is built with bjam I tried to follow the advice given at http://lists.boost.org/boost/2004/05/6103.php and searched a bit in the internet. unfortunately it doesn't work - when building Win32GUI I still get Linker errors (SHCreateStreamOnFile() can't be resolved)
Only one symbol can't be resolved? That's a likely indicator of a mismatch between the library headers and the library file itself.
The header is correct - I'm only using this function of the lib. And when I'm compiling in VC it links correctly.
here is the relevant code of the jamfile:
... lib win32gui : ../../src/$(SOURCES).cpp : [ common-names ]
<include>../../.. <define>WIN32GUI_NO_LIB <define>WIN32GUI_BUILDING_LIB <threading>multi <library-path>"C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib"
: debug release <debug><find-library>shlwapi<runtime-link>static <release><find-library>shlwapi<runtime-link>static
Those last two lines should be in the previous section. They describe requirements, not which variants should be built by default.
I assume the library file is called
shlwapi.lib
and located in
C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib
??
That's right, shlwapi.lib is in the directory. I tried <find-library> to be in the previous section before but it didn't work either...do you have some ideas? btw how can I change my name in the mailinglist? I forgot to write "ss" instead of the German umlaut-s... mfg Steven

Steven Weiß <steven11@gmx.de> writes:
That's right, shlwapi.lib is in the directory. I tried <find-library> to be in the previous section before but it didn't work either...do you have some ideas?
Please try running your build with bjam -n -a ...whatever... and inspect the command-lines generated. What arguments do you see there regarding shlwapi and PlatformSDK? Do they look wrong?
btw how can I change my name in the mailinglist? I forgot to write "ss" instead of the German umlaut-s...
I don't know. -- Dave Abrahams Boost Consulting www.boost-consulting.com

David Abrahams wrote:
Steven Weiß <steven11@gmx.de> writes:
That's right, shlwapi.lib is in the directory. I tried <find-library> to be in the previous section before but it didn't work either...do you have some ideas?
Please try running your build with
bjam -n -a ...whatever...
and inspect the command-lines generated. What arguments do you see there regarding shlwapi and PlatformSDK? Do they look wrong?
with the -a parameter alone it works! thank you
btw how can I change my name in the mailinglist? I forgot to write "ss" instead of the German umlaut-s...
I don't know.
i figured it out...there's a link at the bottom of each mail in this mailing list where you can apply changes to your profile

Steven Weiß wrote:
David Abrahams wrote:
Steven Weiß <steven11@gmx.de> writes:
Please try running your build with
bjam -n -a ...whatever...
and inspect the command-lines generated. What arguments do you see there regarding shlwapi and PlatformSDK? Do they look wrong?
with the -a parameter alone it works! thank you
But -a really means "build any target" ("rebuild"), doesn't it? Now it should work even without -a. Andrey

Andrey Melnikov wrote:
Steven Weiß wrote:
David Abrahams wrote:
Steven Weiß <steven11@gmx.de> writes:
Please try running your build with
bjam -n -a ...whatever...
and inspect the command-lines generated. What arguments do you see there regarding shlwapi and PlatformSDK? Do they look wrong?
with the -a parameter alone it works! thank you
But -a really means "build any target" ("rebuild"), doesn't it? Now it should work even without -a.
Andrey
yes, now it works without -a mfg Steven

Steven Weiß <steven11@gmx.de> writes:
David Abrahams wrote:
Steven Weiß <steven11@gmx.de> writes:
That's right, shlwapi.lib is in the directory. I tried <find-library> to be in the previous section before but it didn't work either...do you have some ideas?
Please try running your build with
bjam -n -a ...whatever...
and inspect the command-lines generated. What arguments do you see there regarding shlwapi and PlatformSDK? Do they look wrong?
with the -a parameter alone it works! thank you
That's great! But it leaves us with a mystery. The -a option alone just forces everything to be rebuilt without looking at modification times. -- Dave Abrahams Boost Consulting www.boost-consulting.com

David Abrahams wrote:
Steven Weiß <steven11@gmx.de> writes:
David Abrahams wrote:
Steven Weiß <steven11@gmx.de> writes:
That's right, shlwapi.lib is in the directory. I tried <find-library> to be in the previous section before but it didn't work either...do you have some ideas?
Please try running your build with
bjam -n -a ...whatever...
and inspect the command-lines generated. What arguments do you see there regarding shlwapi and PlatformSDK? Do they look wrong?
with the -a parameter alone it works! thank you
That's great! But it leaves us with a mystery. The -a option alone just forces everything to be rebuilt without looking at modification times.
Yes, I'm wondering, too. Perhaps it worked because I set the -n parameter before. When I did that it seemed that it didn't build the library...but as I remember know I invoked bjam directly on the command line and not John Torjo's build-script which renames and copies the lib-files to the folder where I looked. Maybe that's the reason (I was very busy because I did three things simultaneously...) mfg Steven
participants (3)
-
Andrey Melnikov
-
David Abrahams
-
Steven Weiß