The FreeType Project - Bugs: bug #45676, enclose FreeType in a C++ namespace
You are not allowed to post comments on this tracker with your current authentication level.
bug #45676: enclose FreeType in a C++ namespace
Submitter: | Werner LEMBERG <wl> | ||
Submitted: | Sun 02 Aug 2015 11:12:59 AM UTC | ||
Votes: | 1 | ||
Severity: | 3 - Normal | Item Group: | Wishlist |
Status: | None | Privacy: | Public |
Assigned to: | None | Open/Closed: | Open |
Planned Release: | None |
( Jump to the original submission )
Fri 24 Nov 2017 03:01:55 PM UTC, comment #13: |
Mihai Popescu <mihai> |
Thu 23 Jun 2016 08:08:09 PM UTC, comment #12: Yes. I reached the same conclusion. I should've let you know sooner but I started investigating libpng configuration scripts that handle setting up the library prefix and somehow got lost in them (I'm not an expert in autotools).
|
Mihai Popescu <mihai> |
Mon 02 May 2016 06:43:21 AM UTC, comment #11: I thought more about this issue, and now I believe that using `FT_S(foo)' (or probably even shortened to `_(foo)' instead of `foo') is indeed a too offensive change since it would be necessary to apply it to all source code files, everywhere, making the code really, really ugly.
|
Werner LEMBERG <wl>![]() |
Wed 25 Nov 2015 08:41:31 AM UTC, comment #10: Thanks for the research!
|
Werner LEMBERG <wl>![]() |
Thu 19 Nov 2015 12:25:49 AM UTC, comment #9: Hi Werner,
*/
|
Mihai Popescu <mihai> |
Mon 02 Nov 2015 03:05:17 PM UTC, comment #8: I would consider using clang refactoring tool. I'm a bit unsure though if it knows how to properly handle macros (as I've seen that it works on preprocessed sources). I'll continue to investigate. |
Mihai Popescu <mihai> |
Wed 28 Oct 2015 09:52:48 AM UTC, comment #7: Graham, what do you think of the suggested FT_SYMBOL solution? This should be generic enough to be used it with C++ also... |
Werner LEMBERG <wl>![]() |
Tue 27 Oct 2015 04:15:34 PM UTC, comment #6: Hello,
|
Mihai Popescu <mihai> |
Mon 26 Oct 2015 02:50:36 PM UTC, comment #5: Your suggestion looks nice, and I could live with it, thanks – provided you take the time and send a patch...
|
Werner LEMBERG <wl>![]() |
Fri 23 Oct 2015 01:01:32 PM UTC, comment #4: @wl: Wrapping into the C++ namespace doesn't solves the issue if you want to compile freetype with C compilers.
|
Mihai Popescu <mihai> |
Wed 21 Oct 2015 07:15:42 PM UTC, comment #3: Well, it's not about `switching over' but simply wrapping FreeType into a separate namespace while compiling the C library with a C++ compiler. There won't be any incompatibilities with (older) C compilers.
|
Werner LEMBERG <wl>![]() |
Tue 20 Oct 2015 12:30:54 PM UTC, comment #2: To avoid switching over C++ and break compatibility with old C99 compilers, the FreeType2 library functions linker conflicts can be quarantined with #define which can be included from ft2build.h before ftheader.h.
|
Mihai Popescu <mihai> |
Tue 04 Aug 2015 12:19:06 PM UTC, comment #1: I have already successfully enclosed FreeType in a C++ namespace as part of using it for my product, CartoType; to avoid conflicts with other versions of FT when linking it statically.
|
Graham Asher <grahamasher>![]() |
Sun 02 Aug 2015 11:12:59 AM UTC, original submission:
Graham Asher suggests the following to put all FreeType functions into a separate namespace.
|
Werner LEMBERG <wl>![]() |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There is 1 vote so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follows 1 latest change.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2015-10-20 | mihai | Carbon-Copy | - | ![]() |
Added mihai |
I just wanted to add that these types of link errors have a high cost as we usually find them late in production and the workflow to fix them is cumbersome. We have patched our quarantine file a couple of times by now and we're looking forward to have a better way to handle this.
If there are any updates on this, or anyone else experiencing the same issues, do let us know.