Search Results

Search found 37 results on 2 pages for 'thunk'.

Page 1/2 | 1 2  | Next Page >

  • Mac gcc non-virtual thunk error

    - by fret
    I'm getting these non-virtual thunk errors only in the Deployment build of my app. It uses a private framework called Lgi. Building on 10.5.8 using XCode 3.1.4 (latest for leopard?) The error looks like this: Ld /Users/matthew/Code/Scribe-Branches/v2.00/build/Development/Scribe.app/Contents/MacOS/Scribe normal i386 cd /Users/matthew/Code/Scribe-Branches/v2.00 /Developer/usr/bin/g++-4.0 -arch i386 -L/Users/matthew/Code/Scribe-Branches/v2.00/build/Development -F/Users/matthew/Code/Scribe-Branches/v2.00/build/Development -F/Users/matthew/Code/Lgi/build -F/Users/matthew/Code/Scribe-Branches/v2.00/../../Lgi/build/Development -F/Users/matthew/Code/Scribe-Branches/v2.00/../../Lgi/build/Development -F/Users/matthew/Code/Scribe-Branches/v2.00/../../Lgi/build/Deployment -F/Users/matthew/Code/Scribe-Branches/v2.00/../../Lgi/build/Development -F/Users/matthew/Code/Scribe-Branches/v2.00/../../Lgi/build/Deployment -filelist /Users/matthew/Code/Scribe-Branches/v2.00/build/Scribe.build/Development/Scribe.build/Objects-normal/i386/Scribe.LinkFileList -framework Carbon -framework Lgi -o /Users/matthew/Code/Scribe-Branches/v2.00/build/Development/Scribe.app/Contents/MacOS/Scribe Undefined symbols: "non-virtual thunk to GWindow::OnDrop(char*, GVariant*, GdcPt2, int)", referenced from: vtable for ScribeWndin ScribeApp.o vtable for GShutdownin ScribeApp.o vtable for CalendarUiin Calendar.o vtable for CalendarViewWndin CalendarView.o vtable for CalendarConfigin CalendarView.o vtable for ScribeExportin Exp_Scribe.o vtable for GNewMailDlgin GNewMailDlg.o ....etc for lots of classes.... Anyway I know I'm not leaving those undefined because it does in fact link and run fine in the development build. Now after googling the issue the first thing to try is changing the optimization setting, which I did... and no dice. Some link error. So these virtual functions are initially defined in GDragDropTarget, and GWindow's inheritance looks like this: class LgiClass GWindow : public GView #ifndef WIN32 , public GDragDropTarget #endif (LgiClass being for __declspec export/import on win32) Any ideas on what to try next? Maybe I need to provide more info.

    Read the article

  • What is a 'thunk'?

    - by fbrereto
    I've seen it used in programming (specifically in the C++ domain) and have no idea what it is. Presumably it is a design pattern, but I could be wrong. Can anyone give a good example of a thunk?

    Read the article

  • Using v-table thunks to chain procedure calls

    - by Alien01
    I was reading some articles on net regarding Vtable thunks and I read somewhere that thunks can be used to hook /chain procedures calls. Is it achievable? Does anyone know how that works , also I am not able to find good resource explaining thunks. Any suggestions for that?

    Read the article

  • Compiling C++ code with mingw under 12.04

    - by golemit
    I tried to setting up compiling of the C++ projects under my Ubuntu 12.04 by mingw with QT libraries. The idea was to get executable independent from variations of target Windows versions and development environments of my colleagues. It was successfully implemented under OpenSuse 12.2 with mingw32 and some additional libraries including mingw32-libqt4 and some others. Fine. However when trying to do the same under Ubuntu 12.04 with mingw-w64 including latest libraries QT-4.8.3 copied from Windows there were always errors. No luck. The typical errors in these attempts can be seen in attachments. The commands used: qmake -spec /path_to_my_conf/win32-x-g++ my_project.pro make Can someone give a hint of the problem source? I would appreciate a good advice. Serge some exctracts from LOG: ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0xec): undefined reference to `QDialog::accept()' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0xf0): undefined reference to `QDialog::reject()' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0x104): undefined reference to `non-virtual thunk to QWidget::devType() const' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0x108): undefined reference to `non-virtual thunk to QWidget::paintEngine() const' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0x10c): undefined reference to `non-virtual thunk to QWidget::getDC() const' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0x110): undefined reference to `non-virtual thunk to QWidget::releaseDC(HDC__*) const' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0x114): undefined reference to `non-virtual thunk to QWidget::metric(QPaintDevice::PaintDeviceMetric) const' ./.obj/qrc_images.o:qrc_images.cpp:(.text+0x24): undefined reference to `__imp___Z21qRegisterResourceDataiPKhS0_S0_' ./.obj/qrc_images.o:qrc_images.cpp:(.text+0x64): undefined reference to `__imp___Z23qUnregisterResourceDataiPKhS0_S0_' collect2: ld returned 1 exit status

    Read the article

  • project setup emacs org-mode

    - by Dervin Thunk
    Dear Emacs gurus; I would like to set up a project to be published as HTML using org-mode. I don't want to litter my .emacs with project definitions, and I was wondering where I could put the (setq org-publish-project-alist) variable. Can I somehow put it in the same dir? Thank you

    Read the article

  • Guessing UTF-8 encoding

    - by Dervin Thunk
    I have a question that may be quite naive, but I feel the need to ask, because I don't really know what is going on. I'm on Ubuntu. Suppose I do echo "t" > test.txt if I then file test.txt I get test.txt:ASCII text If I then do echo "å" > test.txt Then I get test.txt: UTF-8 Unicode text How does that happen? How does file "know" the encoding, or, alternatively, how does it guess it? Thanks.

    Read the article

  • noweb dpp filter and latex not printing curly braces

    - by Dervin Thunk
    Hello. Well, this smells like a tumbleweed, but I will ask it anyway. Suppose you have a noweb file with some c# code. You also have the c++ pretty-print filter dpp. If you run the command noweave -filter ./dpp -x test.nw > csharp.tex on the file below, it will print everything except for the curly braces. Instead of them, I get an em-dash and a closing quotations marks (i.e. ?) in the dvi. The tex source looks fine... Any ideas? @ C\# test file <<test.c>>= while( (a[right] >= pivot) && (left < right) ) { right--; }

    Read the article

  • Programming mid-terms

    - by Dervin Thunk
    Hello. Unfortunately, (written) midterms are necessary in most university CS programs in the world. They tell us how well our students (and ourselves as teachers) are doing. Needless to say, designing midterms for a C Programming Language course is not easy. For instance, when we do program for real, we have a myriad of information at our disposal: websites, books, cheat sheets to "remember" the syntax and so on. My question is this: did you find any way, during your years at school or training, where you said: ok, this midterm evaluation of my programming skills is tough, but fair. For instance: I found "find 5 problems with this code"-type questions hard but interesting and telling. Are there any others? Thanks.

    Read the article

  • comprehensive list of unsafe functions in C

    - by Dervin Thunk
    Hello. I've been looking online unsuccessfully for a comprehensive list of unsafe (dangerous) functions in C (see here for a few). When I say "dangerous" I mean functions like gets or strcopy, but I was wondering if someone has actually compiled a comprehensive list. Thank you. PD: Neil Butterworth, you should abstain from answering my posts. You're seldom helpful.

    Read the article

  • what would be the c# equivalent of this code snippet?

    - by Dervin Thunk
    I don't really understand Perl, so I was wondering if someone could give me a hint about what it is this code is asking of STDIN, and how to say this in C#. Thanks. $TMPFILE = "xxx.tmp"; if (! -f STDIN) { open TMPFILE, "> $TMPFILE" or die "Couldn't open `$TMPFILE' for writing: $!; aborting"; print TMPFILE while <STDIN>; close TMPFILE; open STDIN, "< $TMPFILE" or die "Couldn't open `$TMPFILE' for reading: $!; aborting"; unlink $TMPFILE; }

    Read the article

  • implementing feature structures: what data type to use?

    - by Dervin Thunk
    Hello. In simplistic terms, a feature structure is an unordered list of attribute-value pairs. [number:sg, person:3 | _ ], which can be embedded: [cat:np, agr:[number:sg, person:3 | _ ] | _ ], can subindex stuff and share the value [number:[1], person:3 | _ ], where [1] is another feature structure (that is, it allows reentrancy). My question is: what data structure would people think this should be implemented with for later access to values, to perform unification between 2 fts, to "type" them, etc. There is a full book on this, but it's in lisp, which simplifies list handling. So, my choices are: a hash of lists, a list of lists, or a trie. What do people think about this?

    Read the article

  • Generating n statements from context-free grammars

    - by Dervin Thunk
    Hello, So not to reinvent the wheel, I would like to know what has already been done about generating random statements from a context-free language (like those produced by yacc, etc.). These grammars are primarily for parsing, but maybe someone has done some generation for testing the parsers? Thanks

    Read the article

  • When to pass by value?

    - by Dervin Thunk
    Dear all. I was wondering if there are examples of situations where you would purposefully pass an argument by value in C. Let me rephrase. When do you purposefully use C's pass-by-value for large objects? Or, when do you care that the object argument is fully copied in a local variable? EDIT: Now that I think about it, if you can avoid pointers, then do. Nowadays, "deep" copying is possible for mostly everything in small apps, and shallow copying is more prone to pointer bugs. Maybe.

    Read the article

  • Error in qsort function in Programming Pearls?

    - by Dervin Thunk
    Hello, is it just me or this code in Programming Pearls is wrong (quicksort wants 2 const voids, no?) If so, is my solution right? Apologies, just learning... int wordncmp(char *p, char* q) { int n = k; for ( ; *p == *q; p++, q++) if (*p == 0 && --n == 0) return 0; return *p - *q; } int sortcmp(char **p, char **q) { return wordncmp(*p, *q); } ... qsort(word, nword, sizeof(word[0]), sortcmp); Is this a solution? int sortcmp(const void *p, const void *q) { return wordncmp(* (char * const *) p, * (char * const *) q); }

    Read the article

  • What should be taught in a "Fundamentals of programming" course at university?

    - by Dervin Thunk
    I have started a new question (see here), because I think the topic is of importance in a more general form. The question is now: If you were a professor at a Computer Science Dept. in some university, what would make it into your course? This is a programming course, second term, first year computer science/computer engineering. Remember you have a limited amount of time, and students are of different levels of competence, and some may be scientists, but some will also go on to be programmers in companies of different kinds. You have to cater to all. Bonus: What language? (Although see this question for my current thoughts about this...) Maybe you want to attach a course outline from some university? See here for an even more general question about this. Answer: I can't really summarize this post... I guess it was too subjective. However, it looks like we have to cover the history of computing up to a certain extent, computer architecture (memory, registers, whatever), C, and finally some basic algos and data structures in a problem solving fashion. This will be the bare bones of the course. Thanks all. I will accept the most voted up answer to close the thread, as it should be done.

    Read the article

  • deep or shallow copying?

    - by Dervin Thunk
    Dear all. I was wondering if there are examples of situations where you would purposefully pass an argument by value (deep copy) in C. For instance, passing a char to a function is usually cheaper in space than passing a char* (if there's no need to share the value), since char is 1 byte and pointers are, well, whatever they are in the architecture (4 in my 32 bit machine). ?(When) do you want to pass (big) deep copies to functions? if so, why?

    Read the article

  • reading a line, tokenizing and assigning to struct in C

    - by Dervin Thunk
    line is fgets'd, and running in a while loop with counter n, d is a struct with 2 char arrays, p and q. Basically, in a few words, I want to read a line, separate it into 2 strings, one up until the first space, and the rest of the line. I clean up afterwards (\n from the file becomes \'0'). The code works, but is there a more idiomatic way to do this? What errors am I running into "unknowingly"? int spc = strcspn(line," "); strncpy(d[n].p, line, spc); d[n].p[spc+1]='\0'; int l = strlen(line)-spc; strncpy(d[n].q, line+spc+1, l); char* nl = strchr(d[n].q, '\n'); if(nl){ *nl='\0'; } n++; Thanks.

    Read the article

  • technique for how to debug macros in C

    - by Dervin Thunk
    Hi. So I have the (mostly vilified) #define MAX( a, b ) ( ((a) > (b)) ? (a) : (b) ) somewhere in a program (yes, yes, I know). At some point in the code there is a comparison X>-1?, where X is (as far as I can tell) a (signed) integer. The line is j += MAX(bmGs[i], bmBc[(int)y[i + j]] - m + 1 + i);, where y here is a char*. Not necessarily surprisingly, I find that the macro is returning -1 as the larger number (I'm guessing too long a number for int or an unsigned issue, but I can't find it). I would like to know techniques you guys may have for finding these kinds of errors. Notice that I'm not asking for programming advice about whether or not to use that macro, I'm sure folks are dying to tell me I should refrain from things like that, but the question is going somewhere else. Thanks.

    Read the article

1 2  | Next Page >