If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

LNK2001: unresolved external symbol "int __cdecl NS_GetRealPort(class nsIURI *)" (?NS_GetRealPort@@YAHPAVnsIURI@@@Z)

NEW
Unassigned

Status

()

Core
Networking
P5
normal
2 years ago
12 days ago

People

(Reporter: devan.shah14, Unassigned)

Tracking

45 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [necko-would-take])

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
Build ID: 20160128004012

Steps to reproduce:

Using the firefox-sdk from FF 45 Beta (https://ftp.mozilla.org/pub/firefox/releases/45.0b3/win32/en-US/firefox-45.0b3.sdk.zip) I am including the #include "nsNetUtil.h" this header contains unimplemented function. Which is causing linker errors for the unimplemented elements: 

Error: 
LNK2001: unresolved external symbol "int __cdecl NS_GetRealPort(class nsIURI *)" (?NS_GetRealPort@@YAHPAVnsIURI@@@Z)



Actual results:

Error: LNK2001: unresolved external symbol "int __cdecl NS_GetRealPort(class nsIURI *)" (?NS_GetRealPort@@YAHPAVnsIURI@@@Z)



Expected results:

No linker error
(Reporter)

Updated

2 years ago
OS: Unspecified → Windows Server 2008
Hardware: Unspecified → x86
Whiteboard: [necko-would-take]
(Reporter)

Updated

2 years ago
Severity: normal → critical
(Reporter)

Comment 1

2 years ago
Is there an update on when this bug will be looked at.
Flags: needinfo?(mcmanus)
this doesn't impact a tier one platform so its on a itch scratching basis.
Flags: needinfo?(mcmanus)
(Reporter)

Updated

2 years ago
OS: Windows Server 2008 → Unspecified
Hardware: x86 → Unspecified
(Reporter)

Comment 3

2 years ago
I would assume that using the Firefox SDK failing to compile because of an linker error would be critical as this was a regression, after inline functions in nsNetUtil.h were moved to a cpp file nsNetUtil.cpp, the SDK was not usable as the implemented functions were missing from the SDK libs. https://bugzilla.mozilla.org/show_bug.cgi?id=905127
Severity: critical → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Comment 4

2 years ago
Some additional information on this issues:

unresolved external symbol "int __cdecl NS_GetRealPort(class nsIURI *)" (?NS_GetRealPort@@YAHPAVnsIURI@@@Z) is being caused by the fact that function NS_GetRealPort is being used in firefox-sdk\include\nsPromptUtils.h from the NS_GetAuthHostPort function (*aPort = NS_GetRealPort(uri);), since this function is not implemented it throws this error, same issues with function NS_GetDefaultPort. 

Sample example to reproduce this issue:

Code snippitt from the nsPromptUtils.h provided by Firefox SDK
#include "nsNetUtil.h"

inline void
NS_GetAuthHostPort(nsIChannel* aChannel, nsIAuthInformation* aAuthInfo,
                   bool aMachineProcessing, nsCString& aHost, int32_t* aPort)
{
  nsCOMPtr<nsIURI> uri;
  nsresult rv = aChannel->GetURI(getter_AddRefs(uri));

  uri->GetAsciiHost(aHost);
  *aPort = NS_GetRealPort(uri);
}

I was able to implement the NS_GetRealPort and NS_GetDefaultPort in the nsPromptUtils.h header file to get rid of the linker error. However issues should be fixed with change in compile time so that function implementations are available.
(Reporter)

Updated

2 years ago
OS: Unspecified → All
Hardware: Unspecified → All
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.