LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Blogs > rainbowsally
User Name
Password

Notices

Old

QT4 -- Having trouble with qInitResouces_<appname>() ?

Posted 01-14-2013 at 03:46 AM by rainbowsally
Updated 01-14-2013 at 04:01 AM by rainbowsally

Having trouble with qInitResouces_<appname>()?

Try this.
Code:
#ifdef Q_INIT_RESOURCE
#undef Q_INIT_RESOURCE
#endif

#define Q_INIT_RESOURCE(name) extern void qInitResources_##name()
The version of this macro in qglobal.h could never have ever worked.

If you enjoy digging into the low level stuff, I think you'll be amused by the context of this bug. ;-)

- The Computer Mad Science Team...
Member
Posted in Uncategorized
Views 468 Comments 0 rainbowsally is offline
Old

Simple C example for beginners and bug fix for libLQ-qt version 3.0.x

Posted 01-13-2013 at 06:57 PM by rainbowsally

Simple C example for beginners and bug fix for libLQ-qt version 3.0.x

[v.3.0 (mc2 and libLQ) will no longer be the current version(s) but it still works and we have a bug fix here that applies to all 3.0.x versions.]

Today's feature:
  • A simple C/C++ example.
  • A converter from relative paths to absolute.
  • A bug fix for the libLQ-qt/mc2 3.0 d/load.

While 'canonicalize_file_name()' is great for paths that don't have macros in them, and for dereferencing symlinks,...
Member
Posted in Uncategorized
Views 361 Comments 0 rainbowsally is offline
Old

news, sorta

Posted 01-10-2013 at 03:48 PM by rainbowsally

The new parser that will be in mc2 3.1 (currently 3.0) is really very nice (based on but changed a bit from the test files recently posted.)

You'll never find a parser that's super-easy to use, but this one is in C (no intermediate file), makes sense in C, and is debuggable in C so debugging both the code and the algorithms is much much easier than something like flex, lemon, or the gazillion other alternatives.

As kind of a challenge, we started the first few passes...
Member
Posted in Uncategorized
Views 271 Comments 0 rainbowsally is offline
Old

Parser Test 3 (A Return Stack & Compiler)

Posted 01-03-2013 at 09:53 AM by rainbowsally
Updated 01-10-2013 at 06:05 PM by rainbowsally

Parser Test 3 (A Return Stack & Compiler)

A self extractor for the 'lib' files that we include for this (pretty cute) little calculator are here.
http://www.linuxquestions.org/questi...wsally-615861/

Re: the compiler part. It's not much of a compiler, but it serves as a proof of concept. (It's used internally, the program is not compiled.)

Before we dig in here, I should say...

Bug in Parser Test 2.

...
Member
Posted in Uncategorized
Views 537 Comments 0 rainbowsally is offline
Old

Parser Test 2 (Something a bit more ambitious, maybe?)

Posted 01-03-2013 at 01:36 AM by rainbowsally

Parser Test 2 (Something a bit more ambitious, maybe?)

Here's test2.

Features:
  • Lots of custom parser funcs in order to create a parser for algebraic expressions. See 'expr' 'times', and all that good stuff in the source file 'src/test2.cpp' below.

This is the output from a session.
Code:
Input some math expressions and maybe we can identify them.
Type 'quit' to end
3b + 5 * 4e-5 / (2 * 5) + 4
<--------------------------->
...
Member
Posted in Uncategorized
Views 352 Comments 0 rainbowsally is offline

  



All times are GMT -5. The time now is 07:01 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration