15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Program can't start after static linking with MFC

Alexander Stigsen -- axxion@ibm.net
Friday, March 07, 1997


Environment: VC++ 4.0, Win 95

I have encountered a strange problem. After having changed my program from
using mfc40.dll to statically linking to the library, my program won't start.

I tried debugging through the code to the line where it fails, and I found
it at line 140 in Barstat.cpp where it fails and outputs:
	"Warning: failed to load indicator string"

The strange thing about this is that it only happens if i link statically,
if I change the Project Settings back to using the dll (without touching
any other settings) the program runs just fine.

Should I change any other settings when linking statically?

Thanks,
	Alexander




Paul Gerhart -- pgerhart@voicenet.com
Sunday, March 09, 1997

Alexander Stigsen wrote:
> 
> Environment: VC++ 4.0, Win 95
> 
> I have encountered a strange problem. After having changed my program from
> using mfc40.dll to statically linking to the library, my program won't start.
> 
> I tried debugging through the code to the line where it fails, and I found
> it at line 140 in Barstat.cpp where it fails and outputs:
>         "Warning: failed to load indicator string"
> 
> The strange thing about this is that it only happens if i link statically,
> if I change the Project Settings back to using the dll (without touching
> any other settings) the program runs just fine.
> 
> Should I change any other settings when linking statically?
> 
> Thanks,
>         Alexander

I can't offer much insight, but I have seen this warning
        "Warning: failed to load indicator string"
when in Debug mode and the cursor is over a tool bar button for which I
have not supplied a Tool Tip or a Status Bar string.

Hope this helps.


-- 
#########################
# Paul Gerhart          #
# pgerhart@voicenet.com #
#########################



Alexander Stigsen -- axxion@ibm.net
Monday, March 17, 1997

At 10:06 3/9/97 -0500, you wrote:
>> Environment: VC++ 4.0, Win 95
>> I tried debugging through the code to the line where it fails, and I
>> found it at line 140 in Barstat.cpp where it fails and outputs:
>>         "Warning: failed to load indicator string"
>> 
>> The strange thing about this is that it only happens if i link
>> statically, if I change the Project Settings back to using the dll
>> (without touching any other settings) the program runs just fine.
>> 
>> Should I change any other settings when linking statically?

>I can't offer much insight, but I have seen this warning
>        "Warning: failed to load indicator string"
>when in Debug mode and the cursor is over a tool bar button for which I
>have not supplied a Tool Tip or a Status Bar string.

It is definetly a LoadString() related problem, the program can't load
the default indicator strings for the status bar (CAP, NUM, SCRL).
The only question is why it can't find these resources. Should they be
included seperatly when linking statically?

Thanks..
	Alexander






Become an MFC-L member | Вернуться в корень Архива |