The funny thing is when I add /VERBOSE:LIB to find out what libraries the
linker searchs I don't see my "b.lib".
Igor.
"Igor Kravtchenko" <igor@obraz.net> a écrit dans le message de news:
%23SDuUOlIFHA.2752@TK2MSFTNGP12.phx.gbl...[color=blue]
> Hi,
>
> yes I've created a very simple 2x project to have a school's case.
>
> Linking the .lib explicitly works.
> Don't link explicitly but set a project dependencies fails although the
> project build order is correct.
>
> Crazy...
>
> Igor.
>
>
>
>
> "Todd Aspeotis" <ToddAspeotis@discussions.microsoft.com> a écrit dans le
> message de news:
BBCDA8EF-015A-4147-8EEE-579A2139C9AF@microsoft.com...[color=green]
>> I've never used __declspect(dll_import). And setting it through project
>> dependencies works for me. What I do is have a header file for my DLL
>> project
>> and just include that. During compilation, the linker just looks through
>> my
>> LIB file, finds the reference to the function I called, and it's all
>> good.
>>
>> Have you tried creating a simple 2x project solution and testing it using
>> only project dependencies and your dll_export/import method?
>>
>> Best of Luck,
>> -- Todd Aspeotis
>>
>> "Igor Kravtchenko" wrote:
>>[color=darkred]
>>> Hi,
>>>
>>> I'm having a pretty idiot problem under VC++ .NET but cannot solve it.
>>> I have an .exe A and a dll B.
>>>
>>> A uses some methods of B (so A depends of B).
>>>
>>> B exports its methods using __declspec(dllexport) and A imports them
>>> using
>>> __declspec(dllimport).
>>>
>>> If I manually link A with B, everything works.
>>> If I set a dependency using "Project Dependencies" as I was used under
>>> Visual C++ 6.0 I have a bunch
>>> of link errors.
>>>
>>> It seems the "Projet Dependencies" of Visual .NET just sets the order of
>>> build but doesn't explicitly
>>> *links* project to others.
>>>
>>> Any remark is welcome,
>>>
>>> Igor.
>>>
>>>
>>>[/color][/color]
>
>[/color]