Errors With External Dependencies.

  • Diissaster
    2nd Feb 2011 Member 0 Permalink
    I use code::blocks with MinGW

    I found in misc.c an error while compiling my mod. It was found at the top, where it said #include (I take it was an external dependency). This the buggy content of the start of misc.c : http://pastebin.com/1GZsvNkF
    The error I get is as follow: http://pastebin.com/eZ0zjxcy
    I think it is something to do with the build options (Linker Settings etc).
    I think as Cracker64 Updated wiki for Alpha 46.0, and he uses VS, he couldn't update the code::blocks guide.

    Any answers?
  • Merbo
    2nd Feb 2011 Member 0 Permalink
    Download Regex.h: Put it in the directory that you have the rest of the includes in. then, change #include <_regex.h_> to #include "regex.h"
  • Diissaster
    2nd Feb 2011 Member 0 Permalink
    Trying.

    EDIT: Where can I get regex.h? Google doesn't help.
  • Cr15py
    2nd Feb 2011 Member 0 Permalink
    Were you not on IRC at all yesterday. Linux has a standard regular expressions library. We need 3 functions and 1 struct ported to Windows to compile. typedef struct re_pattern_buffer regex_t(so we need re_patter_buffer ported). regcomp(regex_t, char*, int), which compiles the submitted string to a format the next function can read. reg_exec(), which performs the regular expressions operations and reg_free(regex_t, char*, size_t, regmatch_t, int) which frees the regex_t memory. The struct regmath_t is left NULL so it is not necessary to port for the regexec function.

    EDIT: I apologize, regexec() checks for a match using regular expressions syntax. It doesn't actually perform splitting.
  • jacksonmj
    2nd Feb 2011 Developer 0 Permalink
    regex is not part of standard C. Therefore, on systems that don't have it, you need some extra files.

    Files found here worked for me cross compiling for windows using MinGW on linux:
    http://gnuwin32.sourceforge.net/downlinks/regex-bin-zip.php

    Adding it is probably a similar procedure to adding SDL and bzip2. (Extract zip file to correct place, add libregex.dll.a to link libraries list).
  • Cr15py
    2nd Feb 2011 Member 0 Permalink
    @jacksonmj
    I got banned from #powder because I expressed my unhappiness with linux that it wouldn't open Code::Blocks. I was pretty much told that I was being disrespectful because I didn't like the fact that Ubuntu wouldn't open the native Code::Blocks program and that I wanted to cross compile. Apparently cross compiling will get you banned.
  • Diissaster
    2nd Feb 2011 Member 0 Permalink
    Thanks, can a Mod put the lock down, but don't delete the thread! I think that more about this will come up, so this can be a reference!
  • jacksonmj
    2nd Feb 2011 Developer 0 Permalink
    @Cr15py
    I saw, I was lurking. Cross compiling will not get you banned, raging will.

    If you wish to cross compile from Ubuntu, see this old thread as a starting point (note: #ifdef code changes detailed there are probably no longer needed): https://powdertoy.co.uk/Discussions/Thread/View.html?Thread=992
    Also, running "codeblocks" from the terminal might give you some error output on why it won't start.
  • Cr15py
    2nd Feb 2011 Member 0 Permalink
    jacksonmj
    Being pissed shouldn't get you banned. He had no right to ban me because of my opinion on Linux.
  • Xenocide
    2nd Feb 2011 Former Staff 0 Permalink

    Cr15py:

    @jacksonmj
    I got banned from #powder because I expressed my unhappiness with linux that it wouldn't open Code::Blocks. I was pretty much told that I was being disrespectful because I didn't like the fact that Ubuntu wouldn't open the native Code::Blocks program and that I wanted to cross compile. Apparently cross compiling will get you banned.


    Completely wrong. You were banned for being abusive and raging at people.
Locked by cracker64: problem solved