Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » SysInfo - linking fail
SysInfo - linking fail [message #49073] Thu, 14 December 2017 08:55 Go to next message
forlano is currently offline  forlano
Messages: 1127
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

with latest U++ 11550 and Mingw in a program using Function4U I got the following error

C:\Users\Postazione2\Documents\upp/MyApps/Functions4U/Functi ons4U_Gui.h (40): warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
(): Linking has failed
(): C:/Users/Postazione2/Documents/upp/out/MyApps/SysInfo/MINGWx 64.Gui\SysInfo.a(SysInfo.o):SysInfo.cpp:(.rdata$.refptr.CLSI D_WbemAdministrativeLocator[.refptr.CLSID_WbemAdministrative Locator]+0x0): undefined referen
ce to `CLSID_WbemAdministrativeLocator'
(): collect2.exe: error: ld returned 1 exit status

Any idea how to fix it?

Thanks,
Luigi

[Updated on: Sun, 17 December 2017 21:52] by Moderator

Report message to a moderator

Re: SysInfo [message #49091 is a reply to message #49073] Sat, 16 December 2017 21:57 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Hello Forlano

Thank you for the report. I think it is fixed now.

Best regards
Koldo


Best regards
Iñaki
Re: SysInfo [message #49092 is a reply to message #49091] Sat, 16 December 2017 23:11 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 882
Registered: September 2012
Location: Poland, Kraków
Experienced Contributor
Hello,

Just small code review of your fix dear Koldo Smile


DWORD /*dwThreadId, */dwProcessId; // This is bad habit to keep commented code in your sources. The commented variable should be removed.

// Just keep
DWORD dwProcessId;

// The same thing here...
/* dwThreadId = */GetWindowThreadProcessId(reinterpret_cast<HWND>(hWnd[i]), &dwProcessId);

// Stay with:
GetWindowThreadProcessId(reinterpret_cast<HWND>(hWnd[i]), &dwProcessId);



// -----------------------------------------------
DWORD state = ::WaitForSingleObject(hProc, timeout);

// Why not auto? You will do not need to remember the type returning by WaitForSIngleObject...
auto state = ::WaitForSingleObject(hProc, timeout);



// -----------------------------------------------
if ((state == WAIT_TIMEOUT) || (state == WAIT_FAILED))
      	ret = ::TerminateProcess(hProc, 0); // You have space indentation instead of tabs... 



// -----------------------------------------------
//bool hdSerialMatch = false; // The same problem with commented code - not used remove it.


Sincerely,
Klugier


Ultimate++ - one framework to rule them all.

[Updated on: Sat, 16 December 2017 23:13]

Report message to a moderator

Re: SysInfo [message #49095 is a reply to message #49092] Sun, 17 December 2017 09:35 Go to previous message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Dear Klugier

Thank you for your review.

Normally in code that has been programed years ago, after finding that something is not interesting, I usually comment this out for a while instead of removing it just if I realize after that it was interesting.

I am not used with the "auto" type. I think it hides the real type "for good and for evil". I mean, you require a little more effort to put DWORD instead of auto, but when you are reviewing the code, you cannot see the hidden details at a glance with an auto. Even in this case I prefer to put DWORD instead of an int.

About spaces instead of tabs, it is probably because of my editor does not distingish spaces and tabs (and if yes, I would disabled this feature). I do prefer tabs, but I do not thing this is interesting.


Best regards
Iñaki

[Updated on: Fri, 29 December 2017 22:46]

Report message to a moderator

Previous Topic: firebird error message
Next Topic: ChromiumBrowserExample compilation error due to lack of "cef_atomicops_x86_gcc.h"
Goto Forum:
  


Current Time: Thu Oct 21 06:29:05 CEST 2021

Total time taken to generate the page: 0.01295 seconds