none
How to use OALPCIFindNextId() in OAL RRS feed

  • Question

  • I am porting a Windows CE x86 OAL to WEC2013. The code uses the function OALPCIFindNextId to find specific devices. The WEC2013 has an implementation of the function in the common oal_pci library (platform\common\src\common\pci).

    The WEC2013 has also a processor specific IO library oal_io_x86 that implements all the functions like PCIReadBusData() and so on.

    So that naive approach would be adding both libraries oal_pci.lib and oal_io_x86.lib to the sources file and use both sets of functions. But Microsoft managed to implement a name clash in these library. The linker casts an error

    oal_pci.lib(id.obj) : error LNK2005: _OALPCIGetId already defined in oal_io_x86.lib(pciwrap.obj)

    This is very sad as the oal_io_x86 implementation of the function OALPCIGetId() is only a stub returning always 0.

    Is there any way to use both the common and the x86 library in an OAL or to get somehow only the required function(s) from the common oal_pci? I know I can copy the source code of OALPCIFindNextId and create my own implementation of that function. But I don't think that this should be done with a Production-Quality OAL.

    Friday, September 26, 2014 9:21 AM