HELP: "stricmp and strnicmp was not defined in this scope"

Hey, everyone.

I downloaded and installed Orx today, and when I generated a new project with the "init.bat" file, I went to the Windows Code::Blocks project and opened it. Everything looked good, but when I tried to build and run the new project, CB pulled up "orxString.h" and highlights two errors: stricmp and strnicmp aren't declared in the scope, apparently. Through a series of trials and errors I found that the problem seems to stem from "strings.h." I also found that these commands are important to the error log and assertions.

I don't understand what could be happening, and I've Googled all over the place, and also searched the forums, but have found nothing.

Any help would be much appreciated!

Thanks,
Wolf

Comments

  • Hi Wolf, welcome to Orx!. Just a couple of things to check over first...

    There's some code::blocks set up tutorials here worth checking: http://orx-project.org/wiki/en/tutorials/main#codeblocks

    Did you get the orx library built with code::blocks first before trying to make our own project? You'll need to ensure that's done first. Once you have a library, then you can move ahead with your own project.

    Also, there's a couple of quirky things going on with the premake project generator today, so it may not be you. Being looked into at the moment.

  • edited October 2019

    Hey there, sausage!

    Thank you for the quick reply. The only two things I can't check off any list are: 1. The premake gen. Of course I can't be sure if it's that or not. 2. As per the tutorial you linked, I don't see "mingw32" under selectable compilers. I followed the 5 step install page for mingw, twice, and it all looks the same. Also, my Code::Blocks version is well above the minimum required.

    Could I have installed the w64 version wrong? I'll look into it... That seems like the only issue under my control.

    Thank you, again!

    Also, my version specs for everything are Windows 10, Code::Blocks 17.12, the current Orx version from github, and mingw32-w64 8.1.0.

    EDIT: I added mingw32-w64 to the compiler list, and updated the toolchain, and no luck.

  • Cool, ok so it looks like the orx library is yet to be built, so we can rule out using init.bat for now.

    I do remember some issues trying to get code::blocks working under orx. I think I gave up.

    I test on code::blocks 16.01

    I think the first step is to take orx out of the equation and see if you can get the mingw64 compiler working with your code::blocks and compile a hello world.

    I've just tried and it can't find my compiler either.

  • I was able to compile a previous project with mingw64 successfully. So, I just downloaded CodeLite, which I have never been a fan of, and it worked. I guess a less than stellar IDE that runs Orx is better than a really good one that won't!

    Thank you for your time and patience!

    Cheers,
    Wolf

  • Yes unfortunately, codelite works without those issues. The last change to code::blocks was in 2017. It's been discussed to stop supporting it. I'll see if I can find out any more information.

  • Yeah. I'm not too pleased with CB anymore. I tried to build and compile some Orx code from scratch instead of the premake, and it immediately started throwing the same errors. I'm done with it.

    @sausage said:
    The last change to code::blocks was in 2017

    Really? That explains a lot...

    BTW, I hope I didn't offend any readers when I said CodeLite was "less than stellar." I just wanted to clarify that as an opinion. Lol

    On a different(but related) note, are there any recommended IDEs for working with Orx? As in, ones that function well in conjunction with the engine?

  • I personally use Codelite... and I'm deeply offended haha nah not really. It has it's quirks and there are some things I wish the author would fix. But I still use it the most.

    Visual Studio is pretty rock solid for orx. I only don't use this because I use it at work and want to use something different.

    Or you can do what @iarwain does, sublime, but using the gmake project instead, commandline behind the scenes.

    I'd like to get "Visual Studio Code" working but I haven't had the time just yet.

    I did try to get Atom to work, but it doesn't seem to listen to environment variables, so that made it difficult to pick up the $ORX variable.

  • Hi @WolftrooperNo86 and welcome here!

    I'm actually using a slightly different setup than @sausage mentioned: I'm using Sublime Text for all my edition needs and I compile/debug on the side with Visual Studio 2019.

    I know that some people reported success in using Visual Studio Code with orx, but last time I tried it it still felt a bit too sluggish to my taste (like Atom).

    I'll still look into Code::Blocks as it'd be nice if it were working correctly until we remove support for it for good.

  • edited October 2019

    @WolftrooperNo86 Iarwain just committed the latest changes and codelite is working great again, 32 and 64-bit, and debugging works again. Codelite or Visual Studio are the two easiest choices.

  • Thank you,@sausage Now that I am really delving into it, CodeLite isn’t so bad. I just don’t like that it doesn’t have autocomplete, or show syntax options.
    Thank you, @iarwain I was actually thinking about editing in Notepad++ and compiling in CodeLite. I’ve worked with Notepad++ extensively and like its clean, simple environment.
  • Ah that's weird, I remember that Eran started Codelite specifically around the autocomplete feature as he wasn't satisfied with the one from Code::Blocks.
    Did that get removed over the years?

  • edited October 2019

    CodeLite does provide an autocomplete feature, i think, just press CTRL+Spacebar. Did you open your project by using the .workspace file?

    Btw, i'm using Emacs as my Orx "IDE" currently, it works quite nicely once you configure it. I have everything i've used from VSCode, but Emacs is a lot more lightweight and can be used in the command line. :)

    Edit: Oopsie, logged on my old forum account, this is Yzubi here. :B

  • No. I didn’t know about ctrl+space. But, I looked into it and there’s currently an open bug report for CodeLite where autocomplete isn’t working for some people. But, I could have sworn that when I last used CodeLite(years ago) it didn’t have autocomplete then either. ?? Either way, thank you, everyone. At least I can develop for Orx now!
Sign In or Register to comment.