thank you, a lot
Type: Posts; User: Holymanus
thank you, a lot
hello, is there any possible way how to write in Makefile condition like in source code,
like this for example:
#ifdef _WIN32
gcc $? -o $@ -lws2_32
#else
gcc $? -o $@
You mean link this ?
gcc xxx.o xxxx.o -lpthread -o xxxx
sorry i forgot about it
acctualy i was using -lpthread
Hello im getting error while compiling my source code:
Undefined reference to "pthread_create"
Undefined reference to "pthred_join"
But there is
#include <pthread.h>
so if i understood right, i will use this externs there where i want to save them yes ?
/*
* tab.h
*
* Created on: 21.11.2010
* Author: Martin
*/
#ifndef TAB_H_
#define TAB_H_
Hello, i got some problem, when creating data trought another .c file (taken from header) which doesnt contain any main(). So question is: what to do that it will not dropping my data somewhere. Use...
right at the end it works
and how to add it to makefile
edit: i have it, simply
gcc $? -o $@ -lws2_32
same result like before
C:\Users\Martin\Desktop\C\SEM\SEM\SEM 2. verze>gcc -lws2_32 -o clapp clientapp.c
C:\Users\Martin\AppData\Local\Temp/ccIDgaaa.o(.text+0x17):clientapp.c: undefined...
And if im trying to add this file with ld.exe
ld.exe "C:\Program Files\Microsoft SDKs\Windows\v6.0A
\Lib\Ws2_32.lib"
ld.exe: warning: cannot find entry symbol _mainCRTStartup; defaulting to...
gcc -LC:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib -oSEM.exe tab.o clientapp.o app.o -lWs2_32.lib
c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: cannot find -lWs2_32.lib...
you mean with parametr -l Ws2_32.lib ?
gcc -oSEM.exe tab.o clientapp.o app.o
clientapp.o:clientapp.c:(.text+0x17): undefined reference to `WSAStartup@8'
clientapp.o:clientapp.c:(.text+0x2e): undefined reference to `WSACleanup@0'...
Hi im solving problem of function of preprocesor, i dont understand why this cant be linked. Im speaking about funciton communication because there seems is the problem
#include <string.h>...
Im trying put there only things which belong there. Now it is all right. One more time thank you for help
No i meaned that OS allocated for this tab struct place and im giving there more and more but there is only pointer so it is not what getting bigger
I hope im not overweighting this structure with adding new rows (i mean from memory side)
these are column names saved in structs which are in list too.
here is part of my header file
typedef struct Column {
char name[10];
struct Column *next;
And my changes in code :
row *create_row(int values[], char tab_name[]) {
printf("2.1\n");
if (find_tab(tab_name)->first_row != NULL) {
...
probably with writing one more row it accessing to memory where it shouldnt be
because output gives this
2.
2.1
2.2
2.3
2.4
So i found one more problem when i add one more row it kills program after this for loop
one more point for what there this pointer for previous_ptr
Thank you very much, this is logical, and array was last chance which i didnt want use because all works on lists. I tryed it, and works well but seems i havent solved another problem but it is...
If i use this construction
*iter = first_item[i];
then problem is that in iter noramly getting values but to first_item field nothing gets
so how it would be right if this doesnt work