createStorageApiInfo has the incorrect linkage

Description

The function createStorageApiInfo() is declared inside jfile.hpp with jlib_decl, but is defined within rmtfile.cpp.  The definition needs to be moved inside jlib.  Otherwise, a component that links to jlib, but not to remote.dll will compile but fail to link on windows, and give a runtime error on linux.

It also currently generates a window warning:
 
 

C:\dev\hpcc\fs\dafsclient\rmtfile.cpp(2599,1): warning C4273: 'createStorageApiInfo': inconsistent dll linkage [C:\Users\gavin\dev\hpcc\build\fs\dafsclient\dafsclient.vcxproj] [build] C:\dev\hpcc\system\jlib\jfile.hpp(478,36): message : see previous definition of 'createStorageApiInfo' [C:\Users\gavin\dev\hpcc\build\fs\dafsclient\dafsclient.vcxproj]

 

Conclusion

None

Activity

Show:

Gavin Halliday November 17, 2022 at 11:47 AM

should be fixed - it could cause very strange behaviour on windows.

Fixed
Pinned fields
Click on the next to a field label to start pinning.
Created November 17, 2022 at 11:45 AM
Updated November 21, 2022 at 11:09 AM
Resolved November 21, 2022 at 11:08 AM

Flag notifications