Search Results

Search found 3 results on 1 pages for 'rowhawn'.

Page 1/1 | 1 

  • program "is not up to date" execution error in wedit lcc-win32

    - by Rowhawn
    I'm attempting to compile a simple hello world program in c with lcc-win32/wedit, and i'm a little unfamiliar with windows c programming. #include int main(void){ printf("hellow\n"); return 0; } When I compile the program the console output is Wedit output window build: Tue Jun 15 09:13:17 2010 c:\lcc\lib\lcccrt0.obj .text: undefined reference to '_RtlUnwind@16' c:\lcc\lib\lcccrt0.obj .text: undefined reference to '_signal' c:\lcc\lib\lcccrt0.obj .text: undefined reference to '_raise' c:\lcc\lib\lcccrt0.obj .text: undefined reference to '_exit' asctoq.obj .text: undefined reference to '_strnicmp' defaulttrap.obj .text: undefined reference to 'imp_iob' defaulttrap.obj .text: undefined reference to '_fwrite' defaulttrap.obj .text: undefined reference to '_itoa' defaulttrap.obj .text: undefined reference to '_strcat' defaulttrap.obj .text: undefined reference to '_MessageBoxA@16' defaulttrap.obj .text: undefined reference to '_abort' powlasm.obj .text: undefined reference to '_pow' qfloat.obj .text: undefined reference to '_memset' qfloat.obj .text: undefined reference to '_strchr' qfloat.obj .text: undefined reference to '_memmove' strlcpy.obj .text: undefined reference to '_memcpy' xprintf.obj .text: undefined reference to '_localeconv' xprintf.obj .text: undefined reference to '_strtol' xprintf.obj .text: undefined reference to '_wcslen' xprintf.obj .text: undefined reference to '_wctomb' xprintf.obj .text: undefined reference to '_fputc' search Compilation + link time:0.1 sec, Return code: 60 when I attempt to execute the program within wedit i get a dialog box that says "hello.exe is not up-to-date. Rebuild?" If I click yes, nothing happens. If I click no, a dos window pops up saying "C:\lcc\projects\lcc2\hello.exe" Return code -1 Execution time 0.001 seconds Press any key to continue... This continues to happen no matter how many times i compile/rebuild. Any ideas?

    Read the article

  • How do I cast a void pointer to a struct in C?

    - by Rowhawn
    In a project I'm writing code for, I have a void pointer, "implementation", which is a member of a "Hash_map" struct, and points to an "Array_hash_map" struct. The concepts behind this project are not very realistic, but bear with me. The specifications of the project ask that I cast the void pointer "implementation" to an "Array_hash_map" before I can use it in any functions. My question, specifically is, what do I do in the functions to cast the void pointers to the desired struct? Is there one statement at the top of each function that casts them or do I make the cast every time I use "implementation"? Here are the typedefs the structs of a Hash_map and Array_hash_map as well as a couple functions making use of them. typedef struct { Key_compare_fn key_compare_fn; Key_delete_fn key_delete_fn; Data_compare_fn data_compare_fn; Data_delete_fn data_delete_fn; void *implementation; } Hash_map; typedef struct Array_hash_map{ struct Unit *array; int size; int capacity; } Array_hash_map; typedef struct Unit{ Key key; Data data; } Unit; functions: /* Sets the value parameter to the value associated with the key parameter in the Hash_map. */ int get(Hash_map *map, Key key, Data *value){ int i; if (map == NULL || value == NULL) return 0; for (i = 0; i < map->implementation->size; i++){ if (map->key_compare_fn(map->implementation->array[i].key, key) == 0){ *value = map->implementation->array[i].data; return 1; } } return 0; } /* Returns the number of values that can be stored in the Hash_map, since it is represented by an array. */ int current_capacity(Hash_map map){ return map.implementation->capacity; }

    Read the article

  • Cannot place breakpoint in gdb in emacs

    - by Rowhawn
    I'm trying to debug a small program I've written in C. I open up the file in emacs, M-x gdb, give the program filename (a.out). When i switch to the source file in the emacs pane, and try to place a breakpoint in the main function, I get the message "No default breakpoint address now." and the breakpoint doesn't place, so I can't debug the program. I'm compiling the program with the options gcc -Wall -ansi -pedantic-errors -Werror. Any ideas?

    Read the article

1