- SDL removed from neoGFX - 10 Updates
- Linker error I've never seen before - 7 Updates
- Class declaration - 2 Updates
jacobnavia <jacob@jacob.remcomp.fr>: Apr 09 10:44AM +0200 Le 08/04/2020 à 22:51, Mr Flibble a écrit : > SDL is no longer a neoGFX dependency! > That is all. > /Flibble Great, but your message doesn't convey any information. How did you eliminate that dependency? Did you rewrite the code that was using the SDL, i.e. you rewrote the parts of the SDL that you were using or adapted the source code of the SDL to your application? Or did you eliminate features that used that library? That would be interesting to know jacob |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Apr 09 10:11AM +0100 On 09/04/2020 09:44, jacobnavia wrote: > Did you rewrite the code that was using the SDL, i.e. you rewrote the parts of the SDL that you were using or adapted the source code of the SDL to your application? > Or did you eliminate features that used that library? > That would be interesting to know I rewrote the parts of neoGFX that were using SDL. What this means in practice is that neoGFX currently only has a Windows implementation (which I have effectively written from scratch) and I now have more work than I originally planned to support other operating systems. I was already using OpenGL directly (rather than using SDL) for rendering and I now use glw (via glew) for OpenGL context creation. I was going to use SDL for audio but the plan is to now use PortAudio. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
"Öö Tiib" <ootiib@hot.ee>: Apr 09 03:11AM -0700 On Thursday, 9 April 2020 12:11:31 UTC+3, Mr Flibble wrote: > I rewrote the parts of neoGFX that were using SDL. What this means in practice is that neoGFX currently only has a Windows implementation (which I have effectively written from scratch) and I now have more work than I originally planned to support other operating systems. > I was already using OpenGL directly (rather than using SDL) for rendering and I now use glw (via glew) for OpenGL context creation. > I was going to use SDL for audio but the plan is to now use PortAudio. SDL is portable HAL for wide variety of multimedia output and input hardware and networking plus rudimentary application framework. If you removed that then either it is Windows-only now or the hardware access layer is up to potential users now to hack up. |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Apr 09 12:16PM +0100 On 09/04/2020 11:11, Öö Tiib wrote: > framework. If you removed that then either it is Windows-only now > or the hardware access layer is up to potential users now to hack > up. Did you not read what I actually posted? I already said it is currently Windows only. I designed neoGFX properly so SDL has hidden behind an abstraction layer which is why it only took me about 4 days to remove so potential users will not have to "hack up" support for other operating systems: I still plan for neoGFX to be cross platform. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Apr 09 12:26PM +0100 On 09/04/2020 12:16, Mr Flibble wrote: >> or the hardware access layer is up to potential users now to hack >> up. > Did you not read what I actually posted? I already said it is currently Windows only. I designed neoGFX properly so SDL has hidden behind an abstraction layer which is why it only took me about 4 days to remove so potential users will not have to "hack up" support for other operating systems: I still plan for neoGFX to be cross platform. I don't think my previous reply was clear enough; take two: neoGFX has its own HAL (which used to wrap SDL among other things) so potential users will not have to "hack one up" even though I have removed SDL. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
Christian Gollwitzer <auriocus@gmx.de>: Apr 09 01:43PM +0200 Am 09.04.20 um 13:26 schrieb Mr Flibble: > neoGFX has its own HAL (which used to wrap SDL among other things) so > potential users will not have to "hack one up" even though I have > removed SDL. Good luck with macOS. They have just a year ago deprecated OpenGL in favour of the (mac only) Metal framework. If it only were different API calls, but it means you need to rewrite all the shaders, because the shader language is incompatible. There is a third party Vulkan implementation, so if you're going for Vulkan instead of OpenGL it could potentially be easier. Graphics APIs are a mess... Christian |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Apr 09 12:46PM +0100 On 09/04/2020 12:43, Christian Gollwitzer wrote: >> I don't think my previous reply was clear enough; take two: >> neoGFX has its own HAL (which used to wrap SDL among other things) so potential users will not have to "hack one up" even though I have removed SDL. > Good luck with macOS. They have just a year ago deprecated OpenGL in favour of the (mac only) Metal framework. If it only were different API calls, but it means you need to rewrite all the shaders, because the shader language is incompatible. There is a third party Vulkan implementation, so if you're going for Vulkan instead of OpenGL it could potentially be easier. Graphics APIs are a mess... As OpenGL is also behind neoGFX's HAL it was fully in the plan to also support Vulkan and possibly, for macOS, Metal. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
jacobnavia <jacob@jacob.remcomp.fr>: Apr 09 06:04PM +0200 Le 09/04/2020 à 11:11, Mr Flibble a écrit : > practice is that neoGFX currently only has a Windows implementation > (which I have effectively written from scratch) and I now have more work > than I originally planned to support other operating systems. This can be a huge task or a non-issue if you want to support only windows. > I was already using OpenGL directly (rather than using SDL) for > rendering and I now use glw (via glew) for OpenGL context creation. That would be a better path (using OpenGL) than getting married to windows forever > I was going to use SDL for audio but the plan is to now use PortAudio. What are the differences/advantages of each? |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Apr 09 05:09PM +0100 On 09/04/2020 17:04, jacobnavia wrote: >>> That would be interesting to know >> I rewrote the parts of neoGFX that were using SDL. What this means in practice is that neoGFX currently only has a Windows implementation (which I have effectively written from scratch) and I now have more work than I originally planned to support other operating systems. > This can be a huge task or a non-issue if you want to support only windows. I don't think it will be a huge task: it only took me about four days to remove SDL replacing it with Windows-specific code (admittedly I already had a fair bit of Win32 code already written due to SDL not being adequate in the past). >> I was already using OpenGL directly (rather than using SDL) for rendering and I now use glw (via glew) for OpenGL context creation. > That would be a better path (using OpenGL) than getting married to windows forever neoGFX has been using OpenGL since day 1; I also plan to support Vulkan and Metal. >> I was going to use SDL for audio but the plan is to now use PortAudio. > What are the differences/advantages of each? The advantage of using PortAudio over SDL is that PortAudio is only concerned with audio (and SDL isn't meeting my needs in other areas). /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Apr 09 03:31PM -0700 On 4/9/2020 9:04 AM, jacobnavia wrote: >> (which I have effectively written from scratch) and I now have more >> work than I originally planned to support other operating systems. > This can be a huge task or a non-issue if you want to support only windows. If one wants to support only windows, then go for some directx. I use OpenGL, however... WebGL is nice: http://funwithfractals.atspace.cc/ct_gfield_test/3d_user/ct_wormhole_exp.html ;^) |
Frederick Gotham <cauldwell.thomas@gmail.com>: Apr 09 05:48AM -0700 About ten years ago I thought that I'd seen every kind of compiler and linker error. I know that when templates go wrong you can get a sea of information, but I've at least understood each individual line. Today I'm stumped. It's a linker error that has me stumped. Let's say I have already compiled a dynamic shared library, and my library is called 'Monkey'. So on MS-Windows, I have "libMonkey.dll", and on Linux and Mac, I have "libMonkey.so". So then I write a program that makes use of my Monkey library, and I compile it like so: g++ -o new_program new_program.cpp -lMonkey This compilation of "new_program" is failing, and the linker is saying that there are undefined references in the Monkey library. I've never seen this before. My Monkey library has already been successfully compiled. I can't see how "new_program" would fail to link. I've never known a linker to complain that a dynamic shared library, which has already been compiled, contains undefined references. I'm only trying to link with a library that's already been compiled. I'm working on ARM 32-Bit embedded Linux, and so I build in two steps like this: arm-linux-gnueabihf-g++ -std=c++11 -o frederick.o -c frederick.cpp arm-linux-gnueabihf-g++ -std=c++11 -o frederick frederick.o -lMonkey The first command succeeds and creates the object file. The second command fails with this output: libMonkey.so: undefined reference to `log_debug' libMonkey.so: undefined reference to `log_error' libMonkey.so: undefined reference to `log_trace' libMonkey.so: undefined reference to `log_info' collect2: error: ld returned 1 exit status I've never seen a linker do this before. Any got a clue what's going on? |
"Öö Tiib" <ootiib@hot.ee>: Apr 09 05:56AM -0700 On Thursday, 9 April 2020 15:48:38 UTC+3, Frederick Gotham wrote: > collect2: error: ld returned 1 exit status > I've never seen a linker do this before. > Any got a clue what's going on? That is huge topic impossible to answer by so vague problem description. May be skim over answers in that stack overflow question: <https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix> And then come back and explain why none applies on your case. question |
Paavo Helde <eesnimi@osa.pri.ee>: Apr 09 04:09PM +0300 09.04.2020 15:48 Frederick Gotham kirjutas: > I've never known a linker to complain that a dynamic shared library, which has already been compiled, contains undefined references. I'm only trying to link with a library that's already been compiled. This depends on the linker default behavior. With gcc you need to pass the following to the g++ shared library link command: -Wl,-no-undefined |
Paavo Helde <eesnimi@osa.pri.ee>: Apr 09 04:15PM +0300 09.04.2020 16:09 Paavo Helde kirjutas: >> only trying to link with a library that's already been compiled. > This depends on the linker default behavior. With gcc you need to pass > the following to the g++ shared library link command: -Wl,-no-undefined To clarify - this does not magically resolve undefined references, it just reports them earlier, at the first shared library linking stage. I believe the default behavior is there to allow cyclic dependencies between .so-s, but I think it's better for everybody to avoid such things. |
Frederick Gotham <cauldwell.thomas@gmail.com>: Apr 09 06:19AM -0700 On Thursday, April 9, 2020 at 2:09:27 PM UTC+1, Paavo Helde wrote: > This depends on the linker default behavior. With gcc you need to pass > the following to the g++ shared library link command: -Wl,-no-undefined That particular compiler option didn't work but you pointed me in the right direction. This one worked: -Wl,--allow-shlib-undefined |
Frederick Gotham <cauldwell.thomas@gmail.com>: Apr 09 06:41AM -0700 I think the Monkey library wants the main executable file to define those logging functions, almost like they were registered callback functions. Here's what I did in "new_program" to get everything to compile just fine: On Thursday, April 9, 2020 at 2:25:08 PM UTC+1, Richard Damon wrote: > behavior. You need not just the signatures, but what they are supposed > to do. It may be that a basically nil stub would work, but it also might > not. I figured it out. Here's what I did in my C++ program: extern "C" { int log_error(const char* func, const char *format, ...) { return 0; } int log_info(const char* func, const char *format, ...) { return 0; } int log_debug(const char* func, const char *format, ...) { return 0; } int log_trace(const char* func, const char *format, ...) { return 0; } } int main(void) { } Now it compiles just fine without having to pass any special options to the linker. |
Keith Thompson <Keith.S.Thompson+u@gmail.com>: Apr 09 02:19PM -0700 > g++ -o new_program new_program.cpp -lMonkey > This compilation of "new_program" is failing, and the linker is saying > that there are undefined references in the Monkey library. You posted the same question in comp.lang.c, but with "gcc" rather than "g++". I would suggest posting only in the newsgroup for whichever language you're actually using. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */ |
Juha Nieminen <nospam@thanks.invalid>: Apr 09 01:27PM > Hi, > i need to solve the following problem: > (All Code is Pseudo-Code) Why does this look like an archetypal school assignment? |
"Öö Tiib" <ootiib@hot.ee>: Apr 09 07:20AM -0700 On Thursday, 9 April 2020 16:28:06 UTC+3, Juha Nieminen wrote: > > i need to solve the following problem: > > (All Code is Pseudo-Code) > Why does this look like an archetypal school assignment? Because (for whatever reason) majority of scholars seem to assume that assignments must be bland and uninspiring to extreme? This felt like assignment from novice level scholar, advanced use concepts of "foo" and "bar" to maximize on it. |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment