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++ » Mac OS » Cannot compile plugin/ftp
Cannot compile plugin/ftp [message #51363] Fri, 15 March 2019 20:51 Go to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

my program uses the plugin/ftp and cannot compile it.

The compiler does not recognise GLOBALREF that appear in /plugin/ftp/lib/ftplib.h


#if !defined(__FTPLIB_H)
#define __FTPLIB_H

#if defined(__unix__) || defined(VMS)
#define GLOBALDEF
#define GLOBALREF extern
#elif defined(_WIN32)
#define GLOBALDEF
#define GLOBALREF extern
/*
#if defined BUILDING_LIBRARY
#define GLOBALDEF __declspec(dllexport)
#define GLOBALREF __declspec(dllexport)
#else
#define GLOBALREF __declspec(dllimport)
#endif
*/
#endif



Does anybody knows how to fix this include file?
Thanks,
Luigi
Re: Cannot compile plugin/ftp [message #51399 is a reply to message #51363] Thu, 21 March 2019 21:04 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
Solved! Cool

in plugin/ftp/lib/ftplib.f

line 27:

#if defined(__unix__) || defined(VMS) || defined(PLATFORM_MACOS)

instead of

#if defined(__unix__) || defined(VMS)


the same substitution in in plugin/ftp/lib/ftplib.cpp line 90

It seems (__unix__) does not cover macOS. Perhaps a more inclusive constant would be better.
Luigi
Re: Cannot compile plugin/ftp [message #51400 is a reply to message #51399] Thu, 21 March 2019 21:42 Go to previous message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello and thanks for investigation,

I found very interesting wiki page that shows what macros are available on each *nix operating system - http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_c ompiler_predefined_macros_detect_operating_system. As expected __unix__ is not defined on macOS. By default there is __APPLE__ or __MACH__ defined. I think for that special case (library code) we should use __APPLE__ macro instead of using pre-defined upp macros.

I created ticket for that - https://www.ultimatepp.org/redmine/issues/1945. I hope Mirek will accept the fix with additional ifdef. The library is no longer maintenance by their authors, so we need to patch it by our-self.

Sincerely,
Klugier


U++ - one framework to rule them all.

[Updated on: Thu, 21 March 2019 21:43]

Report message to a moderator

Previous Topic: Conditional compiling
Next Topic: Can I compile without X11? (Mojave)
Goto Forum:
  


Current Time: Thu Mar 28 14:14:43 CET 2024

Total time taken to generate the page: 0.01315 seconds