pocoproject / poco

The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
https://pocoproject.org
Other
8.43k stars 2.17k forks source link

Poco::Util::Application VxWorks main is incorrect #3763

Closed spencerjcoward closed 2 years ago

spencerjcoward commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

The POCO_APP_MAIN macro in the Application class resolves to the incorrect version for VxWorks RTPs. The program fails to link, due to the macro using int pocoAppMain(const char* appName, ...) \ version, this is supposed to be used in a kernel context.

To Reproduce Steps to reproduce the behavior. If feasible, please provide a SSCCE - usually, it will make the process much easier and faster.

In order to reproduce, try to compile a simple Poco::Util::Application as an RTP for VxWorks

Expected behavior A clear and concise description of what you expected to happen.

The program compiles and links correctly.

Logs If applicable, add logs to help explain your problem.

N/A

Screenshots If applicable, add screenshots to help explain your problem.

N/A

Please add relevant environment information:

OS: VxWorks 7 Workbench SR660 POCO: Latest

Additional context Add any other context about the problem here.

spencerjcoward commented 2 years ago

https://github.com/pocoproject/poco/blob/be19dc4a2f30eb97cc9bdd7551460db11cc27353/Util/include/Poco/Util/Application.h#L523

spencerjcoward commented 2 years ago

currently to get this to work something like

elif defined(POCO_VXWORKS) && !defined(POCO_VXWORKS_RTP)

could solve this issue

aleks-f commented 2 years ago

if you need this fixed, please fix and send a pull, we don't have the development or CI environment readily available

spencerjcoward commented 2 years ago

if you need this fixed, please fix and send a pull, we don't have the development or CI environment readily available

PR was made.