Click here to Skip to main content
15,904,822 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I use vs2008,develop a no-mfc regular win32- Dll(named DisplayTT.Dll) , which used QT library ;
I also have a console32 program to use that DLL, they all use windows standard library and Use Multi-Byte Character Set.

compile and link are both OK.But when I Run it with F5 in vs2008, It will alter "Can't locate the program entry will ..... in QtCored4.DLL".

Is strange and I can't find a way to solve the problem!

what's more,Alt+2 in the output window of vs IDE, The QtCored4.DLL has been loaded. but just after my win32 DLl.(named DisplayTT.Dll)

I have googled ,but haven't find a way!

Help! please!

BTW,How Can I put the jpg picture here?
Posted
Comments
Sergey Alexandrovich Kryukov 13-May-13 13:10pm    
Why? why?!
—SA

Right approach is just the opposite: any technique based on any assumptions on the order of loading of DLLs should be considered as incorrect and never be used. It would abuse and sabotage the process of software development, as well as the quality and reliability of final results.

Chances are, that you really care only about the order of execution of the DLL entry points. In this case, the valid work-around is this: remove the code sensitive to the order of execution (which is a very questionable property itself) to some explicitly exported DLL function and explain in the documentation the correct order of calling such functions. They all could be names Initialize or something like that. This would be still ugly, but legitimate.

—SA
 
Share this answer
 
Did you try the /DELAYLOAD[^] linker option in Visual studio?

you can put your DisplayTT in this list.

Check here[^] for more info on delayed loading.

I hope this helps
 
Share this answer
 
Comments
H.Brydon 13-May-13 21:53pm    
This will delay loading of 1 particular dll but won't fix the loading order for 'all' of the dlls. +5 for accuracy though...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900