I am making a new simple stocks app

Something new is coming. I am making a new simple stocks application which will be like the apple stocks app.
Simple but useful for a quick overview.

Still in alpha.
I started C++ just this year, so some issues may be in the code.

A first screenshot:

Github Source: GitHub - tclaus/stocks: A simple stocks app for haiku. Mimics Stocks from macOS.
Package file now included.

31 Likes

Ballsy to show the MSFT stock in the screenshot… :smiley: :smiley: :smiley:

To get the app into the repo, we’ll need a recipe, see the “Gentle introductions” at the haikuports wiki. Recipes for native applications are usually quite easy to write. See some of the apps under “haiku-apps” in the haikuports tree.

Congratulations, looks great.

BeAPI or something else?

Uh - I just took a random photo - and got this. Sorry.

Packaging shouldn’t be too hard as it is using cmake for the build, getting build (linking) error on 64bit though :slight_smile:

I used cross-develop on Mac ( lion / ssh connection to a bare metal machine). As I said, I just started developing on c++.
Do you have an error message for me?

Np :slight_smile: Always glad to see people writing code for Haiku applications :ok_hand:

The problem occurs with: add_executable(tests

[ 66%] Linking CXX executable tests
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/11.2.0/../../../../x86_64-unknown-haiku/bin/ld: CMakeFiles/tests.dir/source/repository/RepositoryConfig.cpp.o: in function `RepositoryConfig::GetConfigFilePath()':
RepositoryConfig.cpp:(.text+0x9c): undefined reference to `BPath::BPath()'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/11.2.0/../../../../x86_64-unknown-haiku/bin/ld: RepositoryConfig.cpp:(.text+0xad): undefined reference to `find_directory(directory_which, BPath*, bool, BVolume*)'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/11.2.0/../../../../x86_64-unknown-haiku/bin/ld: RepositoryConfig.cpp:(.text+0xbe): undefined reference to `BPath::Append(char const*, bool)'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/11.2.0/../../../../x86_64-unknown-haiku/bin/ld: RepositoryConfig.cpp:(.text+0xd2): undefined reference to `BPath::Append(char const*, bool)'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/11.2.0/../../../../x86_64-unknown-haiku/bin/ld: RepositoryConfig.cpp:(.text+0xda): undefined reference to `BPath::Path() const'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/11.2.0/../../../../x86_64-unknown-haiku/bin/ld: RepositoryConfig.cpp:(.text+0x136): undefined reference to `BPath::~BPath()'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/11.2.0/../../../../x86_64-unknown-haiku/bin/ld: CMakeFiles/tests.dir/source/repository/RepositoryConfig.cpp.o: in function `RepositoryConfig::GetConfigFilePath() [clone .cold]':
RepositoryConfig.cpp:(.text.unlikely+0x4): undefined reference to `BPath::~BPath()'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/11.2.0/../../../../x86_64-unknown-haiku/bin/ld: CMakeFiles/tests.dir/tests/repository/TestRepository.cpp.o: in function `CATCH2_INTERNAL_TEST_0()':
TestRepository.cpp:(.text+0x2d0): undefined reference to `BString::BString(char const*)'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/11.2.0/../../../../x86_64-unknown-haiku/bin/ld: TestRepository.cpp:(.text+0x2db): undefined reference to `Repository::ReadFile(char const&, BString&)'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/11.2.0/../../../../x86_64-unknown-haiku/bin/ld: CMakeFiles/tests.dir/tests/gui/utils/TestQuoteFormatter.cpp.o: in function `CATCH2_INTERNAL_TEST_2()':
TestQuoteFormatter.cpp:(.text+0x6f): undefined reference to `QuoteFormatter::HumanReadableLargeNumber(float)'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/11.2.0/../../../../x86_64-unknown-haiku/bin/ld: CMakeFiles/tests.dir/tests/gui/utils/TestQuoteFormatter.cpp.o: in function `CATCH2_INTERNAL_TEST_0()':
TestQuoteFormatter.cpp:(.text+0x42f): undefined reference to `QuoteFormatter::HumanReadableLargeNumber(float)'
collect2: error: ld returned 1 exit status

I’ll have a look after my regular working hours. BTW: Did I publish the GitHub -Repo link :grinning:?

1 Like

Nope, you didn’t, I’m pretty good in hunting sources :smiley: :rofl:

PS, sorry if I’m too bold here, will step down if you want me to. :slight_smile:

you can upload you source on GitHub or if ou want to make your app closed source using our HPKGCreator from our Repository Site.

The app has an API key included, which I don’t want to have be visible to the public. So the source can (and is) be open, but not the build package.

Every haiku package can be opened with the expander, don’t know how to protect the content here so that you can’t do this. But would be interesting to know.

I have merged the PR.
Can you build it by running the build.sh script?

There is a .receipe file that should build a package that I can publish on GitHub / HaikuDepot, but it won’t install. On “install stocks” HaikDeopt app tells me: “package… is not installable”

Any suggestions?

architecture should be either x86_gcc2 or x86_64. Using x86 means 32 bit but Haiku itself was built with gcc4+ as the primary compiler. This hasn’t been supported for a long time. There is some info on the package building page.

If the app is compiled with a modern gcc (“setarch x86”) on 32bit Haiku, the name should be (always lower-case):

name stocks_x86

ETA: same goes for the “provides” section.

BTW, this is not a “recipe” to be used with haikuporter, but the .PackageInfo used by manually creating the HPKG with the “package” command.

The package building page lists under “architecture”:

  • any: Any architecture (e.g. a documentation package).
  • x86: Haiku x86, built with gcc 4.
  • x86_gcc2: Haiku x86, built with gcc 2.

That’s not “x86_64”.
So; what should I use to address modern, 64 Bit systems with a recent compiler?

x86_gcc2 is almost always wrong. This is only for haiku internal packages build with gcc2. x86 is the secondary arch, yes. But it is the correct arch for almost all packages.

Added some suggestions upstream, was able to build/package/install on 64bit (app crashes though on launch (probably expected as it’s missing the API key as mentioned earlier). Hope it helps out a bit. :slight_smile:

The name must be in all lowercase here, otherwise pkgman will be confused.